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

# CLI Command Reference

> Reference for CodeRabbit CLI commands and options, generated from the CLI help output.

Generated from the help output of CodeRabbit CLI 0.9.6. Use `coderabbit` with every installation method; the install script and Windows installer also provide the `cr` shortcut. Run `coderabbit <command> --help` to see the same information in your terminal.

## Global usage

CodeRabbit CLI for code review and cloud coding.

Usage: `coderabbit [options] [command]`

| Option | Description |
| - | - |
| `-v, --version` | Show CLI version |

| Mode | Description |
| - | - |
| `--agent` | Emit structured findings for agents |
| review | Plain-text review of tracked changes |

## Commands

| Command | Description |
| - | - |
| [`auth`](#auth) | Manage authentication |
| [`review`](#review) | Review local changes |
| [`pullrequest`](#pullrequest) | Inspect a CodeRabbit-reviewed GitHub pull request |
| [`stats`](#stats) | Show statistics from locally stored review history |
| [`api`](#api) | Call the CodeRabbit Platform API |
| [`usage`](#usage) | Show included-review availability and billing-period usage |
| [`update`](#update) | Update CodeRabbit CLI to the latest version |
| [`config`](#config) | Create or configure CodeRabbit configuration |
| [`doctor`](#doctor) | Check CodeRabbit CLI installation and local review readiness |
| [`skills`](#skills) | Manage CodeRabbit agent skills |
| [`code`](#code) | Work with the CodeRabbit cloud Coding Agent |
| [`completion`](#completion) | Print a shell completion script |

### auth

Authentication commands

Usage: `coderabbit auth [options] [command]`

| Command | Description |
| - | - |
| [`login [options]`](#auth-login) | Authenticate with CodeRabbit |
| [`logout [options]`](#auth-logout) | Clear local authentication |
| [`status [options]`](#auth-status) | Show current authentication status |
| [`org [options]`](#auth-org) | Switch the active organization |

```bash Examples theme={null}
# Authenticate with CodeRabbit
coderabbit auth login

# Show current authentication status
coderabbit auth status

# Switch the active organization
coderabbit auth org

# Clear local authentication
coderabbit auth logout
```

#### auth login

Authenticate with CodeRabbit

Usage: `coderabbit auth login [options]`

| Option | Description |
| - | - |
| `--agent` | Emit structured JSON output for agent-driven OAuth login |
| `--self-hosted` | Use self-hosted CodeRabbit instance |
| `--no-browser` | Open the login URL yourself using a browser that can reach this machine's localhost callback (port forwarding may be required) |
| `--api-key <api-key>` | Authenticate with a CodeRabbit API key |
| `--region <region>` | Use CodeRabbit's US or EU region Choices: `us`, `eu` |

```bash Examples theme={null}
# Interactive login with browser
coderabbit auth login

# Agent-friendly OAuth login with JSON output
coderabbit auth login --agent

# Manually open the URL with localhost access
coderabbit auth login --agent --no-browser

# Self-hosted instance login
coderabbit auth login --self-hosted

# Authenticate with CodeRabbit EU
coderabbit auth login --region eu

# Store an API key for CLI reviews
coderabbit auth login --api-key "<api-key>"

# Store an EU API key
coderabbit auth login --region eu --api-key "<api-key>"
```

> [!NOTE]
>
> `--agent` is only supported for localhost browser callbacks and never accepts pasted OAuth tokens.

#### auth logout

Clear local authentication

Usage: `coderabbit auth logout [options]`

| Option | Description |
| - | - |
| `--agent` | Emit structured JSON output for agent-driven logout |

```bash Examples theme={null}
# Clear local authentication
coderabbit auth logout

# Emit structured logout output
coderabbit auth logout --agent
```

#### auth status

Show current authentication status

Usage: `coderabbit auth status [options]`

| Option | Description |
| - | - |
| `--agent` | Emit structured JSON output for agent-driven status check |

```bash Examples theme={null}
# Show current authentication status
coderabbit auth status

# Emit structured auth status as JSON
coderabbit auth status --agent
```

#### auth org

Switch the active organization

Usage: `coderabbit auth org [options]`

| Option | Description |
| - | - |
| `--id [id]` | Select this exact ID from your saved organization inventory without a prompt |
| `--agent` | Emit JSON; without `--id`, list organization names without switching |

```bash Examples theme={null}
# Switch the active organization
coderabbit auth org

# Emit available organizations as JSON
coderabbit auth org --agent

# Select an explicitly supplied saved organization ID
coderabbit auth org --id <saved-id> --agent
```

`--id` requires a saved organization ID. Use --id=`<value>` for an ID beginning with a dash. Selection uses only the inventory saved by your existing login; it does not discover access or switch accounts, regions or instances. Normal sign-in checks may refresh saved tokens. An unknown or uncached ID fails. Without `--id`, `--agent` remains a read-only names-only list.

### review

AI-driven code review for the current Git workspace

Usage: `coderabbit review [options] [command]`

A review that fails or doesn't cover every file exits with code `1`, even after printing findings; see [Exit codes](https://docs.coderabbit.ai/cli/agent-mode.md#exit-codes). For which changes each scope flag selects, see [Local review](https://docs.coderabbit.ai/cli/index.md#local-review).

| Option | Description |
| - | - |
| `--deep [focus]` | Use the full pull request review policy (focus text requires early access) |
| `--fresh` | Review selected changes without reusing the previous local checkpoint |
| `--show-prompts` | Print AI prompts without starting a new review |
| `--agent` | Emit structured findings for agent workflows |
| `--review-card` | Save this review card locally and include its ID in the final `--agent` result |
| `--gate <severity>` | Exit 2 for findings at or above this severity; review the selected diff fresh Choices: `critical`, `major`, `minor`, `trivial`, `info` |
| `--use-credits` | Use usage credits if this review exceeds included limits |
| `--committed` | Review only committed changes |
| `--uncommitted` | Review uncommitted Git changes |
| `--include-untracked` | Also review files that have not been added to Git |
| `-c, --config <files...>` | Additional instructions for CodeRabbit AI (e.g., claude.md, coderabbit.yaml) |
| `--context <path...>` | Include local files or folders as read-only review context (repeatable, relative to your current directory) |
| `--base <branch>` | Git base branch for comparison |
| `--base-commit <commit>` | Git base commit on current branch for comparison |
| `--dir <path>` | Review only changes inside this directory |
| `--remote <owner/repo>` | Review a GitHub repository on the server without a local checkout |
| `--source-branch <ref>` | Source branch or ref to review with `--remote` |
| `--api-key <key>` | API key for authentication |
| `--usage` | Show included reviews and billing-period usage instead of reviewing (alias of `coderabbit usage`) |
| `--region <region>` | Region for inline API key authentication Choices: `us`, `eu` |

| Command | Description |
| - | - |
| [`findings [options]`](#review-findings) | Show the most recent local review with stored findings |

```bash Examples theme={null}
# Review tracked changes
coderabbit review

# Review only committed changes
coderabbit review --committed

# Review uncommitted Git changes
coderabbit review --uncommitted

# Also review files not added to Git
coderabbit review --include-untracked

# Emit structured findings for agents
coderabbit review --agent

# Exit 2 for major or critical findings
coderabbit review --agent --gate major

# Use the full pull request review policy
coderabbit review --deep

# Review selected changes without the previous local checkpoint
coderabbit review --fresh

# Print prompts from the latest local review
coderabbit review --show-prompts

# Compare current branch against main
coderabbit review --base main

# Review changes inside that directory
coderabbit review --dir /path/to/workspace

# Review with an EU API key without storing it
coderabbit review --region eu --api-key "<key>"

# Show stored local review findings
coderabbit review findings

# Forget stored findings for this scope
coderabbit review findings --clear

# Review a GitHub repository without a local clone
coderabbit review --remote acme/app --base main --source-branch my-feature
```

> [!NOTE]
>
> * Plain text is the default review mode.
> * Use `coderabbit auth login --agent` for agent-driven OAuth login.
> * `--remote` requires `--base` and `--source-branch`, and runs outside any git checkout.

#### review findings

Show the most recent local review with stored findings

Usage: `coderabbit review findings [options]`

| Option | Description |
| - | - |
| `--dir <path>` | Review directory to read findings for |
| `--markdown` | Write stored findings as Markdown to stdout |
| `--clear` | Dismiss stored findings for this scope so they stop being surfaced |

```bash Examples theme={null}
# Show the most recent local review with stored findings
coderabbit review findings

# Show findings stored for a scoped review directory
coderabbit review findings --dir src

# Export findings to a Markdown file
coderabbit review findings --markdown > review.md

# Dismiss all stored findings for this scope
coderabbit review findings --clear
```

> [!NOTE]
>
> * A newer review with no stored findings does not hide older findings.
> * Clearing is scoped to the review directory, current branch, and base branch.
> * Findings stored under any other scope are left unchanged.

### pullrequest

Read existing CodeRabbit output without starting a review. Requires exactly one of `--show-prompts` or `--show-threads`.

Usage: `coderabbit pullrequest [options] <number-or-url>`

This command reads CodeRabbit's existing output for the pull request and does not start a review. Pass exactly one of `--show-prompts` or `--show-threads`: the command fails without one, and the two cannot be combined. If no prompt is found, check that [`reviews.enable_prompt_for_ai_agents`](https://docs.coderabbit.ai/reference/configuration#param-reviews-enable-prompt-for-ai-agents) is enabled in the configuration and that CodeRabbit has finished reviewing the pull request.

The command needs a CodeRabbit SaaS login or a stored API key, and self-hosted logins are not supported. Unlike `coderabbit review`, it does not start sign-in for you: if you have neither, run [`coderabbit auth login`](https://docs.coderabbit.ai/cli/reference#auth-login) first.

| Argument | Description |
| - | - |
| `<number-or-url>` | GitHub pull request number or URL |

| Option | Description |
| - | - |
| `--show-prompts` | Print the consolidated prompt for AI agents |
| `--show-threads` | Print CodeRabbit inline review-thread roots as JSON |
| `--agent` | Output newline-delimited JSON for agent integrations |

```bash Examples theme={null}
coderabbit pullrequest https://github.com/org/repo/pull/123 --show-prompts
coderabbit pullrequest https://github.com/org/repo/pull/123 --show-prompts --agent

# Read current inline thread roots
coderabbit pullrequest 123 --show-threads --agent

# Resolve the repository from local origin
coderabbit pullrequest 123 --show-prompts
```

> [!NOTE]
>
> * CodeRabbit SaaS sign-in or a stored agentic API key is required; the repository must be installed in the active organization.
> * Only github.com pull requests are supported. A full URL works outside a git checkout.

### stats

Show statistics from locally stored review history

Usage: `coderabbit stats [options]`

| Option | Description |
| - | - |
| `--rebuild` | Rebuild stats by rescanning review history |

```bash Examples theme={null}
# Show stats (builds on first run)
coderabbit stats

# Rescan review history and rebuild stats
coderabbit stats --rebuild
```

### api

Call the CodeRabbit Platform API

Usage: `coderabbit api [options] [command]`

| Option | Description |
| - | - |
| `--api-key-file <path>` | Read a key from a file for this API command without changing login |

| Command | Description |
| - | - |
| [`request [options] <endpoint>`](#api-request) | Call any CodeRabbit API endpoint and print its JSON response |
| [`me [options]`](#api-me) | Print the API key owner and selected organization as JSON |
| [`repositories`](#api-repositories) | Read accessible installed repositories as JSON |
| [`pull-requests`](#api-pull-requests) | Read repository pull requests and current review observations as JSON |

#### api request

Call any CodeRabbit API endpoint and print its JSON response

Usage: `coderabbit api request [options] <endpoint>`

| Argument | Description |
| - | - |
| `<endpoint>` | API-relative path, including any query parameters |

| Option | Description |
| - | - |
| `-X, --method <method>` | HTTP method; defaults to GET or POST with `--input` Choices: `GET`, `POST`, `PUT`, `PATCH`, `DELETE` |
| `--input <path>` | Read the JSON request body from a file |
| `-o, --output <path>` | Save a successful GET response as raw bytes in a new file |
| `--timeout <seconds>` | Optional deadline for the complete response, in seconds |

#### api me

Print the API key owner and selected organization as JSON

Usage: `coderabbit api me [options]`

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |

#### api repositories

Read accessible installed repositories as JSON

Usage: `coderabbit api repositories [options] [command]`

| Command | Description |
| - | - |
| [`list [options]`](#api-repositories-list) | |
| [`get [options] <repository-id>`](#api-repositories-get) | |

#### api repositories list

Usage: `coderabbit api repositories list [options]`

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |
| `--full-name <owner/name>` | Find one repository by owner/name instead of listing the catalog |
| `--limit <number>` | Repositories per catalog page (1–100) |
| `--cursor <cursor>` | Continue using the previous next\_cursor |

#### api repositories get

Usage: `coderabbit api repositories get [options] <repository-id>`

| Argument | Description |
| - | - |
| `<repository-id>` | Git provider repository ID |

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |

#### api pull-requests

Read repository pull requests and current review observations as JSON

Usage: `coderabbit api pull-requests [options] [command]`

| Command | Description |
| - | - |
| [`list [options] <repository-id>`](#api-pull-requests-list) | |
| [`get [options] <repository-id> <number>`](#api-pull-requests-get) | |
| [`review-status [options] <repository-id> <number>`](#api-pull-requests-review-status) | Read the existing CodeRabbit review observation as JSON |

#### api pull-requests list

Usage: `coderabbit api pull-requests list [options] <repository-id>`

| Argument | Description |
| - | - |
| `<repository-id>` | Git provider repository ID |

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |
| `--limit <number>` | Pull requests per page (1–100) |
| `--cursor <cursor>` | Continue using the previous next\_cursor |
| `--author <login>` | GitHub login, me (default), or all |
| `--state <state>` | Pull-request state Choices: `open`, `closed`, `merged`, `all` |
| `--head-branch <branch>` | Exact source branch |
| `--head-owner <login>` | Source repository owner |

#### api pull-requests get

Usage: `coderabbit api pull-requests get [options] <repository-id> <number>`

| Argument | Description |
| - | - |
| `<repository-id>` | Git provider repository ID |
| `<number>` | Pull-request number within the repository |

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |
| `--expected-head-sha <sha>` | Compare against a previously observed head |
| `--include <sections>` | checks (default), threads, checks,threads, or none |
| `--thread-author <login>` | Root author: `coderabbit` (default), all, or a GitHub login |
| `--thread-state <state>` | Thread resolution state Choices: `unresolved`, `resolved`, `all` |
| `--thread-limit <number>` | Threads per page (1–100) |
| `--thread-cursor <cursor>` | Continue the previous threads.next\_cursor |
| `--thread-include-outdated` | Include outdated threads |
| `--omit-thread-replies` | Return thread roots without reply context |

#### api pull-requests review-status

Read the existing CodeRabbit review observation as JSON

Usage: `coderabbit api pull-requests review-status [options] <repository-id> <number>`

| Argument | Description |
| - | - |
| `<repository-id>` | Git provider repository ID |
| `<number>` | Pull-request number |

| Option | Description |
| - | - |
| `--org-id <id>` | Git provider or CodeRabbit organization ID for a workspace key |
| `--org-name <name>` | GitHub organization login for a workspace key |

### usage

Show included-review availability and billing-period usage

Usage: `coderabbit usage [options]`

| Option | Description |
| - | - |
| `--agent` | Emit NDJSON usage, shared review cap, and credit balances when permitted |

```bash Examples theme={null}
# Show included reviews and billing-period usage
coderabbit usage

# Emit one machine-readable usage event
coderabbit usage --agent

# Same, via the default review command
coderabbit --usage
```

### update

Update CodeRabbit CLI to the latest version

Usage: `coderabbit update [options]`

When a newer version is available and Homebrew manages your installation, `coderabbit update` installs nothing. It prints the new version and the `brew upgrade coderabbit` command, then exits with status `0`, so a script can't treat a successful exit as proof that the CLI was updated. On Windows, the update finishes after the command exits; see [Update CodeRabbit CLI](https://docs.coderabbit.ai/cli/windows.md#update-coderabbit-cli).

```bash Examples theme={null}
# Check for and install updates
coderabbit update
```

> [!NOTE]
>
> Homebrew installations must be updated with `brew upgrade coderabbit`.

### config

Create or configure repository settings through a guided flow

Usage: `coderabbit config [options] [command]`

| Option | Description |
| - | - |
| `--agent` | Emit structured state for agent-guided setup without prompts |
| `--profile <profile>` | Review style for an agent-generated Standard proposal Choices: `chill`, `quiet`, `assertive`, `default` |
| `--generate` | Create or configure the repository settings (default) |
| `--detailed` | Choose a review style interactively (also edits path guidance in V2) |

```bash Examples theme={null}
coderabbit config
coderabbit config --generate
coderabbit config --detailed
coderabbit config --agent
coderabbit config --agent --generate
```

In your coding agent, ask to use the coderabbit-config skill. Where slash commands are supported, use /coderabbit-config (Claude plugin: /`coderabbit`:coderabbit-config).

Schema: Eligible hosted repositories: [https://www.coderabbit.ai/integrations/schema.v3.json](https://www.coderabbit.ai/integrations/schema.v3.json) Other new configurations use V2, as do eligible repositories when the V3 schema is unavailable. Existing V2 configurations: [https://www.coderabbit.ai/integrations/schema.v2.json](https://www.coderabbit.ai/integrations/schema.v2.json)

### doctor

Check CodeRabbit CLI installation and local review readiness

Usage: `coderabbit doctor [options]`

### skills

Install, update, or uninstall CodeRabbit skills for detected coding agents.

Usage: `coderabbit skills [options] [command]`

| Option | Description |
| - | - |
| `--agent` | Preview changes for approval in an agent conversation |
| `--confirm <plan-hash>` | Apply the exact previewed plan after user approval, without prompting |

| Command | Description |
| - | - |
| [`install [options]`](#skills-install) | Install missing skills and update existing skills |
| [`update [options]`](#skills-update) | Update existing skills without installing missing skills |
| [`uninstall [options]`](#skills-uninstall) | Uninstall skills owned by the CodeRabbit CLI |

```bash Examples theme={null}
coderabbit skills install
coderabbit skills update
coderabbit skills uninstall
```

Install also updates existing skills. Use `--agent` on a subcommand to preview a read-only plan for approval, then run its exact action\_required command.

#### skills install

Install missing skills and update existing skills

Usage: `coderabbit skills install [options]`

| Option | Description |
| - | - |
| `--agent` | Preview changes for approval in an agent conversation |
| `--confirm <plan-hash>` | Apply the exact previewed plan after user approval, without prompting |

Agent flow: run `coderabbit skills install --agent`, obtain approval for the complete plan, then run the exact command in the action\_required record.

#### skills update

Update existing skills without installing missing skills

Usage: `coderabbit skills update [options]`

| Option | Description |
| - | - |
| `--agent` | Preview changes for approval in an agent conversation |
| `--confirm <plan-hash>` | Apply the exact previewed plan after user approval, without prompting |

Agent flow: run `coderabbit skills update --agent`, obtain approval for the complete plan, then run the exact command in the action\_required record.

#### skills uninstall

Uninstall skills owned by the CodeRabbit CLI

Usage: `coderabbit skills uninstall [options]`

| Option | Description |
| - | - |
| `--agent` | Preview changes for approval in an agent conversation |
| `--confirm <plan-hash>` | Apply the exact previewed plan after user approval, without prompting |

Marketplace plugins, npx-managed skills, project copies, and other externally owned skills are never removed.

### code

Use the same Coding Agent and skill library as the web app. Coding Agent commands are in beta.

Usage: `coderabbit code [options] [command]`

Every `coderabbit code` command needs a CodeRabbit SaaS user login and acts in your selected organization. API key, self-hosted, and SSO workspace logins are not supported ([requirements](https://docs.coderabbit.ai/cli/cloud-tasks.md#requirements)). If no organization is selected, run [`coderabbit auth org`](https://docs.coderabbit.ai/cli/reference#auth-org) in an interactive terminal first. To learn what the cloud Coding Agent does with the work you send it, see [Coding Agent](https://docs.coderabbit.ai/code/index.md).

| Command | Description |
| - | - |
| [`handoff [options]`](#code-handoff) | Continue a local coding session in a new cloud task |
| [`ls [options]`](#code-ls) | List your cloud Coding Agent tasks |
| [`show [options] <task>`](#code-show) | Show a cloud Coding Agent task |
| [`permissions [options] <task>`](#code-permissions) | Read or set a cloud task's repository access |
| [`settings [options] <task>`](#code-settings) | Read or change a cloud task's settings |
| [`pin [options] <task>`](#code-pin) | Pin a cloud task in your personal list |
| [`unpin [options] <task>`](#code-unpin) | Unpin a cloud task from your personal list |
| [`notifications [options] <task>`](#code-notifications) | Show or change your Coding Agent Slack notifications |
| [`new [options] [prompt]`](#code-new) | Start a cloud Coding Agent task |
| [`goal [options] <task>`](#code-goal) | Read, set, or clear a cloud task's goal |
| [`resume [options] [task]`](#code-resume) | Follow and continue a cloud Coding Agent task |
| [`queue [options] <task>`](#code-queue) | Inspect or resume a task's paused queue |
| [`cancel [options] <task>`](#code-cancel) | Stop the running turn of a cloud Coding Agent task |
| [`archive [options] <task>`](#code-archive) | Archive a cloud Coding Agent task |
| [`unarchive [options] <task>`](#code-unarchive) | Restore an archived cloud Coding Agent task |
| [`ask [options] <task> <question>`](#code-ask) | Ask a side question about a cloud Coding Agent task |
| [`outputs [options] <task>`](#code-outputs) | List or save a task's output files |
| [`side-chats [options] <task>`](#code-side-chats) | List or close a task's side chats |
| [`schedules [options] <task>`](#code-schedules) | List schedules or delete a selected revision |
| [`plan [options] <task>`](#code-plan) | Show, approve, or implement a cloud Coding Agent plan |
| [`fix [options] <task> <kind>`](#code-fix) | Ask the agent to repair an existing task's pull request |
| [`push [options] <task>`](#code-push) | Push the changes of a cloud Coding Agent task |
| [`autofix\|autopilot [options] <action> [task]`](#code-autofix) | Control Autofix for a cloud task or pull request |
| [`skills`](#code-skills) | Manage cloud Coding Agent skills |

#### code handoff

Create a new CodeRabbit Cloud task with a summary, optional plan, and automatically discovered session transcript

Usage: `coderabbit code handoff [options]`

`--summary` is required. Run the command from a clean checkout of a branch that has an `origin` remote. Untracked files count as changes, so keep the summary and plan files outside the repository or commit them first. For what is uploaded and what happens next, see [Continue a local session in the cloud](https://docs.coderabbit.ai/cli/cloud-tasks.md#continue-a-local-session-in-the-cloud).

| Option | Description |
| - | - |
| `--summary <path\|->` | Session summary file, or - to read from stdin (required) |
| `--plan <path>` | Primary implementation plan file |
| `--agent` | Emit newline-delimited JSON for agent workflows |
| `--access <mode>` | Request repository access after creation; full requires browser authorization Choices: `manual`, `full` |

#### code ls

List one page of cloud tasks, most recently updated first, in the selected organization. Use `--cursor` with the returned next cursor and the same filters to continue. Only your tasks are listed unless you pass `--all`; `--all` does not fetch all pages. Archived tasks are excluded unless you pass `--include-archived`. This is a live listing, not a snapshot.

Usage: `coderabbit code ls [options]`

| Option | Description |
| - | - |
| `--limit <count>` | Maximum tasks per page (1-100) Default: `20` |
| `--cursor <cursor>` | Continue from the previous page's next cursor |
| `--status <state>` | Only list tasks in this web task list state Choices: `needs_attention`, `ready_for_review`, `running`, `completed`, `canceled` |
| `--repo <path>` | Only list tasks for the Git repository at this path, for example . |
| `--all` | Include tasks from other people in the organization |
| `--pinned` | Only list tasks you pinned in this organization |
| `--search <title>` | Only list task titles containing this text (up to 200 characters) |
| `--pr-number <number>` | Only list tasks for this source or delivered PR number |
| `--include-archived` | Include archived tasks in this page |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code show

Show the status, repository, delivery, and pull request health of a cloud task.

Usage: `coderabbit code show [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code permissions

Read saved and active-turn access. Changes apply to subsequent turns through the existing revocation policy; this command never restarts or resends work. Full access requires your verified GitHub grant and does not bypass branch protection.

Usage: `coderabbit code permissions [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--set <mode>` | Explicitly select repository access Choices: `manual`, `full-access`, `full` |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code settings

Read saved settings by default. Pass exactly one setting to change it without starting or restarting work. Settings can change while a task runs.

Usage: `coderabbit code settings [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--title <text>` | Rename the task (1–200 characters) |
| `--mode <mode>` | Select code or Plan mode |
| `--review <setting>` | Turn CodeRabbit review on or off |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code pin

Save a task in your personal pinned list. Find your pinned tasks with code ls `--pinned`; add `--all` to include tasks owned by other people.

Usage: `coderabbit code pin [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code unpin

Remove a task from your personal pinned list.

Usage: `coderabbit code unpin [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code notifications

Select your organization first with `coderabbit auth org`. Use a task from that active organization; a task from another organization fails. These preferences apply to your Coding Agent tasks across the active organization, not just this task. Without `--all-events`, show whether any event type is enabled; this cannot identify individual enabled types. `--all-events` on or off sets all five event types: turn end, input needed, pull request created, commit pushed and plan ready. Enabling requires your existing Slack access and linked account. No task turn is started.

Usage: `coderabbit code notifications [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or URL in the active organization |

| Option | Description |
| - | - |
| `--all-events <on\|off>` | Enable or disable all five event types for your tasks in the active organization Choices: `on`, `off` |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code new

Start a cloud task on the current branch of the Git repository in this directory. The task starts from that branch on origin. Local commits that are not pushed and uncommitted changes are not included.

Usage: `coderabbit code new [options] [prompt]`

| Argument | Description |
| - | - |
| `[prompt]` | What the agent should do, or - to read it from stdin. Interactive mode prompts when omitted; agent mode requires it |

| Option | Description |
| - | - |
| `--plan` | Start in Plan mode: the agent writes a plan for review instead of changing code |
| `--resume` | Follow the task after it starts, as `coderabbit code resume` does |
| `--goal` | Start in Goal mode, using the prompt as the goal (1–4,000 characters) |
| `--goal-objective <text>` | Use a separate goal objective with `--goal` |
| `--agent` | Emit newline-delimited JSON for agent workflows |
| `--access <mode>` | Repository access from the first turn; full-access requires a verified personal GitHub grant (full is an alias) Choices: `manual`, `full-access`, `full` |
| `--private` | Create a task visible only to you from the start Default: `false` |

#### code goal

Read the goal by default. Setting an objective preserves paused/limited states; editing a completed goal restarts it. Clearing removes the goal. Use code cancel to stop a turn and code resume `-m` to send instructions.

Usage: `coderabbit code goal [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--set <objective>` | Set the goal (1–4,000 characters), or - to read stdin |
| `--clear` | Remove the goal |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code resume

Open a cloud task in the terminal. Shows its trace and live updates, and lets you send messages, steer the running turn, answer agent questions, and stop the turn. Closing the view does not stop the task. With `--agent`, send at most one message, steer, or answer, then stream newline-delimited JSON until the turn ends, the agent asks a blocking question, or 9 minutes pass. Add `--interactive` for a persistent bidirectional NDJSON session: send message, steer, answer, cancel, show, or close requests on stdin; receive correlated responses and live trace events on stdout. EOF detaches without stopping the task.

Usage: `coderabbit code resume [options] [task]`

| Argument | Description |
| - | - |
| `[task]` | Task ID or task URL. In a terminal, omit it to pick one of your recent tasks; with `--agent`, pass it or `--last` |

| Option | Description |
| - | - |
| `--last` | Use your most recently updated task for the Git repository in the current directory |
| `-m, --message <message>` | With `--agent`: send a message. Use - to read it from stdin |
| `--attach <path>` | With `--agent` `--message`: attach a local file (repeatable) |
| `--steer <message>` | With `--agent`: steer the running turn. Use - to read it from stdin |
| `--answer <json>` | With `--agent`: answer the pending question with the JSON from its answerTemplate. Use - to read it from stdin |
| `--agent` | Emit newline-delimited JSON for agent workflows |
| `--interactive` | With `--agent`: keep a bidirectional NDJSON session open on piped stdin |

#### code queue

List queued messages and the current pause ID. To resume work that a Stop paused, pass `--resume` with `--expected-pause-id` from this list. The pause is checked again before resuming. Resuming uses the existing queued messages and billing; this command does not wait for their turns to finish.

Usage: `coderabbit code queue [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--resume` | Resume the selected paused queue |
| `--expected-pause-id <pause-id>` | Pause ID shown by code queue |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code cancel

Stop the running turn. Queued messages do not run after it: the server pauses or drops them. The task stays open: a new message starts a new turn.

Usage: `coderabbit code cancel [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code archive

Archive one task without prompting: hide it from the active task list, make it read-only, and pause its schedules. It can be unarchived later. Running, starting, or stopping turns must finish first. Repeating an archive succeeds. This does not cancel turns or delete tasks.

Usage: `coderabbit code archive [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code unarchive

Unarchive one task without prompting. This does not start a turn or resume paused schedules. Workspace and Automation tasks are not supported.

Usage: `coderabbit code unarchive [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code ask

Ask the task's side chat a question and print the answer. A side chat reads the task's conversation and repository. It does not change the task, and the turn of the task keeps running. Each question is billed. The side chat stays open for follow-up questions: pass `--follow-up` with the turn ID of an earlier answer to keep its context. A task can have 3 open side chats. An idle side chat expires after 24 hours. Use code side-chats to list or close existing side chats. The command waits up to 3 minutes for the task's environment and up to 15 minutes for the answer.

Usage: `coderabbit code ask [options] <task> <question>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |
| `<question>` | The question. Use - to read it from stdin |

| Option | Description |
| - | - |
| `--follow-up <turn-id>` | Ask in the side chat of an earlier answer. Pass the turn ID that the answer printed |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code outputs

List generated output files. Pass `--save` with a server path to save that file's basename in the current directory. Existing files are never overwritten. Agent output contains metadata, not file contents.

Usage: `coderabbit code outputs [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--save <server-path>` | Save the specified output file |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code side-chats

List existing side chats without asking a question. Pass `--close` with a listed side-chat ID to close it. Closing can continue after this command returns; the output reports the server's current status. The task's turn keeps running.

Usage: `coderabbit code side-chats [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--close <side-chat-id>` | Close the specified side chat |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code schedules

List a task's schedules. To delete one, pass its ID, observed revision and `--yes`. Deleting stops later runs; already dispatched work can still run. This command cannot create or edit schedules.

Usage: `coderabbit code schedules [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--delete <schedule-id>` | Delete the specified schedule |
| `--expected-revision <revision>` | Revision observed in code schedules |
| `--yes` | Confirm deletion of the selected schedule revision |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code plan

Show the latest finalized plan of a cloud task. With `--approve`, record your approval of that plan version. You cannot approve the plan of a task that you started. With `--implement`, request implementation of the selected version. Approval alone does not start implementation.

Usage: `coderabbit code plan [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--approve` | Approve the latest plan version as a reviewer |
| `--implement` | Request implementation of the latest plan version |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code fix

Request a new billed turn to fix CI, address review `comments`, or resolve merge `conflicts` on the task's existing PR. This command does not wait for the repair to finish. Existing task permissions and billing apply.

Usage: `coderabbit code fix [options] <task> <kind>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |
| `<kind>` | `ci`, `comments`, or `conflicts` |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code push

Deliver the ready changes of a cloud task and wait until the delivery finishes. By default, CodeRabbit commits and pushes the changes, as the web app's Commit and push action does. GitHub can first ask you to authorize CodeRabbit in a browser that is signed in to CodeRabbit.

Usage: `coderabbit code push [options] <task>`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |

| Option | Description |
| - | - |
| `--stacked` | Open a new pull request with the changes, as the web app's Create PR action does |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code autofix

Autofix publishes the task's changes when the agent finishes, then fixes CodeRabbit findings, required CI, and merge conflicts. `on` starts it, `off` stops it, `resume` starts a new repair episode after a pause, and `status` shows its state. Activation does not confirm a repair turn started; a failed task may need to be retried or continued before resuming Autofix. `recover` resolves a pending delivery conflict while preserving unpublished work; `resume` after recovery finishes. Pass exactly one target: a task ID or URL, or `--pr` `<number|url>`. `on`, `resume` and `recover` check Coding Agent billing; `on` and `resume` with `--pr` can create an Autofix task for the pull request.

Usage: `coderabbit code autofix|autopilot [options] <action> [task]`

| Argument | Description |
| - | - |
| `<action>` | `on`, `off`, `resume`, `recover`, or `status` |
| `[task]` | Task ID or task URL |

| Option | Description |
| - | - |
| `--pr <number\|url>` | Target a pull request: a number in the current repository, or a GitHub pull request or GitLab merge request URL |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code skills

Manage cloud Coding Agent skills

Usage: `coderabbit code skills [options] [command]`

| Command | Description |
| - | - |
| [`list [options]`](#code-skills-list) | List available cloud library skills and versions |
| [`run [options] <task> <skill-id> <version-id> [message]`](#code-skills-run) | Run an exact cloud library skill version on a task |
| [`import [options] [path]`](#code-skills-import) | Import local agent skills into your cloud library |

#### code skills list

List active skills available to you in the selected organization. Use the skill ID and version ID to run an exact version.

Usage: `coderabbit code skills list [options]`

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code skills run

Request a new billed turn with the selected library skill ID and immutable version ID. It starts when the task queue allows it; this command does not wait for completion or resume a paused queue. No skill name or latest version is inferred.

Usage: `coderabbit code skills run [options] <task> <skill-id> <version-id> [message]`

| Argument | Description |
| - | - |
| `<task>` | Task ID or task URL |
| `<skill-id>` | Library skill ID from code skills list |
| `<version-id>` | Immutable version ID from code skills list |
| `[message]` | Instructions for the skill, or - to read from stdin |

| Option | Description |
| - | - |
| `--agent` | Emit newline-delimited JSON for agent workflows |

#### code skills import

Choose an agent, select local skills, and review their import into the cloud library. Pass a skill folder or SKILL.md to import one directly. With `--yes` and no `--scope`, new skills are personal within the selected organization and existing skills keep their visibility. Importing an owned skill with the same name publishes a new version. Noninteractive imports require a path and `--yes`.

Usage: `coderabbit code skills import [options] [path]`

| Argument | Description |
| - | - |
| `[path]` | Skill folder or its SKILL.md |

| Option | Description |
| - | - |
| `--scope <scope>` | Who can use the imported skill Choices: `personal`, `organization` |
| `--yes` | Upload the specified path without prompting |

### completion

Print the shell completion script for `coderabbit` and `cr`. It completes commands, options, and the task IDs that this computer listed or opened.

Usage: `coderabbit completion [options] <shell>`

| Argument | Description |
| - | - |
| `<shell>` | Shell type for completion script Choices: `zsh`, `bash`, `fish`, `powershell` |

```bash Examples theme={null}
# Add to ~/.bashrc
eval "$(coderabbit completion bash)"

# Add to ~/.zshrc, after compinit
eval "$(coderabbit completion zsh)"

# Add to ~/.config/fish/config.fish
coderabbit completion fish | source

# Add to $PROFILE
coderabbit completion powershell | Out-String | Invoke-Expression
```

> [!NOTE]
>
> * The script completes `coderabbit` and the `cr` alias.
> * Task IDs come from the tasks that this computer listed or opened with `coderabbit code`. A Tab press makes no network call.


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