| name | coderabbit |
| description | Use when running CodeRabbit CLI code reviews, reviewing uncommitted or committed changes, comparing branches, or authenticating with CodeRabbit. Triggers on "code review", "cr review", "coderabbit", "review my changes", "review this branch". |
CodeRabbit CLI
AI code review from the terminal. The command is cr (alias for coderabbit).
When to Use
- Review uncommitted or committed changes before push
- Compare current branch against a base branch
- Get AI feedback on bugs, security, and code quality
Setup
cr auth login
cr auth login --api-key <key>
cr auth status
cr auth org
cr auth logout
Review
Reviews take 2-10+ minutes. Set tool timeout to at least 600000ms (10 min).
cr review
cr review -t uncommitted
cr review -t committed
cr review --base main
cr review --base-commit abc123
cr review -c .claude/CLAUDE.md -c .coderabbit.yaml
Agent Usage
When calling cr review from a tool or subagent:
- Set timeout to 600000ms or higher — reviews are slow
- Use
--agent for structured JSON findings
- Pass
--no-color to strip ANSI escape codes
- Default output (
--plain) is human-readable text
cr review --agent --no-color -t uncommitted
Quick Reference
| Task | Command |
|---|
| Review everything | cr review |
| Uncommitted only | cr review -t uncommitted |
| Committed only | cr review -t committed |
| Against main | cr review --base main |
| Against a commit | cr review --base-commit <sha> |
| With context files | cr review -c file1 -c file2 |
| Agent output | cr review --agent |
| Interactive mode | cr review --interactive |
| Check auth | cr auth status |
| Login | cr auth login |
| Switch org | cr auth org |
| Update CLI | cr update |
Common Mistakes
Timeout too short. Default 2-minute timeouts kill the review mid-flight. Always set 10+ minutes (600000ms).
Wrong review type. cr review includes both committed and uncommitted changes. Use -t uncommitted to review only working-tree changes.
Missing --no-color. ANSI codes clutter agent output. Always pass --no-color when parsing programmatically.
No context files. Without -c, the reviewer lacks project conventions. Pass your CLAUDE.md or coderabbit.yaml for better results.