The CodeRabbit CLI is in Beta.
Review local changes
Looking for the full CodeRabbit experience? This page covers local CLI
reviews. For complete code reviews on pull requests, see
Introduction.
Key features
Review uncommitted changes
Analyze your working directory for race conditions, null pointer exceptions,
and logic errors before you commit.
One-step fixes
Apply simple fixes like import corrections instantly. Hand complex
architectural issues to your AI agent with full context.
Context-aware reviews
Paid users get reviews enhanced by learnings from your team’s patterns -
remembers your error handling styles, architectural decisions, and coding
preferences.
Detects coding agent files
Automatically reads claude.md, .cursorrules, and custom team standards to
enforce your specific coding guidelines in every review.
AI agent integration
You’re already using CodeRabbit for PR reviews. With the CLI, you can now catch issues before you commit - reviewing uncommitted changes while the code is fresh in your mind. CodeRabbit detects the problems, then your AI coding agent implements the fixes.Example prompt for your AI agent
Here’s a complete prompt you can use with Claude Code, Cursor, or other AI coding agents:Components of a good prompt
Breaking down what makes an effective CodeRabbit + AI agent workflow:1
Run CodeRabbit CLI
Tell your AI agent to run CodeRabbit with the You can also specify review types or branches:
--prompt-only flag:2
Run in the background
CodeRabbit reviews can take 7-30+ minutes depending on the scope of changes. Instruct your AI agent to run CodeRabbit in the background and set up a timer to check periodically:
3
Evaluate and implement fixes
Once CodeRabbit completes, have your AI agent evaluate the findings and prioritize:This keeps your agent focused on meaningful improvements rather than minor style issues.
4
Verify with a second pass
Run CodeRabbit one more time to ensure fixes didn’t introduce new issues:
5
Set loop limits
Prevent infinite iteration by setting clear completion criteria:This ensures your AI agent completes the task efficiently and provides a clear report.
Integration guides
See detailed workflows for specific AI coding agents:Claude Code integration
Automated workflow with background execution and task-based fixes
Codex integration
Integrated code review and fix implementation with Codex CLI
Pricing and capabilities
Free tier
Basic static analysis with limited daily usage.
- Catches syntax errors, obvious logic issues, and common security patterns.
- Perfect for individual developers trying out the CLI workflow.
Paid plans
Enhanced reviews powered by learnings from your codebase history plus higher rate limits.Paid users with linked GitHub accounts get:
- Learnings-powered reviews: Remembers your team’s preferred patterns for error handling, state management, and architecture
- Full contextual analysis: Understands your imports, dependencies, and project structure
- Team standards enforcement: Applies your documented coding guidelines automatically
- Advanced issue detection: Spots subtle race conditions, performance bottlenecks, and security vulnerabilities
Paid users get nearly all PR review features in the CLI, including learnings
and contextual analysis. Only chat, docstrings, and unit test generation
remain exclusive to PR reviews.
Platform support: Currently available on Apple (Intel and Apple Silicon)
and Linux. Windows support is not available at this time.
Video demo
See CodeRabbit CLI in action with Claude Code:Getting started
1
Install CLI
Download and install the CodeRabbit CLI to start reviewing code locally.
2
Restart your shell
After installation, restart your shell or reload your shell configuration.
3
Authenticate
Link your CodeRabbit account to enable personalized reviews based on your team’s patterns.Follow the browser redirect to sign in and copy the access token back to your CLI.
4
Review your code
Analyze your Git repository for issues using the CodeRabbit CLI.If your main branch is not CodeRabbit scans your working directory and provides specific feedback with suggested fixes.
main, specify your base branch:5
Apply suggestions
Review findings in your terminal and either apply quick fixes or send complex issues to your AI coding agent.
Review modes
The CLI offers different output formats to fit your workflow:Working with review results
CodeRabbit analyzes your code and surfaces specific issues with actionable suggestions. Each finding includes the problem location, explanation, and recommended fix. Example findings include:- Race condition detected: “This goroutine accesses shared state without proper locking”
- Memory leak potential: “Stream not closed in error path - consider using defer”
- Security vulnerability: “SQL query uses string concatenation - switch to parameterized queries”
- Logic error: “Function returns nil without checking error condition first”
Browse and apply suggestions
In interactive mode, use the arrow keys to navigate to a finding and press enter to see the detailed explanation and suggested fix inline in your CLI. For simple issues like missing imports, syntax errors, or formatting problems, choose Apply suggested change to fix immediately.Use AI coding agents
For AI agent integration, see the AI agent integration section for detailed workflow guidance and integration guides.Managing comments
- Ignore: Hide findings you want to address later
- Restore: Click collapsed findings in the sidebar to show again
Command reference
| Command | Description |
|---|---|
coderabbit | Run code review (interactive mode by default) |
coderabbit --plain | Output detailed feedback in plain text format |
coderabbit --prompt-only | Show minimal output optimized for AI agents |
coderabbit auth | Authentication commands |
coderabbit review | AI-driven code reviews with interactive or plain text output |
cr | Short alias for all coderabbit commands |
Additional options
| Option | Description |
|---|---|
-t, --type <type> | Review type: all, committed, uncommitted (default: “all”) |
-c, --config <files...> | Additional instructions for CodeRabbit AI (e.g., claude.md, coderabbit.yaml) |
--base <branch> | Base branch for comparison |
--base-commit <commit> | Base commit on current branch for comparison |
--cwd <path> | Working directory path |
--no-color | Disable colored output |
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.