Skip to content

Commit eeeebd7

Browse files
authored
Merge branch 'main' into readme
2 parents 24f37b1 + 0a25653 commit eeeebd7

File tree

8 files changed

+324
-17
lines changed

8 files changed

+324
-17
lines changed

docs/guides/about-vscode.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Review local changes
3+
description: How to review your code with the VSCode extension.
4+
slug: /code-editors
5+
sidebar_label: Overview
6+
---
7+
8+
This page is about the CodeRabbit VSCode extension. For a broader overview of CodeRabbit, see [Introduction](/).
9+
10+
## About the VSCode extension
11+
12+
The CodeRabbit VSCode extension lets you apply a limited subset of CodeRabbit’s code-review features to your local development environment, directly from the VSCode IDE. It also works with other text editors that are able to install and use VSCode extensions, such as Cursor and Windsurf.
13+
14+
You can use the extension on its own, or you can use it to complement your local development on a repository whose remote has CodeRabbit installed.
15+
16+
The extension is intended to let you use the power of CodeRabbit to rapidly tune and tidy your code changes locally, before you publish your changes to your team's remote repository and start a more thorough code review.
17+
18+
## Features
19+
20+
The extension includes the following features:
21+
22+
- Automatic code reviews on every local Git commit.
23+
- Manually requested reviews of local code changes.
24+
- One-click application of simpler suggested code fixes.
25+
- Integration with AI coding agents, including Copilot and Claude Code, to help you resolve more complex suggestions.
26+
- Full compatibility with text editors derived from VSCode, including Cursor and Windsurf.
27+
28+
## Price and limitations
29+
30+
This extension is free to install and use, and works with any tier of CodeRabbit account. Rate limits apply to the number of local reviews that you can request per hour.
31+
32+
The extension makes only basic CodeRabbit review features available, with default settings applied. Advanced CodeRabbit features, such as interactive chat and project learnings, aren't available through the VSCode extension. These features are available only by [integrating CodeRabbit on your remote repository](/platforms), and then allowing CodeRabbit to review pull requests.
33+
34+
## What's next
35+
36+
- [Install the VSCode extension](/guides/install-vscode)
37+
- [Use the VSCode extension](/guides/use-vscode)

