Agents CLI

Your agents, in the terminal

A Claude Code wrapper that mirrors local work onto your Issues board — the same kanban, diffs, and cost badges as remote runs, driven from your own machine.

Run this in your terminal
$ curl -fsSL https://agents.pinata.cloud/install | sh
Requires Node 20+. Re-run any time to upgrade. New to it? Jump to the full guide or see the Pinata docs
  1. Step 1

    Install

    One line. No dependencies — just Node 20+.

    $ curl -fsSL https://agents.pinata.cloud/install | sh
  2. Step 2

    Authorize this machine

    Opens your browser to sign in — no token copy-paste.

    $ agents login
    Waiting for agents login on this machine…
  3. Step 3

    Point it at a repo

    Maps the repo to a board, agent, and model.

    $ cd your-project && agents init
  4. Step 4

    Lift off

    Every task files a live issue on your board — diff & cost included.

    $ agents

The complete guide

Every command, plus end-to-end walkthroughs for the things you'll actually do.

Scenarios

Task-first walkthroughs. Each one is the shortest path to a real outcome — run the steps in order.

Get set up in under a minute

You just installed the CLI and want to point it at a project.

  1. $ agents login

    Opens your browser to authorize this machine — no token to copy.

  2. $ cd your-project && agents init

    Maps the repo to a board, an agent, and a model.

  3. $ agents

    Opens the interactive prompt. Type a task and it files a live issue and starts working.

This machine is authorized and your repo is wired to a board. Every task you run now shows up as a self-driven issue with a live diff and cost.

Take a task from idea to merged PR

You have a concrete change in mind and want it filed, built, reviewed, and shipped.

  1. $ agents start "add rate limiting to the templates route"

    Files a RUNNING issue and launches the agent on it.

  2. $ agents pr 42 --draft

    Pushes the branch and opens a GitHub PR (needs the gh CLI). Idempotent.

  3. $ agents merge 42 --squash

    Merges the PR, flips the card to merged, and closes the issue as done.

The work is tracked end to end on your board — diff, cost, and PR state all linked to issue #42.

Draft a backlog from your repo

You want a set of issues proposed from the actual state of your codebase.

  1. $ agents file "split the oversized templates handler"

    Claude reads the branch, recent commits, and dirty tree, then proposes 1–5 issues. You confirm before any are filed.

  2. $ agents ls --status backlog

    See what landed.

  3. $ agents work 47

    Pick one up and run the agent on it.

A confirmed set of backlog issues, ready to pick up locally or hand to a remote agent on the web board.

Spin up an agent and give it secrets

You need a fresh deployed agent with an API key wired into its environment.

  1. $ agents agent create scout --engine superbuilder

    Or run `agents agent new` for an interactive prompt.

  2. $ agents secret create OPENAI_API_KEY --type secret

    Prompts for the value privately if you omit --value.

  3. $ agents secret attach OPENAI_API_KEY scout --as OPENAI_API_KEY

    Applies on the next restart.

  4. $ agents agent restart scout
A running agent named "scout" with your secret mounted as an environment variable.

Connect your Claude or OpenAI subscription

You want an agent to run on your own Claude/OpenAI plan instead of a raw API key.

  1. $ agents provider login claude --agent scout

    Runs `claude setup-token` and saves the OAuth token, attaching it to scout.

  2. $ agents auth --oauth openai --agent scout

    Alternative: the browser OAuth flow for OpenAI/Codex.

  3. $ agents provider ls

    Confirm what is connected and where it is attached.

The agent authenticates against your subscription — no API key to manage.

Add skills from the community

You want to extend an agent with a published ClawHub skill.

  1. $ agents clawhub list --sort popular

    Browse the marketplace.

  2. $ agents clawhub install <hub-skill-id>

    Pulls it into your library.

  3. $ agents skill attach <name> scout

    Attach one or more skills to an agent (applies on restart).

The skill is in your library and live on the agent.

Put your agent on Slack or Telegram

You want to talk to a deployed agent from a chat platform.

  1. $ agents channel set scout slack --bot-token xoxb-… --app-token xapp-… --on

    Telegram, Discord, and WhatsApp work the same way.

  2. $ agents channel ls scout

    Check each channel's status and whether tokens are set.

