CLI Reference

Every agentty subcommand and flag.

agentty is one binary with a handful of subcommands and flags.

Running

agentty                                # run in the current directory
agentty -w ~/code/project              # run against another workspace
agentty -m claude-opus-4-5             # pick a model for the session
agentty --provider openai -m gpt-4o    # run against a different backend
agentty --provider ollama              # local model, no key, no cloud
agentty -k sk-ant-…                     # single-session key, never written to disk
agentty --sandbox on                   # require an OS sandbox for bash/diagnostics

Subcommands

CommandWhat it does
agenttyStart an interactive thread in the workspace.
agentty loginAuthenticate non-interactively (useful over SSH).
agentty logoutClear stored credentials.
agentty statusPrint which auth source will be used.
agentty airgap user@hostRun the agent on a remote host through an SSH SOCKS tunnel.
agentty acpRun headless as an Agent Client Protocol agent for Zed (JSON-RPC over stdio).
agentty mcp-serveServe agentty's native tools over MCP (stdio). Point any MCP client at it.
agentty skillsList discovered Agent Skills with spec-lint diagnostics (exit 1 on warnings — CI-friendly).
agentty --versionPrint agentty <version> and exit.
agentty --helpPrint usage and exit.

Command palette

Inside a thread there are no typed /command literals — press ^K (or / on an empty composer) to open a fuzzy command palette. The fixed command set:

CommandWhat it does
New threadStart a fresh conversation.
Compact contextReplace history with a structured summary to reclaim the context window.
Review changesOpen the diff review pane (also ^R).
Accept all / Reject all changesApply or discard every pending hunk.
Rewind to checkpointJump to an earlier turn's worktree snapshot via a diff-preview picker (git repo + idle session; see Checkpoints).
Cycle profileAsk → Minimal → Write (also S-Tab).
Open model picker / Switch providerChange the active model (^/) or backend (^P).
Open threads / Open planBrowse saved conversations (^J) or view the todo plan (^T).
Run code blockRun a fenced block from the last reply (^G).
Login / QuitSign in, or exit agentty.

Options

These mirror agentty --help exactly.

FlagEffect
-k, --key <key>API-key override for this session; never written to disk.
-m, --model <id>Model id for the session (e.g. claude-opus-4-5).
--provider <p>LLM backend: anthropic (default) or an OpenAI-compatible one — openai · groq · openrouter · together · cerebras · ollama, or a raw host:port. Persisted like -m; switch live with ^P. See Providers & Models.
-p, --profile <mode>ACP permission tier (Zed shows the prompts): ask (default) · minimal (also prompt reads) · write (never prompt reads).
-w, --workspace <dir>Sandbox filesystem tools to this directory (default: cwd). Tools refuse paths outside it. Pass --workspace / to disable the gate.
--sandbox <mode>Wrap bash/diagnostics in an OS-native sandbox. auto (default) · on (require a backend) · off (disable).
-V, --versionPrint the agentty version and exit.
-h, --helpShow usage and exit.

Air-gap flags

Passed to agentty airgap — see agentty airgap --help.

FlagEffect
--setupCopy credentials to the remote on first run.
--acpPrint a ready-to-paste Zed agent_servers config that tunnels agentty acp over ssh stdio. Flags after it are forwarded to the remote agent. See Zed / ACP.
--remote-agentty <path>Path to agentty on the remote if it isn't on PATH.