Skip to main content

Commands

cr is the short alias for coderabbit. Both work identically — use whichever fits your workflow.
CommandDescription
crRun code review in non-interactive plain text mode (default)
cr --plainOutput detailed feedback in plain text format
cr --interactiveLaunch the interactive terminal review UI
cr --agentOutput structured JSON for agent-driven workflows
cr authAuthentication commands
cr auth loginAuthenticate via browser OAuth, self-hosted (--self-hosted), or API key (--api-key "<key>")
cr auth logoutLog out from CodeRabbit
cr auth statusShow current authentication status
cr auth orgSwitch between organizations
cr reviewAI-driven code reviews with plain text, interactive, or agent output
cr updateCheck for and install the latest CLI version

Review modes

ModeDescription
Default / --plainDetailed plain text feedback in the terminal
--agentStructured JSON output for coding agents and automation
--interactiveBrowsable terminal UI for manual review

--agent review output

cr review --agent writes one JSON object per line to stdout. Read the stream line by line and handle events by their type.
FieldDescription
typeAlways finding for review results
severityOne of: critical, major, minor, trivial, info
fileNameFile path for the finding
codegenInstructionsAgent-oriented fix instructions
suggestionsSuggested fix commands or snippets
Other event types in the stream include review_context, status, complete, and error.

Agent-friendly auth commands

CommandDescription
cr auth login --agentBrowser-based OAuth login with structured JSON events for agents
cr auth logout --agentLog out with structured JSON events for agents
cr auth status --agentReturn authentication status as structured JSON
cr auth org --agentReturn organization data as structured JSON for agent workflows

Options

OptionDescription
--plainOutput detailed feedback in plain text format (default)
--agentOutput structured JSON for agent-driven workflows
--interactiveLaunch the interactive review UI
-t, --type <type>Review type: all, committed, uncommitted (default: all)
-c, --config <files...>Additional instructions for CodeRabbit AI (for example, claude.md or coderabbit.yaml)
--base <branch>Base branch for comparison
--base-commit <commit>Base commit on current branch for comparison
--api-key "<key>"Agentic API key for usage-based reviews (auto-detected if logged in via cr auth login --api-key)
--dir <path>Review directory path (must contain an initialized Git repository)
--no-colorDisable colored output
--agent is supported in authentication workflows as well as reviews. cr auth login --agent applies to the browser-based OAuth login flow and is not used with --self-hosted or --api-key login.
PR reviews and CLI reviews will differ, even if run on the same code. CLI reviews optimize for immediate feedback during active development, while PR reviews provide comprehensive team collaboration context and broader repository analysis.