Documentation Index
Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
Use this file to discover all available pages before exploring further.
Before you start
Enable the Usage-based Add-on
The non-interactive API-key flow requires an Agentic API key. Enable the Usage-based Add-on first so your organization can generate and use one for CLI reviews.
Create an Agentic API key
Go to API Keys in the CodeRabbit dashboard and generate an Agentic API key for the organization that should power your CLI reviews.
Store the key as a secret
Save the key in your automation platform as a secret such as
CODERABBIT_API_KEY, then expose it as an environment variable wherever your automation runs.Headless setup
- Single command
- Authenticate first (chain of commands)
Pass the key directly to the command:
Common automation patterns
Use--agent when another tool needs structured output:
--plain when you want readable logs in the workflow output:
--type uncommitted.
cr is the short alias for coderabbit, so cr review --agent and coderabbit review --agent work the same way.
Troubleshooting
User API key rejected
User API key rejected
If authentication fails with a message saying user API keys are not supported, generate an Agentic API key instead. The CLI validates the key before storing it locally and rejects unsupported key types.
No stored API key found
No stored API key found
If a later review step says no stored API key was found, make sure the
coderabbit auth login --api-key step ran successfully earlier in the same environment and that the secret was exposed to that step.Interactive mode does not work with API-key auth
Interactive mode does not work with API-key auth
API-key authentication works with the plain and agent review flows. Do not use
--interactive in headless environments.What’s next
Usage-based Add-on
Enable credits, manage billing, and understand how CLI reviews consume usage
CLI Command Reference
Review authentication commands, review modes, and CLI options
Codex integration
Combine headless CLI authentication with Codex-driven implementation and review loops