Skip to main content
A short tour of the ideas that show up everywhere in the CLI. Read this once and the rest of the docs will make more sense.

Diff Modes

Every review needs to answer one question: what changed? The CLI supports four diff modes, each with a different source of truth. Files named on the command line (kodus review src/auth.ts) limit a working-tree review to those files. If you pass more than one scope, files win over --branch, --branch over --commit, and --commit over --staged. Untracked files are not part of any diff until you git add them.
Why does it matter what is sent? Working-tree and staged reviews send the contents of the changed files alongside the diff, because the backend can’t see your uncommitted work. Branch and commit reviews send the diff alone, since the backend can read those commits itself. --fast also sends the diff alone. That’s why those modes work on huge diffs where a working-tree review would exceed the request size limit. A trial review sends the diff alone in every mode.

Review Modes

Three output styles, same underlying review.
  • Interactive (default) — in a terminal on macOS and Linux, the findings open in the Hunk diff viewer, next to the code. On Windows, with --no-hunk, or with --interactive, you get a list that shows issue counts per file, previews fixes, applies them one at a time, and copies a fix prompt for an AI agent.
  • Auto-fix (--fix) — applies every fixable issue at once, after a single confirmation. Use when you trust the rules and want to batch-apply.
  • Prompt-only (--prompt-only) — minimal, structured text designed for AI agents to parse and act on. Pair with --fail-on in an agent loop so the loop exits cleanly when the review is clean.
You can also use --format json or --format markdown for non-interactive consumers (CI, scripts, webhooks).

Review Depth

  • Default — the review mode set for the repository in Kodus (Balanced unless you changed it).
  • --fast — lighter checks and a smaller step budget. The hook installed by kodus hook install uses it.
  • --heavy — adds specialist reviewers for higher recall, at more cost. It runs for a signed-in team on the Teams or Enterprise plan; any other review runs Balanced and says so. --balanced forces the main review alone on a repository set to Heavy. See Heavy mode.
  • --focus <text> — points the review at one area. See Steer a Review.

Authentication Modes

Pick one per machine. The CLI uses the first credential it finds, in this order: KODUS_TOKEN, KODUS_TEAM_KEY, a stored login, a stored team key.
  • Trial — no auth. 2 reviews per hour. Good for “try it once”. A trial review has no team, so it runs with default settings and no Kody Rules. Commands that read or change your team’s data need a login or a team key.
  • Personal login (kodus auth login) — an individual account. Tokens refresh automatically.
  • Team key (KODUS_TEAM_KEY) — one shared key for a team, generated in the web app under Organization → CLI keys. Recommended for AI agents, CI, and anywhere you don’t want interactive logins.
Which commands each one unlocks: A team key can be allowed to configure repositories and to manage Kody Rules from the CLI: open Organization → CLI keys and click Configure on the key. Both are off by default. When you are logged in, the permissions of your role in the web app apply instead.
A KODUS_TEAM_KEY set in the environment is used by rules and config remote even when you are logged in. The commands that need a login ignore it.
See Getting Started for how to sign in.

Kody Rules

A Kody Rule is a structured rule the Kodus reviewer applies during every review, scoped to a repository or global to your team.
Rules layer on top of the general Kodus review — the AI uses them as additional criteria, not replacements. Manage rules from the web app (Code review → Kody Rules) or from the CLI with kodus rules create|update|view|pause|resume|delete. The CLI is useful when you want rules in version control (generate them from a script, check into a repo, re-apply on provisioning). Under Centralized Config, a rule change becomes a pull request instead of a direct write.

Review Settings

Code review settings govern how Kody reviews: which categories to check, severity limits, ignored files, base branches, PR summaries, approval, and more. They apply at three levels: global, repository, and directory. The most specific level wins, and a level without its own value inherits the one above. From the CLI:
show also reads kodus-config.yml from the repository, so you see which values a file overrides. keys lists each key with its allowed values and the settings page it belongs to. For how the levels combine, see Config Inheritance & Overrides. kodus config repo still works as an alias of kodus config remote. A CLI review uses your team’s global settings and Kody Rules, plus the matched repository’s rules, review mode, and repository instructions. Per-repository settings beyond those, such as base branches and ignored titles, concern pull requests.

Centralized Config

Normally, each repository’s settings live in Kodus. Centralized Config lets a team store those settings in a single source-of-truth git repository — every change becomes a pull request against that repo, giving you review and version history on your review configuration itself. Enable, sync, or inspect state (team key required):
Use Centralized Config when your team wants auditable, versioned control over review settings. Keep the default (per-repo settings in Kodus) when that ceremony is overkill. See the Centralized Config guide.

Business Validation

Where kodus review asks “is this code good?”, kodus pr business-validation asks “does this diff actually do what the task said to do?”. You point it at a task (by id or URL) and a diff source (working tree, staged, branch, commit), and it checks the implementation against the task’s acceptance criteria. It needs a login or team key.
Pair it with a pre-merge check to catch “code works, but it’s not what was asked for” before human review. See Business Logic Validation.

Custom Agents

Custom agents are extra reviewers your team defines, each with its own instructions, files, and tools. kodus agents lists, creates, edits, turns on and off, deletes, and tries them, with a login. A new agent starts turned off: run it on a pull request with kodus agents try, then turn it on with kodus agents enable. See Custom agents.

Kodus Trace

Kodus Trace records the decisions behind changes an AI coding agent makes, and kodus trace <path> reads back the ones recorded for a path. See Kodus Trace.

AI Agent Output (--prompt-only and --agent)

Two related flags, different jobs.
  • --prompt-only — output is optimized for an AI agent to parse and act on. It exists on kodus review only.
  • --agent — global flag that prints a deterministic JSON envelope (ok, command, data, error, meta). It works on review, pr, schema, hook install, hook uninstall, trace status, trace disable, and trace <path>. Other commands take --json for JSON output.
Most agent integrations just need --prompt-only. Reach for --agent when you’re orchestrating the CLI from a harness or a tool-calling loop that has strict format expectations.

Next steps

Command Reference

Full command + flag listing.

AI Agents

Build review-fix loops with coding agents.

Troubleshooting

Common errors and exit codes.