Commands
cr is the short alias for coderabbit. Both work identically ā use whichever fits your workflow.
| Command | Description |
|---|
cr | Run code review in non-interactive plain text mode (default) |
cr --plain | Output detailed feedback in plain text format |
cr --interactive | Launch the interactive terminal review UI |
cr --agent | Output structured JSON for agent-driven workflows |
cr auth | Authentication commands |
cr auth login | Authenticate via browser OAuth, self-hosted (--self-hosted), or API key (--api-key "<key>") |
cr auth logout | Log out from CodeRabbit |
cr auth status | Show current authentication status |
cr auth org | Switch between organizations |
cr review | AI-driven code reviews with plain text, interactive, or agent output |
cr update | Check for and install the latest CLI version |
Review modes
| Mode | Description |
|---|
Default / --plain | Detailed plain text feedback in the terminal |
--agent | Structured JSON output for coding agents and automation |
--interactive | Browsable 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.
| Field | Description |
|---|
type | Always finding for review results |
severity | One of: critical, major, minor, trivial, info |
fileName | File path for the finding |
codegenInstructions | Agent-oriented fix instructions |
suggestions | Suggested fix commands or snippets |
Other event types in the stream include review_context, status, complete, and error.
Agent-friendly auth commands
| Command | Description |
|---|
cr auth login --agent | Browser-based OAuth login with structured JSON events for agents |
cr auth logout --agent | Log out with structured JSON events for agents |
cr auth status --agent | Return authentication status as structured JSON |
cr auth org --agent | Return organization data as structured JSON for agent workflows |
Options
| Option | Description |
|---|
--plain | Output detailed feedback in plain text format (default) |
--agent | Output structured JSON for agent-driven workflows |
--interactive | Launch 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-color | Disable 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.