> ## 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.

# Configuration in CLI and IDE reviews

> See how local CLI and IDE reviews find and apply configuration, and how cr config creates or edits your configuration file.

Local reviews run from your machine before you open a pull request. The CLI and the IDE extensions read your repository's configuration file and layer it over your organization's settings. They read it from different places than hosted pull request reviews do, and the IDE applies only part of it.

## How the CLI finds configuration

Without explicit `--config` files, `cr review` looks for a configuration file, checks the review directory first and the Git repository root second for each name, and uses the first file it finds. YAML wins over TypeScript.

| Order | File name |
| - | - |
| 1 | `.coderabbit.yaml` |
| 2 | `.coderabbit.yml` |
| 3 | `coderabbit.yaml` |
| 4 | `coderabbit.yml` |
| 5 | `.coderabbit.config.ts` (CLI 0.7.7 or later) |

Pass `--committed` to read the discovered configuration from the Git snapshot instead of the working tree.

CodeRabbit applies only `.coderabbit.yaml`, `.coderabbit.yml` and `.coderabbit.config.ts`, the same names as in [pull request reviews](https://docs.coderabbit.ai/configuration/file.md#add-the-file-to-your-repository). The CLI sends only the first file it finds. When that file is `coderabbit.yaml` or `coderabbit.yml`, the review runs with your organization's settings and no repository file, and a `.coderabbit.config.ts` in the repository isn't sent. Rename the file to `.coderabbit.yaml`.

## Pass extra instruction files to the CLI

Use `-c` or `--config` to give the review more instructions, such as a `claude.md` file. The CLI reads explicit files from the filesystem.

```bash theme={null}
cr review --config claude.md coderabbit.yaml
```

## Remote CLI reviews

> [!NOTE]
>
> `cr review --remote` reads configuration from the reviewed repository on the server and ignores local `--config` files. It works with GitHub Cloud only. Self-hosted CodeRabbit doesn't support it, although you can point the CLI at a self-hosted instance for local reviews.

See [CLI with self-hosted CodeRabbit](https://docs.coderabbit.ai/cli/cli-with-self-hosted-CodeRabbit.md) for the instance setup.

## Create or edit the file with cr config

`cr config` creates `.coderabbit.yaml` at the repository root or updates an existing one. It validates the change, shows a preview and asks before it saves.

**1. Run the command in a repository**

Run `cr config` for the standard setup, or `cr config --detailed` to add path instructions. Use CLI 0.7.7 or later in an interactive terminal.

**2. Review the proposed change**

The command keeps your existing settings and shows what it adds.

**3. Save, commit and push**

Commit and push the file so pull request reviews use it.

> [accordion] When cr config refuses
>
> Guided setup stops when:
>
> * Both `.coderabbit.yaml` and `.coderabbit.yml` exist.
> * The target file is a symbolic link.
> * The repository has only a `.coderabbit.config.ts` file.
> * The file delegates through `remote_config`.
>
>   Resolve the situation or edit the existing source instead.

To draft a change from a script or an agent without prompts, see [Automate configuration with the API, MCP and CLI](https://docs.coderabbit.ai/configuration/guides/automate.md).

## Configuration in IDE reviews

Each IDE review uploads one configuration file. The VS Code extension reads it from the root of the workspace folder you opened, which isn't always the repository root. The JetBrains plugin reads it from the Git repository root. Saved edits count; unsaved edits don't. CodeRabbit layers the file over your organization's settings for the repository, following normal [inheritance](https://docs.coderabbit.ai/configuration/inheritance-and-merging.md).

| Setting group | Applies in IDE reviews? |
| - | - |
| `path_filters`, `path_instructions`, `profile` | Yes |
| Code guidelines and existing Learnings | Yes |
| Tools and codebase context | Yes, with Essentials or higher and a connected repository |
| `linked_repositories` | Only from organization settings |
| Pre-merge checks | No |
| Walkthroughs, summaries, labels, `auto_review`, automatic approvals | No |

Free IDE reviews without a seat use the default settings. For setup, see [IDE settings](https://docs.coderabbit.ai/ide/settings.md).

| Extension | Names it looks for, in order |
| - | - |
| VS Code extension, including Cursor, Windsurf and other VS Code-based editors | `.coderabbit.yaml`, `.coderabbit.yml`, `.coder.yaml` |
| JetBrains plugin | `.coderabbit.yaml`, `.coderabbit.yml`, `coderabbit.yaml`, `coderabbit.yml` |

Only `.coderabbit.yaml` and `.coderabbit.yml` take effect. A review that finds only `.coder.yaml`, `coderabbit.yaml` or `coderabbit.yml` uses your organization's settings without a repository file. Neither extension sends `.coderabbit.config.ts`.

## What's next

> [card] [CLI](https://docs.coderabbit.ai/cli.md)
>
> Install and run local reviews.

> [card] [IDE settings](https://docs.coderabbit.ai/ide/settings.md)
>
> Configure the IDE extensions.

> [card] [Automate configuration](https://docs.coderabbit.ai/configuration/guides/automate.md)
>
> Read and change configuration from scripts and agents.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.