Docs
CLI cheat sheet
Every shell command in the Go binary. The words you type inside a session are on workflows.
Run a task
| Command | What it does |
|---|---|
captain "<task>" | Route one task: triage, pick a leg, run it, assess it |
captain with <leg> "<task>" | Force one leg for this task (openshell uses the sandbox runner) |
captain --prefer quality|speed|save "<task>" | Lane preference: quality and save rotate legs; the director picks inside speed |
captain --until "<cmd>" [--max-iters 5] "<task>" | Loop until the shell command exits 0 |
captain --no-manager "<task>" | Skip the director; pure heuristic ladder |
captain | Interactive REPL in a terminal |
Privacy before you commit
| Command | What it does |
|---|---|
captain leakcheck --staged / --message-file F / --pre-push / FILE… | Refuse text that names a private project, paper, person or tool in ~/.config/captain/private-names. Exit 3 lists hits. The captaincode repo enables git hooks that run this on commit and push |
captain private-names / add|dismiss|remove NAME… / suggest [DIR] | The list leakcheck reads; same as /private in the TUI |
OpenShell (experimental)
| Command | What it does |
|---|---|
captain openshell profiles | Generated sandbox inference profiles from the registry |
captain openshell qualify | Run the pilot fixture so a profile may be selected for new tasks |
captain openshell --resume <run-dir> | Resume a checkpointed sandbox sequence |
Requires prepared OpenShell env vars. See OpenShell docs and upstream CONFIGURATION.md.
Setup and health
| Command | What it does |
|---|---|
captain doctor | Build identity, toolchain pins, capability probes, leg readiness; warns if CAPTAIN_DIRECTOR names a leg that is not ready |
captain doctor --rehearse | Clean-machine install/upgrade/rollback rehearsal |
captain init [--check] | Write worker permissions, the captain provider, the slash commands and the env scaffold; --check reports what would change without writing |
captain upgrade [--check] [--no-restart] | Update claude, cursor-agent, opencode and captain with each tool's own updater; restart services only when nothing is running |
captain upgrade --models [--apply] | Model pins the ranking flagged as outdated; --apply writes the new pins |
captain legs / legs caps | Active legs (transport, model, price, prior, context) and their capabilities |
captain legs add <id> <provider/model> [flags] | Add or update a leg without a rebuild; captain init then adds its TUI entries |
captain legs remove <id> / legs reopen <id> | Drop or disable a leg; lift a leg's cooldown now |
captain priors / priors sync [--apply] | Active quality priors and their source; refresh them from the Artificial Analysis coding index |
captain adi / adi refresh | ADI standing per leg (green, red, not measured) and green tuples no leg serves yet |
captain state [--last] [<folder>] | The per-folder TUI state directory (history, model, preferences) |
Routing and decisions
| Command | What it does |
|---|---|
captain director / director <leg> / director reset | Show or switch the director ladder |
captain why | Last routing decision: candidates, exclusions, policy, charges |
captain quota | Observed/inferred quota per leg |
captain budget | Per-task budgets (attempts, cost, mode, stopping reason) |
captain stats | Aggregate ledger stats |
captain jev / jev classify <task> / jev ask … | The Jev decision leg: probe it, see the triage questions with their probabilities, or ask any typed question |
captain jev shadow / jev conform [--json] | How often Jev agreed with captain per decision point, and whether a backend answers captain's questions |
captain gate --status / --check "<cmd>" / --report | The action gate at the tool boundary: current mode, one command screened by hand, the screenings as a calibration |
Watch and control runs
Run controls reach the brain over HTTP and work while a TUI turn streams. runs and show read local history; ui attaches to the worker server.
| Command | What it does |
|---|---|
captain status / captain watch | The live (or last) workflow checklist once, or redrawn until it ends |
captain runs [-n 20] [--leg l] [--kind k] [--grep text] [--failed] | Run history (alias captain history) |
captain show [<id>|last] | One run with its full output |
captain kill [--loops] | Stop the worker run in flight; --loops also ends /repeat |
captain stop [--finish|--abort] [--all] | End /repeat loops after the current round |
captain send [--cwd <dir>] [--leg <leg>] "<prompt>" | Queue a prompt into the TUI open in a folder, as if typed |
captain ui | Open opencode's own TUI on the worker sessions |
Skills
| Command | What it does |
|---|---|
captain skills / skills list | The vetted shelf: what is synced, from which commit, under which license |
captain skills sync [--source r] [--commit sha] [--only a,b] [--dry-run] | Fetch a first-party catalog at a named commit, vet it, hash it into skills.lock |
captain skills select "<task>" / stage / unstage | What would be stocked for a task and why; stage or clear that shelf by hand |
captain skills verify | Recompute every locked hash against disk |
captain skills report [--skill <name>] | Most stocked, most used, best graded |
Evaluation and release
| Command | What it does |
|---|---|
captain eval validate <suite.json> | Suite schema; fixtures are reproducible |
captain eval verify <suite.json> | Non-vacuous fixture gate |
captain eval plan <suite.json> | The executions the suite would run |
captain eval run <suite.json> --out <result.json> | Execute arms (uses provider credits) |
captain eval review <result.json> | List or record blinded verdicts |
captain eval report <result.json> | Acceptance / cost / latency table |
captain release manifest / compat / check / report | Release manifest, compatibility table, extraction checks, dated evidence report |
Tasks, MCP and hosts
| Command | What it does |
|---|---|
captain task fixture | Run task API contract checks against a live brain (submits a test task) |
captain task mcp | Stdio MCP: plan, submit, inspect, events, artifacts, cancel, resume |
captain task plan|submit|inspect|events|artifacts|cancel|resume … | Same contract over HTTP /v1/task |
captain host pi / jido / cert | Host helpers and certification against a live brain |
captain cancel / lifecycle / resume | Cancellation and recovery |
captain handoff [id] | Structured handoff brief |
Outcomes and policy
| Command | What it does |
|---|---|
captain outcomes [<task-id>] / outcomes --settle | Acceptance evidence, checks, corrections; settle what the evidence decides |
captain outcome <task-id> review|correction|regression … | Record a human verdict, fix-up time, or a later regression |
captain calibrate [--domain d] [--json] | Quality/reliability estimates with uncertainty |
captain roles | Role economics roll-up |
captain policy / policy snapshot|activate|accept|show | Policy snapshots |
captain policy canary|promote|rollback | Try a candidate on a share of tasks, compare it per cohort, or restore the last accepted snapshot |
captain policy distill | Export the labelled routing history a small router would train on |
captain refine [--apply|--rollback] | Director-proposed leg notes and prior nudges from the ledger; nothing written without --apply |
Euclid memory (opt-in)
| Command | What it does |
|---|---|
captain euclid init [--repo] | Scaffold ~/.euclid or a repo brain |
captain euclid status / check | Which brains are read and written; the launch check |
captain euclid distill [--apply] / bootstrap [--apply] | Propose register edits from the run journal, or bootstrap from repo docs; --apply writes your own brain, never the shared one |
captain euclid share [--apply] / fold [--dry-run] | Make the repo brain shareable; fold promoted notes into it (the CI step) |
captain euclid link <repo> / links [--apply] | Declare cross-repo links and list proposals |
captain euclid ensure / reindex / corpus / probes | Launch-time indexing, index rebuild, corpus roots, benchmark gold sets |
captain euclid mcp | Memory MCP server (search, ask, recall, registers, note) |
Services and plumbing
The launcher runs these; you rarely call them by hand.
| Command | What it does |
|---|---|
captain brain | The brain: routing policy, the endpoint the TUI talks to, the task API |
captain proxy | The egress redaction proxy on its own (the brain runs one itself) |
captain redact … | The redaction engine for the opencode plugin and the Claude Code hook |
When CAPTAIN_TASK_TOKEN is set, every /v1/task request needs Authorization: Bearer …. Unset keeps the task API loopback-only. See security.
Flags and details live in the source tree as docs/CLI.md, with settings on configuration.