The agent answers in the channel after it restarts.

Schedule recurring work

You want an agent to run a prompt on a cadence (OpenClaw engine).

  1. $ agents task create scout --name digest --every 1h30m --prompt "summarize new issues"

    Or use --cron "0 9 * * *" / --at <ISO> for one-shots.

  2. $ agents task run scout <jobId>

    Trigger it immediately to test.

  3. $ agents task runs scout <jobId>

    Inspect the run history.

A scheduled task that runs on its own and keeps a run log.

Expose a running app

Your agent is serving something on a port and you want a public URL.

  1. $ agents port start scout 3000 --cmd "npm run dev"

    Starts the dev server in the container and probes it.

  2. $ agents domain add scout --port 3000 --subdomain scout-demo

    A subdomain is live immediately; a --custom domain needs the TXT + verify steps.

  3. $ agents domain verify scout <domainId>

    Only for custom domains — checks the ownership TXT and SSL.

The port is reachable at its subdomain (or your verified custom domain).

Snapshot and roll back a workspace

You want a restore point before a risky change — or to undo one.

  1. $ agents snapshot create scout

    Syncs the workspace to R2 as a new snapshot.

  2. $ agents snapshot ls scout

    List snapshots and copy the CID you want.

  3. $ agents snapshot reset scout <cid>

    Rolls the workspace back (confirms first).

The workspace is captured and recoverable to any snapshot.

Ask the copilot or message an agent

You want help from the platform assistant, or a quick reply from a deployed agent.

  1. $ agents copilot "deploy a research agent and attach my OpenAI key"

    Tool-using assistant; it asks you to approve [y/N] before any mutating action.

  2. $ agents agent scout "what are you working on?"

    Delivers a one-shot turn and relays the reply.

A terminal conversation with the copilot (with approvals) or a direct agent reply.

The interactive REPL

Run agents with no arguments to open a Claude Code–style prompt. Type a task to file and run it; follow-ups continue the same session and re-report the cumulative diff. Press esc to interrupt a turn. Inside the prompt, slash commands drive the board:

agents › add rate limiting to the templates route
  ↳ files a self-driven issue (RUNNING) and streams the work live

agents #42 › also cover the x402 route
  ↳ same session, same issue — follow-ups continue the conversation

agents #42 › /file split the oversized templates handler
  ↳ Claude drafts backlog issues; you pick which to file

agents #42 › /new            # wrap up → issue moves to REVIEW
/newWrap up the session → review.
/work <id>Pick up an existing issue as a session.
/file [brief]Draft backlog issues from context.
/model [id]Show or switch the model.
/agent [name]Show or switch the paired agent.
/copilot [msg]Switch the conversation to the platform copilot.
/talk <name> [msg]Switch the conversation to a deployed agent.
/issueSwitch back to filing issues.
/contextShow the working context.
/mode [m]Show or set the permission mode.
/diffThis session's diff.
/costThis session's spend.
/ls /open /comment /tag /done /rejectBoard operations.
/pr /merge /sync /boardPR + board operations.
/clearClear the screen.
/quitExit the REPL.

Command reference

Every command, grouped. Issue refs accept #numbers everywhere an id is expected. Most listing commands take --json for scripting, and a global --api-base URL overrides the host for one run.

Auth & setup

  • agents login [--no-browser] [--token JWT] [--api-base URL]

    Sign in via the browser; --no-browser pastes a token, --token passes one directly. Verified on save.

  • agents logout

    Clear stored credentials.

  • agents whoami

    Show the working context — identity, paired agent, board, model, repo.

  • agents init

    Guided setup: pick a board + agent, detect the repo, write .agents/config.json.

  • agents model [<id>]

    Show or switch the model (writes through to the board and the paired agent).

Run work

Add --provider claude|anthropic|openrouter to use a connected provider for Claude Code.
  • agents start "<task>" [--tag T]

    Create a self-driven issue + launch the agent; report on exit.

  • agents work <issueId>

    Pick up an existing issue and run the agent on it.

  • agents run "<task>"

    Headless: stream-json mode, full lifecycle unattended.

  • agents file ["<brief>"] [--tag T] [--yes]

    Draft 1–5 backlog issues from repo context; confirm before filing.

  • agents resume

    Re-report the current diff for this repo's in-flight issue.

