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-cli
- run: rabbit -p "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-cli
- rabbit -p "review the MR diff and write findings to review.md"
artifacts:
paths:
- review.mdUse 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
Cost controls in CI
The CLI calls your provider directly with your own key, so each run is bounded by the task you give it and a per-task tool-call limit. For a hard ceiling, cap spend with your provider's usage limits, or point the run at a cheaper (or local) model via RABBIT_MODEL /RABBIT_PROVIDER.