docs/guides/config-vscode.md

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Configure the VSCode extension
3+
description: How to configure the CodeRabbit VSCode extension
4+
---
5+
6+
This page is about configuring the CodeRabbit VSCode extension. For more information about the extension, see
7+
[Review local changes](/code-editors).
8+
9+
:::note
10+
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
11+
:::
12+
13+
## Find the settings screen {#find}
14+
15+
To navigate to the settings screen for the CodeRabbit VSCode extension, follow these steps:
16+
17+
1. In the activity bar, click the Extensions icon.
18+
19+
1. In the sidebar, under **Installed**, click the gear-shaped **Manage** icon in the CodeRabbit row.
20+
21+
1. In the menu that appears, select **Settings**.
22+
23+
The settings screen contains the following configuration controls.
24+
25+
## Configure AI agent integration {#agent}
26+
27+
The **Agent Type** setting lets you choose the extension's response to using the **Fix with AI** feature during code reviews. Your options are the following:
28+
29+
- **Native**: The extension prompts the AI agent associated with your IDE to apply the suggested fix.
30+
31+
This works only with VSCode, using Copilot. If you have this option selected when using a different IDE, then the extension instead copies the prompt to your clipboard.
32+
33+
- **Claude Code**: The extension opens the Terminal pane of your IDE and tries to use the `claude` command-line program to apply the suggested fix to your code. You need to have Claude Code installed for this option to be effective.
34+
35+
- **Clipboard**: The extension copies prompt text describing the suggested fix to your clipboard. From there, you can manually paste the prompt into the coding AI agent that you use with your IDE.
36+
37+
For more information about the **Fix with AI** feature, see [Request help from your AI coding agent](/guides/use-vscode#agent).
38+
39+
## Configure automatic review behavior {#auto-reviews}
40+
41+
The **Auto Review Mode** setting lets you control the behavior of the automatic code reviews that the extension can perform after you make commits to your local Git repository. Your options are the following:
42+
43+
- **Disabled**: The extension doesn't perform automatic code reviews.
44+
45+
- **Prompt**: After every commit, the extension displays a dialog asking if you'd like it to perform a code review.
46+
47+
- **Auto**: The extension always performs a review after every commit.
48+
49+
For more information about this feature, see [Automatically review local commits](/guides/use-vscode#auto-reviews).
50+
51+
## Set a review timeout {#timeout}
52+
53+
The **Review Timeout** setting lets you specify how long the extension waits for a response from CodeRabbit remote servers before timing out a code review. The default value is `20`.
54+
55+
To turn off timeouts, set this value to `0`.
56+
57+
## What's next {#whats-next}
58+
59+
- [Use the VSCode extension](/guides/use-vscode)
60+
61+
- [Uninstall the VSCode extension](/guides/uninstall-vscode)

docs/guides/install-vscode.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Install the VSCode extension
3+
description: How to install the CodeRabbit VSCode extension
4+
---
5+
6+
This page is about installing the CodeRabbit VSCode extension. For more information about the extension, see
7+
[Review local changes](/code-editors).
8+
9+
:::note
10+
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
11+
:::
12+
13+
## Before you begin
14+
15+
Before you can use the CodeRabbit VSCode extension, you need a CodeRabbit account.
16+
17+
If you don't already have an account, you can create one by visiting [the CodeRabbit login page](https://app.coderabbit.ai/login).
18+
19+
## Install the extension
20+
21+
To install the CodeRabbit extension, follow these steps:
22+
23+
1. In the editor activity bar, click **Extensions**.
24+
25+
1. In sidebar, type `coderabbit` into the **Search Extensions in Marketplace** search bar. After a moment, **CodeRabbit** appears in the sidebar as a search result.
26+
27+
1. Select **CodeRabbit**. A summary of the CodeRabbit VSCode extension appears in the window's main pane, along with installation controls.
28+
29+
1. If you would like your editor to automatically check for and apply future updates to the extension, then keep the **Auto Update** checkbox selected. Otherwise, clear the checkbox.
30+
31+
1. Click **Install**.
32+
33+
1. A **Log in to CodeRabbit to get started** dialog appears. Click **Login**. If the dialog gets dismissed or times out first, then you can follow these alternate steps:
34+
35+
1. Click the CodeRabbit icon in the VSCode activity bar.
36+
37+
1. Click the **Use CodeRabbit for Free** button.
38+
39+
1. Grant VSCode permission to open your browser, if asked.
40+
41+
1. In your web browser, log into your CodeRabbit account.
42+
43+
This connects your CodeRabbit account with the CodeRabbit VSCode extension.
44+
45+
## Install using the marketplace website
46+
47+
If you are using the VSCode IDE, and not an IDE that derives from it such as Cursor or Windsurf, then you can alternatively obtain and install the CodeRabbit VSCode extension by visiting [the extension's page on the Visual Studio Marketplace](https://coderabbit.link/vscode-docs).
48+
49+
If you do install the extension this way, then you still need to connect your CodeRabbit account to the extension after installing it, as described in the previous section.
50+
51+
## What's next
52+
53+
- [Use the VSCode extension](/guides/use-vscode)
54+
55+
- [Configure the VSCode extension](/guides/config-vscode)

docs/guides/uninstall-vscode.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Uninstall the VSCode extension
3+
description: How to uninstall the CodeRabbit VSCode extension
4+
---
5+
6+
This page is about uninstalling the CodeRabbit VSCode extension. For more information about the extension, see
7+
[Review local changes](/code-editors).
8+
9+
:::note
10+
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
11+
:::
12+
13+
## Uninstall the extension
14+
15+
To uninstall the VSCode extension, follow these steps:
16+
17+
1. In the VSCode activity bar, click the CodeRabbit icon.
18+
19+
1. In the CodeRabbit sidebar, click the door-shaped **Logout** icon.
20+
21+
1. In the VSCode activity bar, click the **Extensions** icon.
22+
23+
1. In the Extensions sidebar, click the gear-shaped **Manage** icon next to CodeRabbit in the list of installed extensions.
24+
25+
1. Select **Uninstall**.

docs/guides/use-vscode.md

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
---
2+
title: Use the VSCode extension
3+
description: How to review your code with the VSCode extension.
4+
---
5+
6+
This page is about performing local code reviews using the CodeRabbit VSCode extension. For more information about the extension, see
7+
[Review local changes](/code-editors). To learn how to install the extension, see [Install the VSCode extension](/guides/install-vscode).
8+
9+
The CodeRabbit VSCode extension works by comparing changes in your current, checked-out Git branch against another branch in your local repository. You can use the extension to automatically perform full-branch changes after every commit, or make different kinds of comparisons by manually requesting a review.
10+
11+
:::note
12+
The instructions on this page are specific to using the extension with VSCode. If you are instead using a VSCode-compatible editor such as Cursor or Windsurf, then the steps that you need to follow are similar, but might require some adaptation.
13+
:::
14+
15+
## Automatically review local commits {#auto-reviews}
16+
17+
You can let CodeRabbit automatically review commits that you make to your local Git repository. These automatic reviews compare all committed changes against the branch that your working branch is based on.
18+
19+
To perform an automatic review, follow these steps:
20+
21+
1. Perform a Git commit using VSCode. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?**
22+
23+
1. Click **Yes**. The CodeRabbit sidebar appears in your VSCode window.
24+
25+
1. Wait for the review to complete. This might take a few minutes. To cancel a review in progress, click **Stop the review**.
26+
27+
After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work).
28+
29+
You can optionally configure the extension to either always or never perform automatic code reviews on commit, instead of displaying this yes-or-no dialog. For more information, see [Configure automatic review behavior](/guides/config-vscode#auto-reviews).
30+
31+
For more control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section.
32+
33+
## Manually request code reviews {#manual-reviews}
34+
35+
To manually review changes in a local Git branch using the CodeRabbit VSCode extension, follow these steps:
36+
37+
1. Click the CodeRabbit icon in the VSCode activity bar. The CodeRabbit sidebar appears.
38+
39+
1. If you want to compare your code changes to a branch other than its base branch, then follow these steps:
40+
41+
1. In the sidebar, under **Branch**, click the name of the base branch. A **Select a base branch** dialog appears, listing other branches in your local Git repository.
42+
43+
1. Select the name of a base branch to compare against.
44+
45+
1. Select one of the review-action options from the menu at the bottom of the CodeRabbit sidebar:
46+
47+
- To review all changes between the base branch and your current branch, including both committed and uncommitted changes, select **Review all changes**. This is the default selection.
48+
49+
- To limit the review to only changes on your branch that you have committed, select **Review committed changes**. This includes commits that you have pushed to your remote repository, if any, as well as any local commits.
50+
51+
- To limit the review to only uncommitted changes on your branch, select **Review uncommitted changes**. This includes both staged and unstaged changes.
52+
53+
1. Refer to the list of **Files to review** in the sidebar. This list represents all of the files that the selected review action includes. To change this list of files, repeat the previous step to choose a different review action, or use Git features like `git stash` to selectively remove changes.
54+
55+
1. To perform the review, click the button part of the menu. The CodeRabbit sidebar displays a **Review** section with the review's progress.
56+
57+
1. Wait for the review to complete. This might take a few minutes. To cancel a review in progress, click **Stop the review**.
58+
59+
After the review completes, you can browse and respond to review comments as described in the following section.
60+
61+
## Work with code reviews {#work}
62+
63+
The CodeRabbit VSCode extension presents code reviews as a series of actionable comments, connected to specific files and lines. It gives you tools to apply its suggestions quickly, when possible.
64+
65+
### Browse comments {#browse}
66+
67+
After the extension finishes its review, it adds any comments to the CodeRabbit sidebar under the **Files** heading in the **Reviews** section.
68+
69+
Each item in **Files** is a comment referring to one or more lines in that file. Click the comment to see a detailed, inline comment in the editor, attached to the appropriate file and lines.
70+
71+
You can react to these comments however you want: you can apply their advice literally, or let them guide you to find alternate solutions, or ignore them entirely. CodeRabbit comments are metadata stored with VSCode, and are not part of your files. The presence of comments doesn't block your use of version control.
72+
73+
### Apply suggested changes {#apply}
74+
75+
Whenever possible, the CodeRabbit VSCode extension attaches discrete change suggestion to comments in the form of code diffs. For example, if it detects a typo in a new function name, the extension might attach a diff with a suggested correction.
76+
77+
If you agree with CodeRabbit about the suggested fix and want to apply to exactly as it proposes, click the checkmark-shaped **Apply suggested change** icon in the inline comment. The extension makes the change for you in the editor.
78+
79+
### Request help from your AI coding agent {#agent}
80+
81+
If CodeRabbit determines that an AI coding agent could help with resolving one of its comments, then it adds a star-shaped **Fix with AI** icon to the inline display of that comment. To have the extension generate a request for an AI agent to address the comment, click this icon.
82+
83+
Depending upon your IDE and the current extension settings, the extension performs one of the following actions:
84+
85+
- If you are using VSCode with Copilot installed, then the extension can send the request directly to Copilot.
86+
- If you have Claude Code installed, then the extension can send the request to the `claude` command-line program.
87+
- As a fallback, the extension can copy the request, phrased as an AI prompt, to your clipboard. You can then manually paste this prompt into the coding AI of your IDE.
88+
89+
For more information about configuring this behavior, see [Configure AI agent integration](/guides/config-vscode#agent).
90+
91+
### Ignore or collapse comments {#ignore}
92+
93+
To remove a comment from the editor, click its **Ignore** icon.
94+
95+
To remove a comment but keep an icon in the editor noting its presence, click its **Collapse** icon.
96+
97+
To see an ignored or collapsed comment in the editor again, click its summary in the CodeRabbit sidebar.
98+
99+
### Browse previous reviews {#previous}
100+
101+
If you have performed reviews prior to the most recent review in the current VSCode window, then you can browse the comments from these reviews under the **Previous reviews** heading in the CodeRabbit sidebar.
102+
103+
If a past review comment no longer applies to the current state of your code, then clicking that comment won't display a detailed comment or suggestion in the editor.
104+
105+
## What's next {#whats-next}
106+
107+
- [Configure the VSCode extension](/guides/config-vscode)
108+
109+
- [Uninstall the VSCode extension](/guides/uninstall-vscode)

docs/overview/introduction.md

+8
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,16 @@ Public repositories can use the Pro tier of CodeRabbit at no charge, including a
9494

9595
For private repositories, a number of pricing tiers are available. These range from a Free tier that offers unlimited code-change summaries, to an Enterprise tier with access to advanced features and SLA support. For more information, see [Pricing](https://www.coderabbit.ai/pricing).
9696

97+
## Review local changes from within VSCode
98+
99+
As a separate, free product, CodeRabbit offers a VSCode extension that brings a subset of core CodeRabbit features to VSCode. This lets you use the power of CodeRabbit to tune and tidy your code changes locally before pushing your changes into a formal pull request for more thorough reviews.
100+
101+
For more information, see [Review local changes](/code-editors).
102+
97103
## What's next
98104

99105
- [Quickstart](/getting-started/quickstart/) lets you experience your first CodeRabbit code review first-hand.
100106

107+
- [Review local changes](/code-editors) guides you through installing and using a subset of CodeRabbit features directly from your code editor.
108+
101109
- [Why CodeRabbit?](/overview/why-coderabbit) dives further into the philosophies and technologies that drive CodeRabbit.

sidebars.ts

+12
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,18 @@ const sidebars: SidebarsConfig = {
108108
"guides/linked-issues",
109109
],
110110
},
111+
{
112+
type: "category",
113+
collapsed: false,
114+
label: "Review local changes",
115+
items: [
116+
"guides/about-vscode",
117+
"guides/install-vscode",
118+
"guides/use-vscode",
119+
"guides/config-vscode",
120+
"guides/uninstall-vscode",
121+
],
122+
},
111123
{
112124
type: "category",
113125
collapsed: false,

0 commit comments

Comments
 (0)