Global Flags
These flags are available on all commands:--format applies to review, pr, and trace. --agent works on review, pr, schema, hook install, hook uninstall, trace status, trace disable, and trace <path>; it prints one JSON envelope with ok, command, data, error, and meta. The other commands that print structured data take --json.
With --fail-on, a kodus review --agent that trips the gate prints a second envelope after the first, with ok: false and error.code INTERNAL_ERROR. Read the exit code, or read the first envelope only.
Results and informational messages go to stdout. Spinners, warnings and errors go to stderr. To save a JSON review for automation, use kodus review --format json --output review.json. With --fail-on, read the exit code separately. A review that trips the gate prints an extra line to stdout.
kodus review
Analyzes your changes for bugs, security vulnerabilities, performance problems, and style violations. A review uses your team’s Kody Rules and code review settings.
Usage
kodus review reviews tracked changes in your working tree, staged and unstaged. If you pass more than one scope, files win over --branch, --branch over --commit, and --commit over --staged. See Diff Modes.
Flags
Review Modes
- Interactive (Default)
- Auto-fix
- AI Agent
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 instead: browse files with issue counts, preview suggested fixes, apply them one by one, or copy a fix prompt for an AI agent.Notes
- If your signed-in team’s plan doesn’t include Heavy mode, a review requested with
--heavyruns in Balanced mode and prints a notice. With--agentor--format json, check the result’snoticesto see whether the requested mode ran. - If your credentials are rejected (a revoked team key or an expired session),
kodus reviewruns as a trial review and says so.
kodus diff
Open the current changeset in the Hunk terminal diff viewer.
hunk diff. Every argument you pass is forwarded to it unchanged, so any flag Hunk supports works here too. It is not available on Windows.
Useful for looking at a changeset before running
kodus review on it. The same viewer backs the interactive review. Pass --no-hunk to kodus review if you prefer the list.kodus pr suggestions
Fetch the suggestions Kody made on a pull request. Needs a login or a team key.
Usage
kodus config remote list --json.
Flags
Provide
--pr-url, or --pr-number together with --repo-id. --prompt-only is not available here.
kodus pr reviews
Show every review Kody ran on a pull request, newest first: when, the status, how many suggestions were sent and filtered, the reviewed commit, and the reason when a run failed. Needs a login.
Usage
Flags
kodus pr business-validation
Validate a local diff against the business rules and acceptance criteria of a task. Useful before merging to confirm the implementation matches the task. Needs a login or a team key. Nothing is posted to a pull request.
Usage
--format json or --agent, it prints the verdict as structured data. See Business Logic Validation.
Flags
Pass at most one scope: files,
--staged, --branch, or --commit. With none, it uses your working tree changes.
kodus auth
Manage authentication with the Kodus API.
auth login
--device-code and follow the sign-in steps. Both flows wait up to 10 minutes. For CI, use KODUS_TEAM_KEY as a secret.
On a self-hosted instance, the page is on the host set by the API’s API_FRONTEND_URL.
For legacy sign-in, run the example above and enter your password when prompted. The CLI masks what you type.
auth logout
~/.kodus/config.json: the team key, and a saved API URL or Cloudflare Access settings.
auth status
kodus auth team-key: the organization and team. In trial mode: reviews used, the limit, and when it resets. It reads stored credentials only: with KODUS_TEAM_KEY or KODUS_TOKEN set in the environment and nothing stored, it says “No credentials found”. Use kodus status for those.
auth token
This command appears in the CLI help, and relies on a CI token endpoint absent from the current API. For CI/CD, use a team key in the KODUS_TEAM_KEY secret. See CI/CD integration.
auth team-key
Stores a shared team key in ~/.kodus/config.json. The command requires --key, verifies the key with the API, registers the device, and replaces any stored login.
For routine use, set KODUS_TEAM_KEY in the CLI environment. The CLI reads it directly. Team keys start with kodus_.
auth team-status
kodus hook
Manage a pre-push Git hook that reviews your commits before they leave your machine.
hook install
On
git push, the hook runs this for the branch you push:
--fast is left out with --no-fast.
- The push is blocked (exit code 1) when a finding reaches the
--fail-onseverity, and also when the review fails, for example when the API can’t be reached. - In an interactive terminal on macOS and Linux, the findings open in the Hunk viewer before the push continues, even when there are none. Quit the viewer to go on.
- Without an interactive terminal (an IDE, a Git GUI), the viewer can’t open and any finding blocks the push. See Troubleshooting.
- It reviews only the branch you have checked out, and skips new branches, branch deletions, and
git push origin HEAD. Push the branch by name. - With a login or team key it reviews like any other
kodus review; without one, it runs a trial review. The trial limit (2 reviews per hour) applies, and when it is reached the push goes through. - If
kodusis not installed, it prints a warning and lets the push through.
hook uninstall
--dry-run to preview. A hook that Kodus did not install is left alone.
hook status
Skipping the Hook
kodus config remote
Read and change code review settings stored in Kodus: global, per repository, and per directory.
kodus config repo still works as an alias of kodus config remote.show and set reach every setting at every level, and unset, model, messages, language, and skills are available. keys needs no sign-in. With a team key, show and set cover six settings of one repository, and add, setup, and open need a team key. The key must have Allow repository configuration via CLI turned on (Organization → CLI keys, Configure on the key; off by default). See Authentication Modes.
The [repository] argument takes . for the current repository, owner/repo, a repository id, or global. Always pass it when the command also takes a key or value.
Usage
kodus config -r [repository] is a shortcut for kodus config remote add [repository].
Subcommands
Commands that take a scope accept
--team <team> (needed when your organization has more than one team) and --directory <path>. Most also take --json.
With a team key, set accepts review.enabled, review.autoApprove, review.requestChanges.minSeverity, patterns.ignoreFiles, patterns.baseBranches, and patterns.ignoreTitles. Those names work when you are logged in too.
When Centralized Config is on, a change is proposed as a pull request and the command prints its link.
kodus config centralized
Manage centralized configuration from the CLI. Needs a team key with Allow repository configuration via CLI turned on.
Usage
Subcommands
Flags
For a complete walkthrough, see the Centralized Config guide.
kodus rules
Create, update, view, pause, resume, and delete Kody Rules — structured rules that Kodus applies during review.
With a team key, the key needs Allow Kody Rules management via CLI turned on (Organization → CLI keys, Configure on the key; off by default). With a login, the permissions of your role in the web app apply. pause, resume, and delete need a login.
Usage
Subcommands
rules create Flags
rules update Flags
Pass at least one field to change.
rules view Flags
rules pause, resume, and delete Flags
A rule that keeps its status, for example because your plan allows no more active rules, is listed and the command exits with code 1.
When Centralized Config is on,
create, update, pause, resume, and delete open a pull request and print its link instead of changing the rule.
kodus agents
List, create, edit, turn on and off, delete, and try custom agents.
Sign in to a workspace with custom agent access. To create or change agents, use an Owner account or a Repo Admin account for an assigned repository.
Usage
@kody -v command.
Subcommands
Level flags
Every subcommand takes these:Agent field flags
create, update, and try take these. create also takes --template <id> (architecture, e2e-coverage, regression-hallucination, security, or blank).
When Centralized Config is on, changes open a pull request and print its link.
kodus cockpit
Read the Cockpit dashboards of the web app, one subcommand per tab.
Sign in as an Owner or Repo Admin. The same plan and self-hosted requirements as Cockpit apply.
code-areas uses the repository’s stored history window. --from and --to change the range for the other subcommands.
See the Cockpit for what each metric means.
kodus usage
Read usage data shown in the web app.
Sign in as an Owner, Billing Manager or Repo Admin. See Token usage for the dashboard.
usage tokens
Token usage and cost: totals, cost, the change against the previous period, and a breakdown.
kodus issues
This command is in
main and has not shipped in CLI 0.4.22.kodus auth login as an Owner, Repo Admin or Contributor. The command works on every plan.
Deep Scan findings and fix prompts require Cloud workspace access to the private alpha.
kodus trace
Read the decisions recorded for a path, and manage the capture of coding agent sessions.
kodus skills
Inspect and install the Kodus skills bundled with the CLI into the AI agents on your machine.
Usage
Subcommands
Flags
The CLI detects an agent by its config folder. AI Agents lists the agents and the skills.
kodus status
Show a consolidated Kodus status: CLI version, auth mode, whether a team key is configured, repository and branch, pre-push hook, decision hooks, and the number of bundled skills.
kodus update
Update the Kodus CLI to the latest version from npm.
npm, pnpm, yarn, or bun; npm when it can’t tell), then prints how to refresh your agent skills. Run kodus skills resync to refresh them.