Skip to main content

CLI Reference

rei is Reikon’s headless CLI — same analyzers as the desktop app, runnable from a terminal or CI pipeline with no UI. Published to npm as @reikondev/cli. For installation steps, see the CLI install guide. This page is the flag/exit-code/config reference.

Commands

Review loop

rei review is the loop’s read + act surface in the terminal. It reads and mutates the same review state as the desktop app and the MCP server, so a reply you make in the terminal shows up in the desktop Review tab, and vice versa. Authoring goals and the visual substrate (ownership maps, hotspot charts) stay in the desktop app; the CLI reads and acts on the loop.

Dispatch ledger

rei status is the terminal form of the desktop dispatch ledger — a glanceable “what’s in flight” across every repo you’ve analyzed. It’s the git status of the dispatch loop.
It reports, per repo:
  • returned — fixes an agent has sent back (fix-returned), waiting for you to verify
  • out — notes still with the agent (fix-requested)
  • open — open flags not yet acted on
  • goals — the current repo’s active dispatched goals
Notes are cross-repo for free — the annotation store keys by repo path, so rei status sums every repo you’ve analyzed and marks the current one, with a cross-repo total. Dispatched goals are shown for the current repo only. With nothing in flight anywhere, it prints “Nothing in flight — the dispatch loop is quiet.”

Options

Output formats

  • summary (default) — colored terminal output with a ✓/⚠/✗ status icon per signal. Respects NO_COLOR and non-TTY output (colors auto-disable when piped).
  • json — the full AnalysisResult object, same shape the desktop app consumes. Pipe it into jq or any other JSON tool.
  • html — the same self-contained HTML report the desktop app’s Export button produces (inline CSS + SVG charts, no external dependencies).

Exit codes

Designed to gate a CI step directly — see the CI integration guide.

Config

rei reads .reikon/config.json exactly as the desktop app does — ignorePaths, teams, aliases, assignments, fileTypeGroups, inactiveAuthors, and hiddenExtensions all apply the same way. See the full config reference. One CLI-only addition, nested under a cli key:
warnBelow and failBelow control the exit-code thresholds above. Defaults are 70 and 50 if the key is absent.

Caching

Results are cached in ~/.reikon/cache/, keyed by repo path + current HEAD hash + a hash of .reikon/config.json’s content — changing the config invalidates the cache the same way a new commit does. Pass --no-cache to force a fresh run regardless.

Watch mode

Re-runs analysis after every new commit, debounced ~1.5s. It watches the repository’s commit log directly rather than the working tree, so it won’t re-trigger on every unsaved file edit — only on actual commits. Safe inside a git worktree checkout.

rei mcp

Hosts Reikon’s MCP server over stdio, scoped to the git repo rei was launched in. Use this to give a coding agent (Claude Code, Cursor, Windsurf, any MCP client) the same project context the desktop app exposes — health score, complexity hotspots, diff review, annotations — with no desktop app installed. Register it with your agent the same way as any other stdio MCP server. For Claude Code:
For Cursor, Windsurf, or any other MCP client, point command at rei with "args": ["mcp"]:
The command takes no flags — it reads no arguments, accepts JSON-RPC on stdin, writes responses on stdout, and logs to stderr. It runs until the client closes the stream. Warming the context. Run rei analyze in the repo first so context-dependent tools (get_project_health, get_complexity_hotspots, …) answer instantly. If you skip it, the first such call returns a short “run rei analyze” hint and warms the cache in the background — a retry shortly after succeeds. Diff and annotation tools (get_annotated_diff, list_annotations, add_annotation_comment, …) work immediately either way, since they read live git and your annotation file. Shared state. The CLI-hosted server and the desktop app read and write the same on-disk state (under <appData>/reikon), so annotations stay in sync between them. See Run MCP Without the Desktop App for the full walkthrough, or the MCP tool reference for what each tool returns.