Chat

  • agents copilot ["<message>"]

    Chat with the platform copilot (tools + approve/deny). No arg → interactive.

  • agents agent <name|id> ["<message>"]

    Message a deployed agent and relay its reply. No message → interactive.

Manage agents

  • agents agent ls [--json]

    List your agents (name · id · engine · status).

  • agents agent create <name> [--engine e] [--template id] [--desc "…"]

    Create an agent. `agent new` is the interactive version.

  • agents agent get <name|id> [--json]

    Full detail — skills, secrets, snapshots, ports, domains, tasks, channels.

  • agents agent restart|status|rm <name|id>

    Restart · show status · delete (rm confirms).

  • agents agent exec <name|id> "<command>" [--cwd dir]

    Run a shell command inside the container.

  • agents agent logs <name|id>

    Print the tail of the container logs.

  • agents agent update <name|id> [check|apply] [--tag latest|0.3.0]

    Check / apply an in-container engine update.

  • agents agent versions <name|id> [--json]

    Current + available agent image versions.

  • agents agent engines [--json]

    List the engines this deployment has enabled.

Secrets

  • agents secret ls [--json]

    List secrets with attached agents + mount aliases.

  • agents secret create <PATH> [--value V] [--type secret|variable]

    Create a secret (prompts for the value if omitted).

  • agents secret update <id|path> [--value V]

    Change a secret's value (keeps attachments).

  • agents secret attach <id|path> <agent> [--as ENV]

    Attach to an agent (applies on restart).

  • agents secret detach <id|path> <agent>

    Remove a secret from one agent.

  • agents secret rm <id|path>

    Delete a secret.

AI providers

Connect a subscription or key; --agent attaches it.
  • agents auth --oauth <openai|anthropic> [--agent A]

    Connect a provider subscription via OAuth (browser sign-in).

  • agents provider login claude [--agent A]

    Run `claude setup-token` and save the OAuth token (Claude subscription).

  • agents provider login codex [--agent A]

    Browser OAuth (PKCE) for the OpenAI/Codex subscription.

  • agents provider set <anthropic|openai|openrouter|venice> [--value KEY] [--agent A]

    Save a raw provider API key.

  • agents provider ls

    Show connected providers and attached agents.

Skills & ClawHub

  • agents skill ls [--json]

    List your skill library.

  • agents skill create --cid CID --name N [--desc "…"] [--env A,B]

    Register a skill in your library from a CID.

  • agents skill attach <cid|name> [<cid|name> …] <agent>

    Attach one or more skills to an agent (batched).

  • agents skill detach <cid|name> <agent>

    Detach a skill from one agent.

  • agents skill delete <cid|name> [--yes]

    Remove a skill from your whole library (≠ detach).

  • agents clawhub list [--category c] [--sort popular|newest|name] [--q text]

    Browse the ClawHub community marketplace.

  • agents clawhub get <slug>

    Show a hub skill's detail.

  • agents clawhub install <hub-skill-id>

    Install a hub skill into your library.

Channels

Telegram · Slack · Discord · WhatsApp. Applies on restart.
  • agents channel ls <agent> [--json]

    Show each channel's status (+ token-set state).

  • agents channel set <agent> <channel> --bot-token T [--app-token T] [--on|--off]

    Configure a channel (preserves enabled state unless --on/--off).

  • agents channel disable <agent> <channel>

    Turn a channel off but keep its tokens.

  • agents channel rm <agent> <channel>

    Remove a channel + clear its tokens.

Scheduled tasks

Cron / scheduled runs — OpenClaw engine.
  • agents task ls <agent>

    List scheduled tasks.

  • agents task create <agent> --name X (--every 1h30m|--cron "expr"|--at ISO) (--prompt "…"|--event "…")

    Create a scheduled task.

  • agents task update <agent> <jobId> [--name|--every|--cron|--prompt|--on|--off]

    Patch an existing task (only the fields you pass).

  • agents task run <agent> <jobId>

    Run a task now.

  • agents task runs <agent> <jobId> [--limit N]

    Show a task's run history.

  • agents task toggle <agent> <jobId> [--off]

    Toggle a task on/off.

  • agents task rm <agent> <jobId>

    Delete a task.

