CodeRabbit Setup Guide
CodeRabbit Setup Guide
Step-by-step guide to adding CodeRabbit AI code review to your GitHub repositories.
Prerequisites
- GitHub account
- At least one repository you want to enable reviews on
- Repository admin access (for private repos)
Installation
Step 1: Install the GitHub App
- Go to https://coderabbit.ai
- Click Get Started or Sign up with GitHub
- Authorize CodeRabbit to access your GitHub account
- Select which repositories to enable:
- All repositories - CodeRabbit reviews every repo
- Only select repositories - Choose specific repos
Step 2: Verify Installation
After installation, CodeRabbit appears in your repo settings:
- Go to your repository on GitHub
- Settings β Integrations β GitHub Apps
- Confirm CodeRabbit is listed and has access
Configuration
Basic Setup (No Config Needed)
CodeRabbit works out of the box with sensible defaults. Open a PR and it will automatically review.
Custom Configuration
Create .coderabbit.yaml in your repository root:
yaml# .coderabbit.yaml language: en-US reviews: # Automatically review PRs when opened auto_review: enabled: true # Review drafts or only ready PRs drafts: false # Minimum lines changed to trigger review min_lines: 10 # Request changes vs just comment request_changes_workflow: false # Ignore certain paths path_filters: - "!**/*.md" # Skip markdown files - "!**/test/**" # Skip test directories - "!**/*.test.ts" # Skip test files - "!**/node_modules/**" - "!**/dist/**" - "!**/.git/**" # Custom review instructions instructions: | Focus on: - Security vulnerabilities - Performance issues - Error handling Ignore: - Minor style suggestions (we use ESLint)
Path Filters Syntax
| Pattern | Effect |
|---|---|
"!**/test/**" | Exclude all test directories |
"src/**" | Only include src directory |
"!**/*.md" | Exclude markdown files |
"**/*.ts" | Only TypeScript files |
The ! prefix excludes matching paths.
Using CodeRabbit
Automatic Reviews
- Create a branch and make changes
- Open a Pull Request
- CodeRabbit automatically comments within minutes
- Review its suggestions inline
Interacting with CodeRabbit
Reply to CodeRabbit's comments in your PR:
| Command | Action |
|---|---|
@coderabbitai review | Request a new review |
@coderabbitai summary | Generate PR summary |
@coderabbitai resolve | Mark thread as resolved |
@coderabbitai ignore | Ignore this suggestion |
@coderabbitai help | Show available commands |
Providing Feedback
CodeRabbit learns from your responses:
- Dismiss a suggestion β It adjusts future reviews
- Accept a suggestion β Reinforces that pattern
- Thumbs up/down on comments β Direct feedback
CLI Workflow (Terminal-First)
For developers who live in the terminal:
bash# Create branch and make changes git checkout -b feature/new-thing # ... make changes ... git add . git commit -m "Add new feature" # Push and create PR with gh CLI git push -u origin feature/new-thing gh pr create --title "Add new feature" --body "Description here" # CodeRabbit reviews automatically # Check review status gh pr view --comments # After addressing feedback git add . git commit -m "Address CodeRabbit feedback" git push # Request re-review if needed (comment via gh) gh pr comment --body "@coderabbitai review"
Pricing Reminder
| Tier | Cost | Includes |
|---|---|---|
| Free | $0 | Public repos, unlimited |
| Pro | $15/user/month | Private repos |
| Enterprise | Custom | SSO, audit logs, SLAs |
Troubleshooting
CodeRabbit not reviewing?
- Check GitHub App is installed: Settings β Integrations
- Verify repo is enabled in CodeRabbit dashboard
- Check
.coderabbit.yamlsyntax if using custom config - Ensure PR meets
min_linesthreshold (default: 1)
Too many comments?
Add path filters to .coderabbit.yaml:
yamlpath_filters: - "!**/*.test.ts" - "!**/*.spec.ts" - "!**/fixtures/**"
Or add custom instructions:
yamlinstructions: | Be concise. Only flag critical issues. Skip minor style suggestions.
Want reviews on draft PRs?
yamlreviews: drafts: true
Links
- CodeRabbit Dashboard: https://app.coderabbit.ai
- Documentation: https://docs.coderabbit.ai
- Configuration Reference: https://docs.coderabbit.ai/reference/configuration
Related
- AI PR Review Tools - CodeRabbit vs Greptile vs Graphite - Tool comparison
- Git - Version control basics
- GitHub - Platform integration