wit review catches issues before they hit the remote repository.
Overview
Thewit review command analyzes your changes and provides AI-powered feedback, helping you catch bugs, security issues, and code quality problems before they reach code review.
Quick Start
Options
| Option | Description |
|---|---|
--staged, -s | Review only staged changes |
--branch, -b | Review all changes since branching from main |
--commits <range> | Review specific commit range |
--base <branch> | Compare against specific branch (default: main) |
--json | Output as JSON |
--verbose, -v | Show detailed output |
--strict | Exit with error if critical/high issues found |
--configure | Configure CodeRabbit API key |
--status | Show configuration status |
Review Modes
Uncommitted Changes
Review all changes in your working directory (staged and unstaged).Staged Changes
Review only what’s staged for commit. Useful as a pre-commit check.Branch Changes
Review all changes since branching from the base branch.Commit Range
Review specific commits.Example Output
CI Integration
Use--strict mode to fail builds when issues are found.
Pre-push Hook
CI Pipeline
Configuration
Setup CodeRabbit
- Get an API key from coderabbit.ai
- Configure it:
Check Status
JSON Output
Get structured output for programmatic use.Workflow Examples
Pre-commit Workflow
Pre-push Workflow
Pull Request Workflow
Issue Severity Levels
| Level | Description | Action |
|---|---|---|
| 🔴 Critical | Security vulnerabilities, data loss risks | Must fix before merge |
| 🔴 High | Bugs, significant logic errors | Should fix before merge |
| 🟡 Medium | Code quality, maintainability | Consider fixing |
| 🟢 Low | Style, minor improvements | Optional |
Related Documentation
- AI Features - AI-powered capabilities
- PR Command - PR management including PR reviews
- Hooks - Git hooks for automation