Skip to main content
In this guide, we will cover the configuration using a YAML file. For the complete list of available options, see the Configuration Reference. For ready-to-use examples tailored to specific frameworks and languages, see Configuration Examples.
Prefer to write your configuration as code? TypeScript configuration adds type checking, shared configuration fragments, and settings that adapt to the pull request or CLI invocation. A committed .coderabbit.yaml always takes precedence over .coderabbit.config.ts.
Move existing UI configuration to a YAML file?Use the @coderabbitai configuration command on any PR to get the resolved configuration in YAML format. The response includes source comments that show where settings came from, such as repository YAML, central configuration, UI settings, defaults, global overrides, etc. You can then copy the configuration to a .coderabbit.yaml file in the root of your repository.

Configure CodeRabbit using a YAML File

.coderabbit.yaml configuration file must be located in the root of the repository. The configuration present in the feature branch under review will be automatically detected and used by CodeRabbit for that review.

Example Configuration

.coderabbit.yaml

Configuration Options

The configuration file supports numerous options for customizing CodeRabbit’s behavior. For the complete list of available configuration options and their descriptions, see the configuration reference.

Configuration Reference

Complete documentation of all options

Configuration Examples

Ready-to-use examples for popular frameworks and languages

Shared configuration

Use shared configuration to share a CodeRabbit configuration across multiple repositories. You can either reference a configuration file from a repository that CodeRabbit can read through the same platform connection it uses for reviews, or reference a publicly accessible configuration file by URL.

Requirements

  • The shared configuration repository must belong to the same owner or organization as the repository under review. A bare repository: name resolves within the reviewed repository’s owner or organization.
  • A repository: source can be public or private, but the CodeRabbit installation must be able to access it. If CodeRabbit is installed on selected repositories only, add the shared configuration repository to that selection.
  • A url: source must be publicly reachable over HTTPS. CodeRabbit retrieves it without authentication and the request times out after five seconds.
To use shared configuration, you need to:
  1. Create a .coderabbit.yaml file in a repository that meets the requirements above, or host it at a publicly accessible HTTPS URL.
  2. Create a .coderabbit.yaml file in the root of your repository with the following content:
GitHub repositories use the repository format.