CLI Reference
This is the command reference for the anode binary. It lists the command
surface and the command families that consume each run-scoped flag.
Root Command
Section titled “Root Command”anodeOpen the interactive TUI.
anode -x "prompt"Run one prompt without opening the TUI.
Global Flags
Section titled “Global Flags”Cobra exposes these persistent flags on many subcommands. Runtime support is command-specific, and unsupported flag/command combinations are rejected before the command runs.
| Flag | Use |
|---|---|
-x, --execute | Run a prompt from the root command. |
--profile <name> | Profile for execute, runs start, tools, and review. |
--model provider/model | Model override for execute, review, and runs start. |
--max-turns <n> | Turn limit for execute, review, and runs start. |
| `—approval ask | auto |
--run-label <label> | Label for execute and runs start; whitespace-only daemon run labels are rejected. |
--allow-tool <name> | Repeat or comma-separate tool allowlist for execute. |
--stream-json | JSON events for execute, review, and attach. |
--stream-json-input | JSON stdin for execute; requires --stream-json. |
--archive | Archive the session thread after an execute run completes. |
--stats | Print token usage and cost summary after execute runs. |
Unsupported run-scoped flags are rejected instead of being silently ignored.
For example, --allow-tool, --archive, --stats, and
--stream-json-input are execute-only.
execute
Section titled “execute”Alias: exec.
anode execute "summarize this repository"anode exec "summarize this repository"anode -x "summarize this repository"If no prompt argument is supplied, Anode reads stdin:
cat failure.log | anode executeCommon flags:
anode -x \ --profile study \ --model anthropic/claude-sonnet-4-6 \ --max-turns 20 \ --approval auto \ --allow-tool read \ --allow-tool finder \ "debug this failure"review
Section titled “review”anode reviewanode review "focus on auth and data exposure"anode review --base mainanode review --base main --checksanode review --base main --stream-jsonFlags:
| Flag | Use |
|---|---|
--base <ref> | Diff against a base ref. |
--checks | Run .agents/checks/*.md project checks. |
--profile <name> | Review profile override. Defaults to review behavior. |
--model provider/model | Model override for review runs. |
--max-turns <n> | Turn limit for each review run. |
| `—approval ask | auto |
--stream-json | Emit JSON events. |
Authenticate with OpenAI.
anode loginanode login --device-auth--device-auth is useful on remote or headless machines.
doctor
Section titled “doctor”anode doctorChecks local Anode health without making a model request. It reports the
workspace, harness artifact root, config discovery status, provider
configuration, MCP/LSP config diagnostics, effective tool contract status, and
local harness artifact health. The tools section includes smoke-mode counts for
the effective runtime tool contracts. The harness section includes run/report
failure counts, bounded failed samples, and malformed ledger diagnostics. It
labels that rollup as all-history and also prints current-head evidence, which
shows whether this git commit has fresh harness evidence or needs a diagnostic
run before it is trusted. It uses the shared harness status reader, so stale
running ledgers older than the recovery cutoff may be marked failed before they
are reported; it does not replay prior runs or make model requests.
It exits nonzero when config loading, extension config diagnostics, or tool
contracts fail.
harness
Section titled “harness”anode harness listanode harness list --limit 5anode harness contextanode harness context --limit 3anode harness checkanode harness check --gate contractsanode harness check --gate config-authanode harness check --gate provideranode harness check --gate provider-liveanode harness check --gate mcpanode harness check --gate lspanode harness check --gate tuianode harness check --gate fastanode harness check --gate fullanode harness check --gate vetanode harness check --gate buildanode harness check --gate tool-smokeanode harness check --gate benchanode harness check --gate bench-validationanode harness check --gate bench-heldoutanode harness check --gate localanode harness check --gate allanode harness statusanode harness status --limit 10anode harness status --scope latestanode harness status --scope current-headanode harness smokeanode harness bench --dry-runanode harness bench --suite heldoutanode harness bench --case permission-denialanode harness bench --agentanode harness bench --agent --agent-profile study --agent-model provider/model --agent-max-turns 8anode harness bench --jobs 4anode harness inspect <run-id>anode harness inspect <run-id> --limit 0anode harness ledger <run-id>anode harness replay <run-id>anode harness replay <run-id> --limit 20anode harness replay <run-id> --execute-read-only --allow-external-read --allow-workspace-drift --allow-runtime-driftharness check writes a check report under .anode-harness/checks/ and exits
nonzero for failed gates. --gate can be repeated or comma-separated. The
config-auth gate includes main config, auth loading, MCP config diagnostics,
and LSP config diagnostics. The optional mcp gate connects configured MCP
servers and records per-server status/tool/resource counts in mcp.json; the
optional lsp gate records configured language-server command availability in
lsp.json without launching the servers. The provider-live gate is opt-in
because it spends a live provider request. The bench gate runs the benchmark
fixture dry-run and links the benchmark report from bench.json using both an
absolute benchmark_report_path and a portable benchmark_report_artifact
relative to .anode-harness/. Use bench-validation or bench-heldout when
the validation and held-out fixture splits should be checked and logged
separately.
JSON mode prints the report but still exits nonzero when check, smoke, or
bench records ok: false.
harness list returns recent run ledgers; --limit 0 means all runs and
negative limits are rejected by both the CLI and harness summary reader.
harness status scans all local run ledgers plus check, smoke, benchmark, and
replay reports for pass/fail counts, then applies --limit only to displayed
rows. It exits nonzero if any scanned run/report failed or if artifact
diagnostics were found. Use --json for the structured rollup. Use
--scope latest for a current-health rollup that evaluates the newest run and
newest diagnostic artifact per kind while printing the excluded historical
counts. --scope current-head evaluates only evidence captured at the current
git HEAD, including replay reports attached to runs from that HEAD; it fails
with a scope diagnostic when no evidence exists for the current commit or when
the live workspace has uncommitted non-harness changes not covered by committed
evidence. Use the default scope when auditing preserved failures.
Check, smoke, benchmark, and replay text output includes compact environment
evidence where available; the JSON reports include the full runtime/git snapshot,
and harness status surfaces the saved git provenance on diagnostic report
summaries. Benchmark rows also include validation vs held-out suite scores when
the report records them.
harness context prints the same compact harness context used by the TUI and
agent prompt builder. It includes ledger paths, failure snippets, validation
failure snippets, run durations, artifact counts, and recent
check/smoke/bench/replay report summaries with artifact paths and benchmark
outcome counts. It accepts
--json for automation.
harness list and harness context also surface malformed ledger diagnostics.
harness smoke runs deterministic local tool smoke paths where possible,
validate-only paths for interactive, delegated, web, and provider-backed tools,
uses the configured runtime tool surface, and writes
.anode-harness/smoke/<run>/report.json. Executed smoke rows include
changed_files; change_scan_error fails the smoke report if Anode cannot
prove fixture changes.
harness bench --dry-run validates the benchmark fixture definitions without
running their commands. harness bench runs the local fixture validation
commands in fixture runner mode. harness bench --agent runs each case
through headless Anode in the detached worktree before validation and records
the child run ledger on the case row. The agent runner is pre-constrained to a
small benchmark tool set, checks file edit/create/patch targets against
allowed_write_scopes before execution, and rejects shell commands that appear
to write. Restricted agent runs also reject state-writing and interactive tools
because those effects cannot be represented by file write scopes. Use
--agent-profile, --agent-model, and --agent-max-turns to pin
agent routing for repeatable benchmark runs, and --jobs <n> to run independent
cases with bounded concurrency. Benchmark reports record aggregate scores,
per-suite validation/held-out scores, case-scoped failures, outcomes, runner
mode, run config, parallelism, timings, changed files, and scope violations
under .anode-harness/bench/. Use --suite validation or --suite heldout
to run one split at a time; use --case <id> for a focused fixture or repeat it
for a small case set. Suite and case filters are saved in the report. Non-dry
benchmark runs require a git workspace so write-scope enforcement cannot be
silently disabled. Cases run in temporary detached worktrees from current
HEAD, so commit the candidate state before benchmarking it. A dirty live
workspace fails the top-level report and lists the changed files. Text output
shows the aggregate score, pass/fail/planned counts, runner mode, fixture root,
fixture files, git HEAD, history path, history quarantine path when a corrupt
history file was moved aside, aggregate token/cost usage when available, and
trend when available, plus per-suite counts and per-case suite, runner,
artifact, change, scope-violation, responsible receipt, missing-required-change,
and diff paths. Cases with
required_changed_files print missing_required=... when validation passed
without required file changes. Runner-backed scope violations preserve the child
run ledger in the benchmark artifact directory when available, so
responsible_path= can be inspected after the detached worktree is removed.
Trend output includes token and cost deltas when both benchmark runs recorded
usage. Trend baselines are selected only when the saved run config is
compatible; otherwise the trend is no-compatible-baseline.
harness inspect, ledger, and replay read filesystem-backed run artifacts
from .anode-harness/runs/. harness inspect --limit 0 prints every detail
record instead of the default recent subset. Text inspect and replay include run
timing and token/cost usage when recorded plus compact validation stdout,
stderr, error, timeout, class, working directory, provider retry rows, and recovery evidence when present. Inspect also
prints the run artifacts[] ledger so receipt and diff files are discoverable
from text output. harness list prints each run’s artifact-relative ledger path
when available.
replay is non-executing: it classifies recorded steps as safe read-only
candidates, inspect-only writes/executes, blocked calls, failed calls, or
unknown records. Replay output includes provider retry rows so hidden rate-limit
or server-error backoff is visible during audits. replay --limit <n> prints only the last n records in each
section while preserving the original tool-call numbering; --limit 0 prints
the full replay plan. Add --execute-read-only to rerun only successful local
read-only candidates that have raw call arguments recorded; external-read
candidates stay skipped unless --allow-external-read is supplied, and every
other receipt is still printed as skipped or inspect-only. Execution is blocked
when the current workspace is dirty or at a different git HEAD than the recorded run
unless --allow-workspace-drift is supplied. Execution is also blocked when the
recorded profile/model, permission summary, tool registry surface, or per-tool
permission class differs from the current runtime unless
--allow-runtime-drift is supplied. Executed
read-only replays write a timed replay artifact under the original run,
update the artifact ledger, and print the saved report path. If replayed
stdout, stderr, error, or exit status no longer matches the original receipt
summary, replay exits non-zero and records the mismatch fields plus a capped
diff in the report.
Pass --json to harness list, check, smoke, or bench when automation
needs structured output. See Harness, doctor, and ledgers.
config
Section titled “config”anode configanode config pathanode config listanode config lsanode config doctorconfig is the same as config list. config path prints one absolute effective config path
and exits nonzero when no config file is effective. If $ANODE_CONFIG is set
but cannot be loaded, stdout still prints the fallback path and stderr carries
the warning. config list shows config discovery order and per-candidate
status; config ls is an alias. config doctor validates discovery, parsing,
duplicate keys, and safety checks for CI or release gates; successful checks
end with Config doctor passed.. See
Configuration for the loading precedence model.
anode lspanode lsp listanode lsp lsanode lsp doctorlsp is the same as lsp list. lsp list shows configured and auto-detected
language servers. lsp doctor validates language-server config discovery and
parsing; successful checks end with LSP diagnostics passed.. See
Language Server Protocol for config file locations and server setup.
anode toolsanode tools listanode tools lsanode tools list --profile reviewanode tools show readanode tools readanode tools use read --arg path=README.mdanode tools use chart --arg type=bar --arg-json data='{"fixed":3,"open":1}'tools is the same as tools list. tools <name> is the same as
tools show <name>; tools ls is an alias. tools list shows built-in, MCP,
toolbox, and process-plugin tools that are currently registered. tools show <name>
prints the tool type and permission level. tools use invokes read-only tools
(auto_read and external_read) directly. Pass raw string arguments with
--arg key=value, structured values with --arg-json key=<json-value>, or a
full object with --json. Pass --allow-non-read only when you intentionally
want to run tools that write state, write files, execute commands, delegate, or
ask interactively.
skills
Section titled “skills”anode skillsanode skills listanode skills lsanode skills info code_reviewanode skills code_reviewanode skills show code_reviewanode skills add ./release-skill --name releaseanode skills add ./release-skill/SKILL.md --name release --target .agents/skillsanode skills remove releaseanode skills rm releaseskills is the same as skills list. skills <name> is the same as
skills info <name>. skills add installs from a local SKILL.md file or
skill directory. The default target is ~/.config/anode/skills; use
--overwrite to replace an existing installed skill.
permissions
Section titled “permissions”anode permissionsanode permissions test bash --command "go test ./..."anode permissions bash --command "go test ./..."anode permissions listanode permissions lsanode permissions add reject bash --match 'command=rm -rf *'anode permissions add ask edit_file --match 'path=*.lock' --workspacepermissions is the same as permissions list; permissions ls is an alias.
permissions <tool> is the same as permissions test <tool> and accepts the
same test flags. permissions add prepends a rule to the global config by
default. Test-only flags such as --command, --path, --query, and --arg
require a tool name. Pass --workspace to update .agents/permissions.json.
permissions test
Section titled “permissions test”Preview a permission decision without running the tool.
anode permissions test bash --command "go test ./..."anode permissions test read --path README.mdanode permissions test finder --query "func main"anode permissions test bash --context child_run --arg command="git status"anode permissions test bash --preset careful --command "rm -rf tmp"Flags:
| Flag | Default | Use |
|---|---|---|
--context | main_run | main_run or child_run. |
--preset | - | Include a preset for this inspection: unrestricted, careful, or strict; yolo is an alias for unrestricted. |
--command | - | Set command argument. |
--path | - | Set path argument. |
--query | - | Set query argument. |
--arg key=value | - | Add any other argument. Repeatable. |
anode mcpanode mcp listanode mcp lsanode mcp list --connectanode mcp doctoranode mcp statusanode mcp infoanode mcp info docsanode mcp toolsanode mcp resourcesanode mcp read docs docs://introanode mcp reloadanode mcp add docs --url https://example.com/mcpanode mcp add local --env TOKEN=... -- npx -y @modelcontextprotocol/server-filesystem .anode mcp remove docsanode mcp trustanode mcp approveanode mcp trust /path/to/projectmcp is the same as mcp list. mcp <server-name> is the same as
mcp info <server-name>; mcp ls is an alias.
mcp doctor validates MCP config and tests configured server connections;
successful checks end with MCP doctor passed..
--timeout applies only to connected MCP operations:
anode mcp list --connect --timeout 20sUse it with mcp <server-name>, mcp doctor, mcp resources, mcp read,
mcp status, mcp info, mcp tools, mcp reload, or mcp list --connect.
Explicit timeout values must be greater than zero.
OAuth commands for remote MCP servers:
anode mcp oauth statusanode mcp oauth login <server-name> --client-id <client-id>anode mcp oauth login <server-name> --server-url https://mcp.example.com --client-id <client-id> --scopes "read write"anode mcp oauth logout <server-name>oauth login requires --client-id. --server-url is optional only when the
server URL exists in user MCP config or in a trusted workspace MCP config.
anode hooksanode hooks listanode hooks lsanode hooks doctorhooks is the same as hooks list; hooks ls is an alias. It inspects shell
hooks and process plugin hook configuration. hooks doctor validates that
configuration; successful checks end with Hook diagnostics passed..
plugins
Section titled “plugins”Alias: plugin.
anode pluginsanode plugins listanode plugins lsanode plugins reloadanode plugins activityanode plugins docanode plugins exec /path/to/pluginplugins is the same as plugins list; plugins ls is an alias. plugins doc prints the process plugin protocol. plugins exec discovers one plugin
executable from a path and lists its contributed tools without requiring the
plugin to be in config. plugins activity explains that process plugin activity
is not persisted and points to anode plugins list for configured plugin paths
and contributed tools.
debug bundle
Section titled “debug bundle”anode debug bundleanode debug bundle --output /tmp/anode-debug.zipanode debug bundle --thread <thread-id>Creates a support bundle containing config, selected environment details, and optionally a thread. Use it when reporting a reproducible Anode issue.
daemon
Section titled “daemon”anode daemonanode daemon --addr 127.0.0.1:7433anode daemon --addr /tmp/anode.sockWith no --addr, Anode listens on:
~/.config/anode/daemon.sockManage daemon runs.
anode runsanode runs --limit 10anode runs listanode runs list --limit 10anode runs start "investigate flaky tests"anode runs start --profile study --model openai/gpt-5.5 --max-turns 10 --approval auto --run-label ci "summarize failures"anode runs cancel <run-id>Use a non-default daemon address:
anode runs --daemon 127.0.0.1:7433anode runs --addr 127.0.0.1:7433runs is the same as runs list. Use --limit <n> to return at most n
runs; 0 means all runs. --addr is an alias for --daemon.
attach
Section titled “attach”Attach to a daemon run.
anode attach <run-id>anode attach --stream-json <run-id>anode attach <run-id> --daemon 127.0.0.1:7433anode attach <run-id> --addr 127.0.0.1:7433attach accepts the same --daemon and --addr daemon address flags as
runs.
threads
Section titled “threads”anode threadsanode threads listanode threads lsanode threads search "release notes"anode threads "release notes"anode threads read <thread-id>anode threads markdown <thread-id>anode threads export <thread-id>anode threads usage <thread-id>threads is the same as threads list. threads <query> is the same as
threads search <query>; threads ls is an alias.
Use --limit <n> to return at most n recent or matching threads.
Thread list/search limits and read/markdown --max-items values must be
greater than zero. threads export --max-items 0 exports all messages/events.
update
Section titled “update”anode updateanode update --forceanode update --version v1.2.3| Flag | Use |
|---|---|
--force | Re-download even if already on latest. |
--version <version> | Install a specific version instead of latest. |
Downloads the binary for your platform, verifies the SHA-256 checksum, and atomically replaces the running binary.
uninstall
Section titled “uninstall”anode uninstall --dry-runanode uninstallanode uninstall --forceWithout --dry-run or --force, Anode asks you to type uninstall.
completion
Section titled “completion”anode completion bashanode completion zshanode completion fishanode completion powershellPrints shell completion scripts generated by Cobra.
Exit Behavior
Section titled “Exit Behavior”For headless commands, exit code 0 means success. Non-zero means Anode could
not complete the command, the run failed, validation failed, a provider was not
available, or a required prompt/config value was missing.
Keep going: