---
title: "CLI reference · coding.sh docs"
description: "Every coding.sh command and option, generated from the CLI's own --help output at build time."
canonical: https://coding.sh/docs/cli
human_url: https://coding.sh/docs/cli
markdown_url: https://coding.sh/docs/cli.md
agents_url: https://coding.sh/agents.md
llms_url: https://coding.sh/llms.txt
updated: 2026-11-11
---

# CLI reference

Every coding.sh command and option, generated from the CLI's own --help output at build time.

Generated at build time from `coding.sh --help` (version 0.1.5). Run `coding.sh <command> --help` for the same text in your terminal, or add `--json` for machine-readable metadata. Each command has its own page with its full help and its subcommands.

## Global options

Every command accepts these.

global options

```
      --json         Print one JSON document on stdout
      --no-color     Disable color (also NO_COLOR=1)
      --debug        Show stack traces on errors
  -h, --help         Show help
      --store <URL>  Read and write this index store instead of the configured one (also CODING_SH_STORE_URL); skips auto-ingest
      --blobs <URL>  Blob store to use with --store (also CODING_SH_BLOB_URL; a postgres:// index keeps blobs in the same DB)
  -v, --version      Print the version
```

With `--json`, a command prints one JSON document on stdout and errors as one JSON line on stderr. Usage errors exit with code 2.

## Commands

### Capture

| Command | What it does |
| --- | --- |
| [`init`](https://coding.sh/docs/cli/init) | Set up capture hooks and the MCP server for every detected agent |
| [`doctor`](https://coding.sh/docs/cli/doctor) | Check agents, hooks, spool, store and the OTLP port |
| [`status`](https://coding.sh/docs/cli/status) | Show capture totals and the latest session |
| [`statusline`](https://coding.sh/docs/cli/statusline) | Print a Claude Code status line (model, cost, worst flag), or install it ([install](https://coding.sh/docs/cli/statusline#cmd-statusline-install), [uninstall](https://coding.sh/docs/cli/statusline#cmd-statusline-uninstall)) |
| [`ingest`](https://coding.sh/docs/cli/ingest) | Move captured hook events from the spool into the index |
| [`run`](https://coding.sh/docs/cli/run) | Run any agent command and capture the session |
| [`collector`](https://coding.sh/docs/cli/collector) | Start a local OTLP/HTTP receiver for agents that export traces ([import](https://coding.sh/docs/cli/collector#cmd-collector-import)) |
| [`proxy`](https://coding.sh/docs/cli/proxy) | Run a local Anthropic/OpenAI API proxy that logs every model call ([status](https://coding.sh/docs/cli/proxy#cmd-proxy-status), [stop](https://coding.sh/docs/cli/proxy#cmd-proxy-stop), [env](https://coding.sh/docs/cli/proxy#cmd-proxy-env)) |
| [`serve`](https://coding.sh/docs/cli/serve) | Production server: OTLP + native ingest, viewer, health and metrics on one port ([keygen](https://coding.sh/docs/cli/serve#cmd-serve-keygen), [healthcheck](https://coding.sh/docs/cli/serve#cmd-serve-healthcheck)) |
| [`uninstall`](https://coding.sh/docs/cli/uninstall) | Remove coding.sh hooks and MCP entries from every agent |

### Explore

| Command | What it does |
| --- | --- |
| [`sessions`](https://coding.sh/docs/cli/sessions) | List captured sessions |
| [`show`](https://coding.sh/docs/cli/show) | Show a session timeline with subagents and latency |
| [`tree`](https://coding.sh/docs/cli/tree) | Show a whole multi-agent run as one tree, with rolled-up totals |
| [`replay`](https://coding.sh/docs/cli/replay) | Step through a session and see what it did to each file it touched |
| [`attribution`](https://coding.sh/docs/cli/attribution) | Which agent session wrote the lines each commit added; export them as Agent Trace ([export](https://coding.sh/docs/cli/attribution#cmd-attribution-export)) |
| [`blame`](https://coding.sh/docs/cli/blame) | git blame with the agent session that wrote each line |
| [`diff-calls`](https://coding.sh/docs/cli/diff-calls) | Show what changed between two model calls, and why the second missed the prompt cache |
| [`search`](https://coding.sh/docs/cli/search) | Full-text search over prompts, replies and tool calls |
| [`usage`](https://coding.sh/docs/cli/usage) | Tokens, cost, turns and cache hits by agent, model or day |
| [`cache`](https://coding.sh/docs/cli/cache) | Score prompt-cache health and name what breaks the cached prefix ([doctor](https://coding.sh/docs/cli/cache#cmd-cache-doctor)) |
| [`stats`](https://coding.sh/docs/cli/stats) | Sessions, failures, cost, tokens and latency per day or week, split by agent, model, repo or flag |
| [`sql`](https://coding.sh/docs/cli/sql) | Run one read-only SQL query against the SQLite index |
| [`export`](https://coding.sh/docs/cli/export) | Stream sessions, events or labels as JSONL or CSV, or write raw traces to a directory |
| [`ui`](https://coding.sh/docs/cli/ui) | Open the local session viewer |
| [`mcp`](https://coding.sh/docs/cli/mcp) | Serve captured sessions to agents over MCP (stdio) |

### Evaluate

| Command | What it does |
| --- | --- |
| [`eval`](https://coding.sh/docs/cli/eval) | Build eval suites from sessions, skills or cases, and run them ([init](https://coding.sh/docs/cli/eval#cmd-eval-init), [run](https://coding.sh/docs/cli/eval#cmd-eval-run), [candidates](https://coding.sh/docs/cli/eval#cmd-eval-candidates), [new](https://coding.sh/docs/cli/eval#cmd-eval-new), [import](https://coding.sh/docs/cli/eval#cmd-eval-import), [validate](https://coding.sh/docs/cli/eval#cmd-eval-validate), [crosscheck](https://coding.sh/docs/cli/eval#cmd-eval-crosscheck), [audit](https://coding.sh/docs/cli/eval#cmd-eval-audit), [trigger](https://coding.sh/docs/cli/eval#cmd-eval-trigger), [list](https://coding.sh/docs/cli/eval#cmd-eval-list), [export](https://coding.sh/docs/cli/eval#cmd-eval-export)) |
| [`dataset`](https://coding.sh/docs/cli/dataset) | Manage versioned datasets of cases ([add](https://coding.sh/docs/cli/dataset#cmd-dataset-add), [import](https://coding.sh/docs/cli/dataset#cmd-dataset-import), [list](https://coding.sh/docs/cli/dataset#cmd-dataset-list)) |
| [`exp`](https://coding.sh/docs/cli/exp) | Run a task over a dataset, compare experiments and sweep configs ([ab](https://coding.sh/docs/cli/exp#cmd-exp-ab), [replay](https://coding.sh/docs/cli/exp#cmd-exp-replay), [run](https://coding.sh/docs/cli/exp#cmd-exp-run), [session](https://coding.sh/docs/cli/exp#cmd-exp-session), [compare](https://coding.sh/docs/cli/exp#cmd-exp-compare), [regrade](https://coding.sh/docs/cli/exp#cmd-exp-regrade), [aa](https://coding.sh/docs/cli/exp#cmd-exp-aa), [sweep](https://coding.sh/docs/cli/exp#cmd-exp-sweep), [metrics](https://coding.sh/docs/cli/exp#cmd-exp-metrics), [plateau](https://coding.sh/docs/cli/exp#cmd-exp-plateau), [show](https://coding.sh/docs/cli/exp#cmd-exp-show), [list](https://coding.sh/docs/cli/exp#cmd-exp-list), [status](https://coding.sh/docs/cli/exp#cmd-exp-status)) |
| [`score`](https://coding.sh/docs/cli/score) | Add and list typed scores on sessions, events, cases and runs ([add](https://coding.sh/docs/cli/score#cmd-score-add), [list](https://coding.sh/docs/cli/score#cmd-score-list), [config](https://coding.sh/docs/cli/score#cmd-score-config), [configs](https://coding.sh/docs/cli/score#cmd-score-configs)) |
| [`judge`](https://coding.sh/docs/cli/judge) | Grade one output or the slop in captured diffs, or check an LLM judge or a test verifier against human labels ([grade](https://coding.sh/docs/cli/judge#cmd-judge-grade), [slop](https://coding.sh/docs/cli/judge#cmd-judge-slop), [calibrate](https://coding.sh/docs/cli/judge#cmd-judge-calibrate), [sample](https://coding.sh/docs/cli/judge#cmd-judge-sample)) |
| [`toolevals`](https://coding.sh/docs/cli/toolevals) | Measure how well agents use a CLI, MCP server or API ([init](https://coding.sh/docs/cli/toolevals#cmd-toolevals-init), [surface](https://coding.sh/docs/cli/toolevals#cmd-toolevals-surface), [validate](https://coding.sh/docs/cli/toolevals#cmd-toolevals-validate), [run](https://coding.sh/docs/cli/toolevals#cmd-toolevals-run), [compare](https://coding.sh/docs/cli/toolevals#cmd-toolevals-compare), [compress](https://coding.sh/docs/cli/toolevals#cmd-toolevals-compress), [show](https://coding.sh/docs/cli/toolevals#cmd-toolevals-show), [traces](https://coding.sh/docs/cli/toolevals#cmd-toolevals-traces)) |
| [`workflows`](https://coding.sh/docs/cli/workflows) | Capture, measure and A/B-test multi-agent workflow runs ([list](https://coding.sh/docs/cli/workflows#cmd-workflows-list), [import](https://coding.sh/docs/cli/workflows#cmd-workflows-import), [show](https://coding.sh/docs/cli/workflows#cmd-workflows-show), [stats](https://coding.sh/docs/cli/workflows#cmd-workflows-stats), [score](https://coding.sh/docs/cli/workflows#cmd-workflows-score), [run](https://coding.sh/docs/cli/workflows#cmd-workflows-run), [compare](https://coding.sh/docs/cli/workflows#cmd-workflows-compare), [replay](https://coding.sh/docs/cli/workflows#cmd-workflows-replay)) |
| [`bench`](https://coding.sh/docs/cli/bench) | Dynamic benchmarks: fresh cases every run, same set for every contender ([new](https://coding.sh/docs/cli/bench#cmd-bench-new), [run](https://coding.sh/docs/cli/bench#cmd-bench-run), [regrade](https://coding.sh/docs/cli/bench#cmd-bench-regrade), [list](https://coding.sh/docs/cli/bench#cmd-bench-list), [show](https://coding.sh/docs/cli/bench#cmd-bench-show), [history](https://coding.sh/docs/cli/bench#cmd-bench-history), [report](https://coding.sh/docs/cli/bench#cmd-bench-report), [schedule](https://coding.sh/docs/cli/bench#cmd-bench-schedule)) |

### Harness

| Command | What it does |
| --- | --- |
| [`improve`](https://coding.sh/docs/cli/improve) | What to fix first in your sessions, the line that fixes it, and whether your last AGENTS.md changes helped ([fix](https://coding.sh/docs/cli/improve#cmd-improve-fix), [check](https://coding.sh/docs/cli/improve#cmd-improve-check)) |
| [`harness`](https://coding.sh/docs/cli/harness) | Snapshot and list agent harness bundles; audit which memory and instruction files agents use ([snapshot](https://coding.sh/docs/cli/harness#cmd-harness-snapshot), [list](https://coding.sh/docs/cli/harness#cmd-harness-list), [audit](https://coding.sh/docs/cli/harness#cmd-harness-audit)) |
| [`compare`](https://coding.sh/docs/cli/compare) | A/B two harness bundles on eval tasks |
| [`refine`](https://coding.sh/docs/cli/refine) | Improve AGENTS.md and skills in tested rounds, and protect their safety rules ([propose](https://coding.sh/docs/cli/refine#cmd-refine-propose), [test](https://coding.sh/docs/cli/refine#cmd-refine-test), [apply](https://coding.sh/docs/cli/refine#cmd-refine-apply), [rollback](https://coding.sh/docs/cli/refine#cmd-refine-rollback), [log](https://coding.sh/docs/cli/refine#cmd-refine-log), [run](https://coding.sh/docs/cli/refine#cmd-refine-run), [protected](https://coding.sh/docs/cli/refine#cmd-refine-protected), [check](https://coding.sh/docs/cli/refine#cmd-refine-check), [mine](https://coding.sh/docs/cli/refine#cmd-refine-mine), [recheck](https://coding.sh/docs/cli/refine#cmd-refine-recheck), [distill](https://coding.sh/docs/cli/refine#cmd-refine-distill), [diagnose](https://coding.sh/docs/cli/refine#cmd-refine-diagnose), [signals](https://coding.sh/docs/cli/refine#cmd-refine-signals), [score](https://coding.sh/docs/cli/refine#cmd-refine-score)) |

### Maintain

| Command | What it does |
| --- | --- |
| [`gateway`](https://coding.sh/docs/cli/gateway) | LLM gateways: detect routing, enrich sessions with billed cost ([status](https://coding.sh/docs/cli/gateway#cmd-gateway-status), [enrich](https://coding.sh/docs/cli/gateway#cmd-gateway-enrich)) |
| [`gc`](https://coding.sh/docs/cli/gc) | Delete expired spool files, blobs and judge cache |
| [`purge`](https://coding.sh/docs/cli/purge) | Remove a leaked secret from the store: events, search, blobs, spool, eval runs |
| [`config`](https://coding.sh/docs/cli/config) | Read and write ~/.coding.sh/config.toml ([get](https://coding.sh/docs/cli/config#cmd-config-get), [set](https://coding.sh/docs/cli/config#cmd-config-set), [path](https://coding.sh/docs/cli/config#cmd-config-path)) |
| [`update`](https://coding.sh/docs/cli/update) | Install the latest coding.sh release |
| [`upgrade-store`](https://coding.sh/docs/cli/upgrade-store) | Migrate the store for this install, or put back the index from before a migration |
| [`version`](https://coding.sh/docs/cli/version) | Print the version |

To set coding.sh up for a user, follow the agent workflow at [/agents.md](https://coding.sh/agents.md).