Domains & ports

  • agents domain ls <agent> [--json]

    List subdomains / custom domains.

  • agents domain add <agent> --port N [--subdomain s] [--custom example.com] [--protected]

    Register a subdomain (immediate) or custom domain (needs TXT + verify).

  • agents domain update <agent> <domainId> [--port N] [--protected|--public]

    Change a domain's target port / auth.

  • agents domain challenge <agent> <example.com>

    Print the TXT record to add for a custom domain.

  • agents domain verify <agent> <domainId>

    Finalize a custom domain (TXT + SSL check).

  • agents domain rm <agent> <domainId>

    Remove a domain.

  • agents port ls <agent> [--json]

    List forwarded container ports.

  • agents port add <agent> <port>:<prefix> [--public]

    Forward a port at a path prefix (e.g. 3000:/app).

  • agents port start <agent> <port> [--path /x] [--cmd "<command>"]

    Start a dev server on a port and probe it.

  • agents port rm <agent> <port|prefix>

    Remove a forwarded port.

Snapshots & devices

  • agents snapshot ls|status <agent> [--json]

    List workspace snapshots · R2 sync status.

  • agents snapshot create <agent>

    Sync the workspace to R2 (new snapshot).

  • agents snapshot reset <agent> <cid> [--yes]

    Roll the workspace back to a snapshot.

  • agents device ls <agent> [--json]

    List pending + paired device-pairing requests.

  • agents device approve <agent> <requestId>

    Approve a pairing request (or device approve-all).

Config & templates

  • agents config get|set|validate <agent> ['<json>' | --file path]

    Read · replace · validate the agent's engine config.

  • agents template ls [--category c] [--featured] [--json]

    Browse the template marketplace.

  • agents template get <slug> · template mine

    Show a template's detail · your own submissions.

  • agents template validate|submit <gitUrl> [--ref main] [--path dir]

    Validate / publish a template from a git repo.

  • agents feedback "<message>"

    Send a feature request / bug report to the Pinata team.

Board

  • agents ls [--status S] [--board B] [--json]

    List issues — status, #, title, priority, PR, cost, tags.

  • agents open <issueId>

    Show one issue's detail.

  • agents comment <issueId> "<text>"

    Post a comment.

  • agents tag <issueId> "<a,b,c>"

    Replace the issue's tags (max 3).

  • agents done <issueId>

    Move an issue to done.

  • agents reject <issueId>

    Move an issue back to backlog.

Pull requests

Uses the GitHub gh CLI.
  • agents pr <issueId> [--draft] [--title T] [--body B]

    Push the branch + open a GitHub PR. Idempotent.

  • agents merge <issueId> [--squash|--merge|--rebase]

    Merge the PR → mark merged + done.

  • agents sync [<issueId>]

    Refresh PR state from GitHub and print it.

The CLI itself

  • agents upgrade

    Update to the latest published CLI (also repairs a broken install).

  • agents --version

    Print the installed version.

Working context & files

agents init resolves and persists the context every session runs under — shown in the REPL banner, agents whoami, and /context.

What gets resolved

  • Board — where filed issues land.
  • Agent — a workspace agent this repo is paired with, for visibility (issues stay self-driven).
  • Model — taken from the board's override and passed as --model to every local run, so local and remote use the same model.
  • Repo + integration — the git origin, checked against your connected GitHub logins.

Where things live

~/.config/agents/credentials.jsonYour JWT, email, and host (mode 0600).
<repo>/.agents/config.jsonBoard, repo, paired agent, model, permission mode.
<repo>/.agents/state.jsonIn-flight issue + offline outbox (gitignored).
The CLI auto-updates on startup when interactive (a TTY). Disable it with --no-update, AGENTS_AUTO_UPDATE=0, or "autoUpdate": false in credentials.json. A failed self-update is non-fatal — your command still runs.