Docs · CLI reference

The corvi command line.

Every customer-facing corvi command and its flags. The CLI is the same engine the app runs — drive a plan, serve it over MCP, or audit spend, all from the terminal.

Overview

corvi is the headless planning engine. The macOS app is built on top of it; the binary ships inside the app bundle at Corvi.app/Contents/Resources/corvi. Symlink it onto your PATH to call it directly:

ln -s /Applications/Corvi.app/Contents/Resources/corvi /usr/local/bin/corvi
corvi --help

The customer-facing commands are run (the default), self-review, mcp-serve, mcp-files-serve, capabilities, costs, and symbolicate.

Keys resolve from environment variables first, then the app's stored keys — there is no .env auto-loader, so export your keys in the same shell: set -a; . ./.env; set +a. See Configuration.

corvi run

Run a grounded planning session against a workspace. With no subcommand, corvi defaults to run.

corvi run --workspace . --prompt "Add retry/backoff to the webhook sender" \
  --review --synthesize --export ./plan

Workspace & task

FlagDefaultDescription
-w, --workspace <path>Path to the repository/workspace to ground the plan in. Required.
-p, --prompt <text>The planning prompt / task description. Required.
--file <path>Workspace-relative file(s) to seed as context. Repeatable.
--refine <plan.md>Amend an existing plan: carry a prior plan's contents instead of drafting from scratch. Cheaper than a full rerun.
--resume <runID>Resume an interrupted run by ID (pass the same --prompt/--workspace). Validates the repo hasn't moved, then re-runs — completed passes are restored from the cache for free.

Pipeline & models

FlagDefaultDescription
--model <id>the default drafterAnthropic model id for the draft pass.
--reviewoffAfter drafting, have a second-family model review the plan (needs OPENAI_API_KEY).
--review-model <id>the default reviewerOpenAI model id for the review pass.
--synthesizeoffAfter review, reconcile findings into a revised final plan. Implies --review.
--preset <name>qualityPipeline preset: quality | allRound | value | fullLocal | claudeCode. Explicit --model / --review-model win.
--quickoffQuick Plan: a single-pass, ≤60s grounded sketch, no review.
--seed-onlyoffOnly gather the retrieval seed; don't call the model.

Providers

FlagDefaultDescription
--claude-codeoffUse your Claude Pro/Max subscription instead of an API key. Logs in once via the official claude CLI, which owns auth. Mutually exclusive with --local.
--localoffPlan with a local Ollama model — nothing leaves the machine.
--ollama-model <id>qwen2.5-coderOllama model id (with --local).
--ollama-host <url>http://localhost:11434Ollama host URL.
--open-router-key <key>OPENROUTER_API_KEYOpenRouter key. Use with --model openrouter/<vendor>/<model>.

Grounding

FlagDefaultDescription
--semanticoffSeed the draft with a local semantic (embeddings) search over the repo.
--embed-model <id>nomic-embed-textOllama embedding model (with --semantic).
--lspoffUse an installed language server (sourcekit-lsp/gopls/…) on PATH for compiler-exact references and signatures. Falls back to text search when absent.
--parallel-groundoffFan out cheap read-only explorer sub-agents to ground before drafting.
--explorers <n>4How many explorer sub-agents to fan out with --parallel-ground.
--explorer-model <id>a cheap model of the draft familyModel for explorer sub-agents.

Tools & egress

FlagDefaultDescription
--mcp <server>noneEnable a discovered MCP server for this run (repeatable; opt-in egress).
--skill <id>noneEnable a discovered agent skill by id for this run (repeatable).
--allow-weboffAllow web_fetch + web_search for [VERIFY] doc lookups (search needs SEARXNG_URL).
--max-fetches <n>20Max external tool calls this run (MCP + web_fetch + web_search).
--max-cost <usd>no capPer-pass spend ceiling in USD: pause cleanly once a pass's billed cost reaches it.

Output & cache

FlagDefaultDescription
--export <dir>Write the export package (plan.md + sidecar + evidence + TODO.md) to a directory.
--saveoffSave the plan into the Corvi app library so it shows up in the app.
--estimateoffPrint a p50–p90 cost estimate and exit — no provider calls.
--no-cacheoffDisable the pass cache for this run (always call the provider for every pass).
--data-dir <path>$CORVI_DATA_DIROverride the Corvi data directory (the app's store by default).

corvi self-review

Model-judged review of a workspace's executed diff: a different-family reviewer reads the change against the plan's requirements and returns a verdict plus findings.

corvi self-review --workspace . --baseline main --task "Add rate limiting" --json
FlagDefaultDescription
-w, --workspace <path>Repository whose diff to review. Required.
--baseline <ref>HEADGit ref to diff against.
--task <text>""Short task description for the reviewer's requirement background.
--sidecar <path>Plan sidecar to read the requirements from.
--min-severity <level>lowDrop findings below this severity.
--max-files <n>no capMax files to review; the rest are listed as unreviewed (budget).
--jsonoffEmit the verdict + findings as JSON instead of the human summary.

corvi mcp-serve

Serve your Corvi plans to a coding agent over MCP (stdio). An MCP client launches it; it reads your plan library and reloads per request. See the MCP server guide for client config and the tool list.

corvi mcp-serve
FlagDefaultDescription
--data-dir <path>$CORVI_DATA_DIROverride the plan store to serve (the app's store by default).

The tools are read-only except create_plan, which is on by default and gated by your client's approval prompt. Set CORVI_MCP_ALLOW_CREATE=0 to make it strictly read-only.

corvi mcp-files-serve

Serve one workspace's files to an agent over MCP (stdio), broker-gated and read-only — read_file, search_code, and list_dir, all obeying the broker's deny rules, byte caps, and no-escape-outside-the-workspace rule. It exposes repo access, not plans.

corvi mcp-files-serve --workspace /abs/path/to/repo
FlagDefaultDescription
--workspace <path>Absolute path to the workspace whose files are served. Required.

corvi capabilities

List the MCP servers and agent skills Corvi discovers on this machine. Read-only: nothing is connected, launched, or sent anywhere.

corvi capabilities --workspace .
FlagDefaultDescription
-w, --workspace <path>cwdWorkspace root for project-scoped configs and skills.

corvi costs

Show recorded LLM spend from the cost ledger. The ledger records every paid call including failures, so this is the authoritative billed total.

corvi costs --since 2026-06-01
FlagDefaultDescription
--run <id>allFilter to one run by ID (bench or corvi run ID).
--since <date>all timeFilter to entries on or after an ISO8601 date, e.g. 2026-06-01.
--data-dir <path>$CORVI_DATA_DIROverride the Corvi data directory.

corvi symbolicate

Turn the raw {addr, uuid} frames stored by crash reporting back into readable function names and file:line, using dSYMs archived at package time. Offline and read-only — no network, no database.

psql -tA -c "SELECT diagnostic_json FROM crashes WHERE id='…'" | corvi symbolicate
FlagDefaultDescription
-i, --input <file>stdinCrash JSON file (diagnostic_json or full payload).
--dsyms <dir>build/dSYMsDirectory of archived <uuid>.dSYM bundles.