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

# Antigravity integration

> Install the CodeRabbit plugin in Google Antigravity so the agent reviews your local changes with CodeRabbit, fixes the findings, and applies CodeRabbit pull request feedback.

The CodeRabbit plugin for Google Antigravity lets the agent:

* Review your local changes with CodeRabbit and fix the findings.
* Apply CodeRabbit's review comments from your GitHub pull request.

The plugin works in the Antigravity App and the Antigravity CLI (`agy`), and runs the [CodeRabbit CLI](https://docs.coderabbit.ai/cli.md) on your machine. It's open source under the MIT license: read its skills and agents, or report issues, in the [coderabbitai/skills repository](https://github.com/coderabbitai/skills).

**What you need:**

* The CodeRabbit CLI and a CodeRabbit account. [Set up](#set-up) covers installing the CLI and signing in.
* The Antigravity App or the Antigravity CLI.
* For pull request feedback only: a GitHub repository and the GitHub CLI (`gh`), signed in.

> [!NOTE]
>
> This page covers the App and the CLI. In the standalone Antigravity IDE, you can use the [CodeRabbit IDE extension](https://docs.coderabbit.ai/ide.md), which the IDE installs from Open VSX.

## Set up

To have the Antigravity agent run these steps for you, see [Set up from an agent](#set-up-from-an-agent).

**1. Install the CodeRabbit CLI**

**Install script**

```bash theme={null}
curl -fsSL https://cli.coderabbit.ai/install.sh | sh
```

If `coderabbit` is not available immediately after installation, start a new shell, or run the exact shell-specific reload command printed under **Next steps**. If the install script offers browser sign-in without first asking for a region, EU users should skip it and authenticate later with an explicit `--region eu`.

**Homebrew**

```bash theme={null}
brew install coderabbit
```

If `coderabbit` is not available immediately after installation, start a new shell.

**Windows**

```powershell PowerShell theme={null}
irm https://cli.coderabbit.ai/install.ps1 | iex
```

See [Install CodeRabbit CLI on Windows](https://docs.coderabbit.ai/cli/windows.md) for prerequisites, version pinning, and troubleshooting. If `coderabbit` is not available immediately after installation, open a new PowerShell window.

Check that it's on your `PATH`:

```bash theme={null}
coderabbit --version
```

The command prints a version number, such as `0.9.0`.

**2. Sign in to CodeRabbit**

Run this in your own terminal, not through the agent:

```bash theme={null}
coderabbit auth login
```

A browser window opens. Complete sign-in there. For a first login to an EU-hosted account, use `coderabbit auth login --region eu`. If you belong to more than one organization, see [Organization selection](https://docs.coderabbit.ai/cli.md#organization-selection).

Check the result:

```bash theme={null}
coderabbit auth status
```

The output shows your user, organization, and region. The plugin never starts a login itself; when you're signed out, the agent asks you to run this step.

**3. Install the plugin**

**Antigravity App**

1. In the left sidebar, open **Customizations**.
2. In the marketplace, find **CodeRabbit**.
3. Click **+** on the plugin card.

Plugins installed in the App also appear in the Antigravity CLI.

**Antigravity CLI**

Install from the official marketplace:

```bash theme={null}
agy plugin install coderabbit
```

Inside an `agy` session, you can instead run `/plugin`, press <kbd>Tab</kbd> to open **Discover**, select **CodeRabbit**, and press <kbd>Ctrl+S</kbd>.

To install from the GitHub repository instead:

```bash theme={null}
agy plugin install https://github.com/coderabbitai/skills
```

**4. Check the plugin**

* **Antigravity App:** CodeRabbit is listed under **Customizations** > **Installed**.
* **Antigravity CLI:** `agy plugin list` shows `coderabbit` marked `enabled`.

The plugin adds the `code-review` and `autofix` skills, and `code-reviewer` and `autofix` agents that do the same work in their own context.

Your first review asks for approval to run `coderabbit` commands and, in the App's **Default** and **Auto** presets, to run them outside the sandbox. Approve, or allow them in advance as described in [Permissions and sandbox](#permissions-and-sandbox).

## Review your changes

Ask the agent in plain language. The `code-review` skill activates for review requests:

```text theme={null}
Review my changes.
Review my uncommitted changes with CodeRabbit.
Review only my committed changes against develop.
```

The skill maps your request to a review scope:

| Ask for | CLI scope |
| - | - |
| Your changes (default) | Committed, staged, and tracked unstaged changes |
| Uncommitted changes | `--uncommitted` |
| Committed changes only | `--committed` |
| A base branch or commit | `--base <branch>` or `--base-commit <hash>` |
| A repository in another folder | `--dir <path>` |
| New files not added to Git | `--include-untracked` |

To make sure the skill is used, name it in the prompt, for example `Use the code-review skill to review my changes.` Antigravity also exposes skills as slash commands; see [Antigravity skills](https://antigravity.google/docs/skills/).

When you ask for a review, the agent:

1. Runs `coderabbit auth status --agent` and continues only when you're signed in.
2. Runs `coderabbit review --agent` with the scope you asked for. A review can take several minutes; allow at least 15 minutes before you treat it as stuck.
3. Presents the findings grouped by CodeRabbit's severities: critical, major, minor, trivial, and info.

To have the agent fix findings, ask for implementation and review together:

```text theme={null}
Add rate limiting to the login endpoint, then review it with CodeRabbit and fix the critical and major findings.
```

The agent fixes the findings, reviews again to verify the fixes, and reports what remains. It stops after the requested fixes are verified instead of looping.

A result with `status: review_skipped` and zero findings means no review ran, usually because the scope has no changes. It doesn't mean the code is clean. See [agent mode output](https://docs.coderabbit.ai/cli/agent-mode.md#reviews-with-no-changes).

**Usage credits.** When your included reviews are used up and your organization runs [usage-based reviews](https://docs.coderabbit.ai/cli.md#usage-based-reviews-and-consent) on demand, the review stops and returns the billable file count and maximum price. The agent explains the offer and reruns the review with `--use-credits` only if you agree. To have Antigravity ask before each review as well, see [Require approval for paid reviews](#permissions-and-sandbox). Run `coderabbit usage` to check your allowance.

## Apply pull request feedback

The `autofix` skill applies CodeRabbit's review comments from your pull request on GitHub. It uses the GitHub CLI, not the CodeRabbit CLI.

It needs `gh` signed in (`gh auth status` succeeds) and an open GitHub pull request for the current branch that CodeRabbit reviewed after you pushed your changes.

Ask the agent:

```text theme={null}
Fix the CodeRabbit comments on my PR.
```

The agent collects the unresolved CodeRabbit review threads, checks each one against your code, and proposes fixes. You approve each change before it's applied. The skill treats comment text, including **Prompt for AI Agents** sections, as issue reports and never runs it as instructions.

## Permissions and sandbox

The plugin runs `coderabbit` in Antigravity's terminal, so Antigravity's [permissions](https://antigravity.google/docs/permissions) and [sandbox](https://antigravity.google/docs/sandbox) apply. Rules are per user: the Antigravity CLI reads `~/.gemini/antigravity-cli/settings.json`, and the App layers its rules on the preset under **Settings** > **General** > **Global Permissions**.

**Allow CodeRabbit commands.** The skill runs the CodeRabbit CLI by its absolute path, and rules match the start of a command word by word, so `command(coderabbit)` doesn't match. In a `regex:` rule, each word is a regular expression that must match a whole word, so `(.*/)?coderabbit` matches any install path:

```json ~/.gemini/antigravity-cli/settings.json theme={null}
  {
    "permissions": {
      "allow": [
        "command(regex:(.*/)?coderabbit auth status)",
        "command(regex:(.*/)?coderabbit review)"
      ]
    }
  }
```

To match one install only, use the path from `command -v coderabbit`, such as `command(/opt/homebrew/bin/coderabbit review)`. A `command(...)` allow rule also lets the command run outside the sandbox without asking. Business and enterprise accounts need matching `unsandboxed(...)` rules for that, such as `unsandboxed(regex:(.*/)?coderabbit review)`.

**Require approval for paid reviews.** The `review` allow rule also matches `coderabbit review --use-credits`, so only the skill's instruction keeps the agent from starting a paid review without asking. Rules match from the start of the command and the flag can follow other options, so a deny rule can't reliably catch it. To have Antigravity ask, put the `review` rule in `ask` instead of `allow`. Ask rules take priority over allow rules and the preset, so Antigravity asks before every command that starts with `coderabbit review`, and you can check the command for `--use-credits` before you approve. The rule doesn't match a review started another way, such as `coderabbit --agent --use-credits`, which reviews because `review` is the default command, or the `cr` alias, so in presets that run commands without asking, such as **Turbo**, those still run without a prompt.

**Sandbox.** The terminal sandbox is off by default in the Antigravity CLI and on in the App's **Default** and **Auto** presets. Sandboxed commands have no network access and can't read unmounted paths, so the CodeRabbit CLI can't reach CodeRabbit or its saved sign-in there. When the sandbox is on, the skill asks to run `auth status` and `review` outside it; approve, or the review can't run. `credentials_unavailable` and `callback_listener_unavailable` mean the sandbox blocked access, not that you're signed out.

**What CodeRabbit receives.** A review sends the diff of the changes in its scope to CodeRabbit for analysis. Untracked files are included only when you ask for them. See [Data Security](https://docs.coderabbit.ai/faq.md#data-security). If your network restricts outbound traffic, allow the domains in [CLI network requirements](https://docs.coderabbit.ai/cli/network-requirements.md).

## Use CodeRabbit without the plugin

You can run CodeRabbit from Antigravity with the CLI alone. After [installing the CLI and signing in](#set-up), tell the agent to run it, or add a rule to `AGENTS.md` in your project:

```markdown theme={null}
After you change code, run `coderabbit review --agent` and fix critical and major findings. Ask me before using `--use-credits`.
```

To install the CodeRabbit skills without the plugin, use the skills installer, which puts them in the project's `.agents/skills/` folder for Antigravity:

```bash npx theme={null}
npx skills add coderabbitai/skills
```

```bash bunx theme={null}
bunx skills add coderabbitai/skills
```

```bash pnpm theme={null}
pnpm dlx skills add coderabbitai/skills
```

```bash yarn theme={null}
yarn dlx skills add coderabbitai/skills
```

See [CodeRabbit Skills](https://docs.coderabbit.ai/cli/skills.md) for installer options.

## Update or remove the plugin

Antigravity updates plugins installed from the App automatically.

* **Antigravity App:** in **Customizations**, click the CodeRabbit plugin card, then **Uninstall**.
* **Antigravity CLI:** turn the plugin off with `agy plugin disable coderabbit` and back on with `agy plugin enable coderabbit`, or remove it with `agy plugin uninstall coderabbit`.

Removing the plugin doesn't remove the CodeRabbit CLI or sign you out. To remove the CLI, see [Uninstall](https://docs.coderabbit.ai/cli.md#uninstall).

## Troubleshooting

| Symptom | Cause | Fix |
| - | - | - |
| CodeRabbit isn't under **Installed** or in `agy plugin list` | The plugin isn't installed | Install it as described in [Set up](#set-up), then check again |
| The agent reviews the code itself instead of running CodeRabbit | The skill didn't activate for the prompt | Name it: `Use the code-review skill to review my changes.` |
| The agent asks you to run `coderabbit auth login` | You're signed out | Run `coderabbit auth login` in your terminal, then ask for the review again |
| `credentials_unavailable` or `callback_listener_unavailable` | The sandbox blocked the CLI's saved sign-in or network access | Approve running the command outside the sandbox. See [Permissions and sandbox](#permissions-and-sandbox) |
| Antigravity asks before every `coderabbit` command | No allow rule matches the command | Add allow rules as described in [Permissions and sandbox](#permissions-and-sandbox) |
| Backend or WebSocket unreachable | Your network blocks CodeRabbit's domains | Allow the domains in [CLI network requirements](https://docs.coderabbit.ai/cli/network-requirements.md), then run `coderabbit doctor` outside the sandbox |
| `review_skipped` with zero findings | The scope has no changes, so no review ran | Ask for a different scope, such as uncommitted or committed changes, or include untracked files |
| The `autofix` skill finds no pull request | No open pull request for the current branch, or it isn't on GitHub | Push the branch and open a pull request, wait for CodeRabbit's review, then ask again |

## Set up from an agent

This section is for the Antigravity agent. To hand setup to your agent, paste this into Antigravity:

```text Setup prompt wrap theme={null}
Set up CodeRabbit for Antigravity by following https://docs.coderabbit.ai/cli/antigravity#set-up-from-an-agent. Ask me before you install anything, sign in, change settings, or spend usage credits.
```

**Rules for the agent:**

* Don't install the CodeRabbit CLI, pipe install scripts to a shell, run `coderabbit auth login`, or handle tokens or API keys. The human does these.
* Don't edit `~/.gemini/antigravity-cli/settings.json` or other permission settings.
* Request to run a command outside the sandbox at most once per command. If the human declines, report it.
* Don't start a review during setup unless the human asks for one.
* Add `--use-credits` only after the human says yes in chat to the offer in an `action_required` result with `status: "awaiting_confirmation"`. A yes covers that offer only. If the code changes or you start another review, run it without `--use-credits` and present the new offer.
* After a rate limit, wait for the reported time instead of retrying in a loop.
* When you review later, tell the human the scope and which severities you'll fix: critical and major unless they say otherwise.
* For output fields and exit codes, see [Agent mode](https://docs.coderabbit.ai/cli/agent-mode.md).

**Checks:**

1. Probe with read-only commands, then report every missing piece in one message.
   * `command -v coderabbit` and `coderabbit --version`: the CLI path and a version, such as `0.9.0`. A failure means the CLI is missing, outside `PATH`, or hidden by the sandbox.
   * `coderabbit auth status --agent`, if the CLI was found: one JSON line with `"authenticated":true`. `"authenticated":false` means the human must sign in. `credentials_unavailable` or `callback_listener_unavailable` means the sandbox blocked access; request to run it outside the sandbox. Report any other error or malformed output.
   * `command -v agy`: if found, run `agy plugin list --json`, which needs Antigravity CLI 1.3.4 or later, and look for an entry with `"name": "coderabbit"`, `"enabled": true`, and the skills `code-review` and `autofix`. If the command fails, report it. Don't fall back to `agy plugin list`, which lists only imported plugins before 1.3.4. Without `agy`, the human uses the App.
2. **Stop** if anything is missing, and list what the human must do:
   * **No CLI:** install it from [Getting started](https://docs.coderabbit.ai/cli.md#getting-started), or tell you where it's installed.
   * **Signed out:** run `coderabbit auth login` in their own terminal (`coderabbit auth login --region eu` for an EU account).
   * **`agy plugin list --json` failed:** update the Antigravity CLI to 1.3.4 or later.
   * **Plugin disabled:** approve running `agy plugin enable coderabbit`.
   * **Plugin missing, with `agy`:** approve running `agy plugin install coderabbit`. If that fails because the plugin isn't found, ask separately before running `agy plugin install https://github.com/coderabbitai/skills`.
   * **Plugin status unknown, without `agy`:** install CodeRabbit from **Customizations** in the Antigravity App and confirm that it's listed under **Installed**. After they confirm, continue with the next check.
3. After the human acts, run the probes again. If the plugin was installed or enabled during setup, by you or by the human in the App, and the `code-review` skill isn't available to you, ask the human to start a new conversation. Setup isn't complete until the skill is available.
4. Request once to run `coderabbit doctor` outside the sandbox, where its network checks can pass.
   * **Exit code `0`:** success. Warnings don't cause a failure.
   * **Exit code `1`:** setup isn't complete. **Stop** and report the failed checks. For connectivity failures, point the human to [CLI network requirements](https://docs.coderabbit.ai/cli/network-requirements.md).
5. Report the CLI version, the signed-in region, the plugin status, and the `coderabbit doctor` result. Setup is complete only when every check passed.

## What's next

> **[Agent mode output and exit codes](https://docs.coderabbit.ai/cli/agent-mode.md)**
>
> See the structured output the `code-review` skill reads when it runs a review.

> **[CLI command reference](https://docs.coderabbit.ai/cli/reference.md)**
>
> Look up every CodeRabbit CLI command and option the agent can run.

> **[CodeRabbit Skills](https://docs.coderabbit.ai/cli/skills.md)**
>
> Install the CodeRabbit skills in other coding agents.


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