Docs / CLI & headless
CI / CD integration.
Overview
Use rabbit-cli in your CI pipeline to run AI-powered code review, test generation, migration, and quality checks on every push or pull request.
GitHub Actions example
name: Rabbit AI Review
on: [pull_request]
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install -g @rabbit-ide/cli
- run: rabbit run --diff "review the changes in this PR for bugs and security issues"
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}GitLab CI example
rabbit-review:
stage: review
image: node:22
script:
- npm install -g @rabbit-ide/cli
- rabbit run --json "review the MR diff" > review.json
artifacts:
paths:
- review.jsonUse cases
- PR review bot -- analyze diffs for bugs, security, style
- Auto-fix -- fix lint errors and commit the result
- Test generation -- generate missing tests for changed files
- Migration -- apply schema or API migrations project-wide
- Documentation -- auto-generate docs for new exports
Budget controls in CI
Set RABBIT_BUDGET_USD=2.00 as an environment variable to cap cloud spend per CI run. The agent stops gracefully when the budget is exhausted.