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.
The CodeRabbit CLI analyzes your uncommitted changes using the same pattern recognition that powers our PR reviews. Review code as you write it, apply suggested fixes instantly, and catch critical issues while you still have full context in memory. You can get your code reviewed before you commit and get feedback immediately when the code is fresh in your mind.

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.

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.
Contact sales@coderabbit.ai for custom rate limits or enterprise needs.
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.
curl -fsSL https://cli.coderabbit.ai/install.sh | sh
2

Restart your shell

After installation, restart your shell or reload your shell configuration.
# Restart your shell or run:
source ~/.zshrc
3

Authenticate

Link your CodeRabbit account to enable personalized reviews based on your team’s patterns.
coderabbit auth login
# or use the short alias
cr auth login
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.
coderabbit
# use plain mode or prompt-only mode when using it with Claude Code, Codex CLI, Gemini CLI, etc.
coderabbit --plain
CodeRabbit scans your working directory and provides specific feedback with suggested fixes.
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:
# Interactive mode (default) - full interface with browsable findings
coderabbit

# Plain text mode - detailed feedback with fix suggestions
coderabbit --plain

# Prompt-only mode - minimal output optimized for AI agents
coderabbit --prompt-only

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 complex architectural issues or broad refactoring needs, use the --prompt-only mode to get CodeRabbit’s analysis in a format optimized for AI coding agents.
coderabbit --prompt-only
This creates a unique workflow: CodeRabbit identifies problems with full codebase context, then your AI agent implements the fixes. You get expert-level issue detection combined with AI-powered implementation. The prompt-only output is designed for token efficiency while providing comprehensive context to AI agents.

Managing comments

  • Ignore: Hide findings you want to address later
  • Restore: Click collapsed findings in the sidebar to show again

Command reference

CommandDescription
coderabbitRun code review (interactive mode by default)
coderabbit --plainOutput detailed feedback in plain text format
coderabbit --prompt-onlyShow minimal output optimized for AI agents
coderabbit authAuthentication commands
coderabbit reviewAI-driven code reviews with interactive or plain text output
crShort alias for all coderabbit commands

Additional options

OptionDescription
-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-colorDisable 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.