R1 · docs · cli

CLI reference.

Every r1 subcommand. Synopsis, flags, examples. The full surface ({{TBD-cli-full-surface}}) ships with v1.0; this page seeds the canonical commands.

r1 run

Run a task end to end. Drives the four-phase loop and writes a signed receipt at the COMMIT transition.

r1 run <task> [--implementer model] [--reviewer model] [--budget USD] [--no-verify]
flagdescription
--implementerOverride the default implementer model. Family is read from the registry.
--reviewerOverride the default reviewer. Must be a different family unless --allow-same-family is also passed.
--budgetHalt the run before exceeding the named USD ceiling. Per-task ceilings stack on per-workspace.
--no-verifySkip the VERIFY phase. Recorded in the receipt; the receipt carries an unverified flag.
--receipt-outWrite the receipt to the named path. Default: .r1/receipts/<timestamp>.json.
r1 run "Add rate-limit middleware to /auth"
r1 run "Refactor billing.js" --reviewer gpt-4o --budget 2.50

r1 daemon

Start and operate the long-running R1 process. Daemon mode persists queue state and the append-only WAL to disk, exposes an HTTP control plane, and lets operators change worker count without restarting the process.

r1 daemon [start|enqueue|status|workers|pause|resume|wal|tasks] ...
flagdescription
startBoot the daemon, restore queue and WAL state, and begin polling the worker pool.
enqueueSubmit a new task to the persisted queue. The queue tracks estimate, priority, and underdelivery outcomes.
workersResize the worker pool at runtime.
pause / resumeTemporarily halt scheduling and later restore the prior worker count.
walInspect the append-only ndjson log of INTENT, DONE, and BLOCKED transitions.
tasksList, inspect, or cancel queued and running tasks through the daemon control plane.
r1 daemon start --listen 127.0.0.1:4317
r1 daemon enqueue "Run the invoice reconciliation playbook"
r1 daemon workers --set 10
r1 daemon wal --tail 40

For the operator model and HTTP endpoints, read /daemon-mode/.

r1 resume

Resume a halted session by receipt id or by the most recent halt.

r1 resume [<receipt-id>] [--from phase]
flagdescription
--fromResume from a specific phase: plan, execute, verify, commit. Default: the phase that halted.
--listList resumable receipts and their halt reasons.
r1 resume --list
r1 resume r-2026-04-24-08-13-09 --from verify

r1 inspect

Open a TUI over a receipt. Walk events, filter by phase or tier, jump to artifacts.

r1 inspect <receipt-path> [--filter phase=verify]
flagdescription
--filterPre-filter events. Repeatable. Examples: phase=verify, type=TOOL_CALL, tier=L2.
--jsonEmit a non-interactive JSON dump matching the inspector's view.
r1 inspect .r1/receipts/2026-04-24T08-13-09Z.json
r1 inspect <receipt> --filter phase=verify --json | jq

r1 receipt verify

Verify the signature, canonicalisation, and event-graph integrity of a STOKE receipt.

r1 receipt verify <receipt-path> [--key-id kid]
flagdescription
--key-idOverride the key id. Default: read from the receipt header.
--strictFail on any unknown event type. Useful when verifying receipts from older clients.
r1 receipt verify ./shared/receipt.json
r1 receipt verify ./shared/receipt.json --strict

r1 init

Initialise an R1 workspace inside the current directory. Creates .r1/ and registers local skills.

r1 init [--template name] [--no-skills]

r1 skills

List, install, and manage skills. {{TBD-cli-full-surface}}

r1 skills [list|install|remove] ...

r1 memory

Inspect and manipulate the L0..L3 memory tiers. {{TBD-cli-full-surface}}

r1 memory [show|prune|export] ...

r1 config

Read and write workspace and user-level configuration. {{TBD-cli-full-surface}}

r1 config [get|set|list] [key] [value]

Exit codes

codemeaning
0task shipped (COMMIT phase reached).
1generic failure; see stderr.
2gate blocked the run; receipt names the gate.
3budget exceeded.
4cross-family review unavailable; pass --allow-same-family to override.

Environment

variablepurpose
R1_HOMEWorkspace directory. Default: ./.r1. STOKE_HOME is accepted for the rename window (90 days).
ANTHROPIC_API_KEYAnthropic family key.
OPENAI_API_KEYOpenAI family key.
R1_DEFAULT_BUDGETDefault per-task budget in USD.
R1_RECEIPT_KEYPath to the Ed25519 signing key. If absent, an ephemeral key is generated and the kid noted in the receipt.