// guide · cli reference
jointchiefs — the CLI.
Same engine as the MCP server. Streams live. Exits with meaningful codes. Pipes stdin. Emits JSON on request.
// commands
Commands.
jointchiefs review <path>
Runs a full multi-model review of the file or directory. Streams to stdout; every provider token lands live.
$ jointchiefs review src/auth.swift
$ jointchiefs review src/auth.swift --goal "security audit"
$ jointchiefs review src/auth.swift --context "prefer pure functions; Swift 6 concurrency"
jointchiefs review --stdin
Reads code from stdin. Great for piping a git diff in as a pre-commit gate.
$ git diff | jointchiefs review --stdin --goal "pre-commit check"
$ cat pr.patch | jointchiefs review --stdin --json > review.json
jointchiefs models
Lists every configured provider and its model. Use --test to probe each provider's API with a round-trip connection check.
$ jointchiefs models
$ jointchiefs models --test
// flags
Flags.
| Flag | Description |
|---|---|
--goal <text> | What you want the debate to focus on. "security audit", "performance review", "readability pass". Passed to every provider. |
--context <text> | Free-form context — style rules, conventions, framework versions, caller behavior. Feeds the spokes alongside the code. |
--rounds <n> | Max debate rounds. Default 5. Debate breaks early when positions converge. |
--timeout <sec> | Per-provider request timeout in seconds. Default 120. |
--stdin | Read code from stdin instead of a file argument. |
--format <fmt> | summary (default), json, or full. full adds the transcript ID after the summary. |
--quiet | Suppress streaming output. Only the final consensus prints when the review completes. |
// exit codes
Exit codes.
| Code | Meaning |
|---|---|
0 | Review completed successfully. |
1 | Review failed — every provider errored, no providers configured (no API keys found in environment or Keychain), or consensus could not be produced. |
64 | Usage error — missing file argument, empty stdin, malformed flag, or validation failure from ArgumentParser. |
// configuration
Environment.
API keys resolve in order: environment variable first (CI escape hatch), then the Keychain via jointchiefs-keygetter. Model overrides always come from env vars.
OPENAI_API_KEY | Enables OpenAI as a spoke. |
|---|---|
GEMINI_API_KEY | Enables Gemini as a spoke. |
GROK_API_KEY | Enables xAI Grok as a spoke. |
ANTHROPIC_API_KEY | Enables Claude — also the default moderator/decider. |
OLLAMA_ENABLED | 1 to force-include / 0 to force-exclude the local Ollama general (overrides StrategyConfig.ollama.enabled). |
OLLAMA_MODEL | Ollama model override. Default llama3. |
OPENAI_COMPATIBLE_BASE_URL | Force-enable an OpenAI-compatible local server (LM Studio, Jan, llama.cpp-server, Msty, LocalAI). CI override for StrategyConfig.openAICompatible. |
OPENAI_COMPATIBLE_MODEL | Model identifier as the local server exposes it. |
OPENAI_MODEL etc. | Override the default model for any cloud provider (GEMINI_MODEL, GROK_MODEL, ANTHROPIC_MODEL). |
CONSENSUS_MODEL | Override the Claude model used specifically for consensus synthesis. |
Prefer the tool-call flow?
The MCP server exposes the same engine to any MCP-aware client — one JSON snippet to wire it up.