|
1 |
| -# coderabbit-docs |
| 1 | +<p align="left"> |
| 2 | + <a href="https://coderabbit.ai"> |
| 3 | + <img src="static/img/coderabbit_nav_logo.svg" alt="CodeRabbit Logo" width="200"/> |
| 4 | + </a> |
| 5 | +</p> |
| 6 | + |
| 7 | +# CodeRabbit Documentation |
| 8 | + |
| 9 | +Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the code review dev tool that helps you ship quality code faster. |
| 10 | + |
| 11 | +[](https://coderabbit.ai) |
| 12 | +[](https://twitter.com/coderabbitai) |
| 13 | +[](https://discord.com/invite/GsXnASn26c) |
| 14 | +[](https://github.com/coderabbitai/coderabbit-docs/pulls) |
| 15 | + |
| 16 | +## About CodeRabbit |
| 17 | + |
| 18 | +> **CodeRabbit** is an AI-powered code reviewer that delivers context-aware feedback on pull requests within minutes, reducing the time and effort needed for manual code reviews. It provides a fresh perspective and catches issues that are often missed, enhancing the overall review quality. |
| 19 | +
|
| 20 | +- Automated code reviews |
| 21 | +- Intelligent suggestions for code improvements |
| 22 | +- Pull request summary |
| 23 | +- Interactive chat |
| 24 | +- Sequence diagrams |
| 25 | +- Integration with popular version control platforms |
| 26 | +- Support for multiple programming languages |
| 27 | + |
| 28 | +## Getting Started with CodeRabbit |
| 29 | + |
| 30 | +Follow these steps to and start using CodeRabbit: |
| 31 | + |
| 32 | +1. **Sign Up** |
| 33 | + Visit [coderabbit.ai](https://coderabbit.ai/) and create your account. |
| 34 | + |
| 35 | +2. **Connect Your Repository** |
| 36 | + Link your repository from one of the supported platforms: |
| 37 | + - GitHub |
| 38 | + - GitLab |
| 39 | + - Azure DevOps |
| 40 | + |
| 41 | +3. **Configure Settings** |
| 42 | + Customize your preferences in the CodeRabbit dashboard as per your project's needs. |
| 43 | + |
| 44 | +4. **Initiate Code Reviews** |
| 45 | + Start creating pull requests on your platform, and let CodeRabbit assist with intelligent code reviews. |
| 46 | + |
| 47 | +# Configuring CodeRabbit |
| 48 | + |
| 49 | +CodeRabbit offers flexible configuration options. There are two primary methods for configuring CodeRabbit: |
| 50 | + |
| 51 | +1. Using the CodeRabbit UI (Web Interface) |
| 52 | +2. Using a YAML Configuration File |
| 53 | + |
| 54 | +## 1. Using the CodeRabbit UI |
| 55 | + |
| 56 | +When you create an account and add repositories through the CodeRabbit web interface, you can configure settings for your organization and individual repositories. |
| 57 | + |
| 58 | +### Steps: |
| 59 | +1. Sign up or log in at [coderabbit.ai](https://coderabbit.ai) |
| 60 | +2. Navigate to the "Organization Settings" section or "Repositories" section |
| 61 | +3. Click "Add Repositories" to connect your Git repositories |
| 62 | +4. Use the UI to configure settings for each repository or at the organization level |
| 63 | + |
| 64 | +### Available UI Configuration Options: |
| 65 | + |
| 66 | +#### General Settings: |
| 67 | +- Review Language: Choose the natural language for CodeRabbit to write reviews (e.g., English (US)) |
| 68 | +- Tone Instructions: Set the tone for reviews and chat |
| 69 | +- Early Access: Enable or disable early-access features |
| 70 | +- Fine-tune Your Reviews: Allow CodeRabbit to learn from your usage and improve over time |
| 71 | + |
| 72 | +#### Review Settings: |
| 73 | +- Customize review profile, summary options, and automated review preferences |
| 74 | + |
| 75 | +#### Chat Settings: |
| 76 | +- Configure chat-related options |
| 77 | + |
| 78 | +#### Knowledge Base: |
| 79 | +- Set up and manage your organization's knowledge base |
| 80 | + |
| 81 | +#### API Keys: |
| 82 | +- Create and manage API keys for accessing the CodeRabbit API |
| 83 | + |
| 84 | +> **Note:** Settings configured at the repository level will override organization-level settings. |
| 85 | +
|
| 86 | +## 2. Using a YAML Configuration File |
| 87 | + |
| 88 | +For more advanced and version-controlled configuration, you can use a YAML file in your repository. |
| 89 | + |
| 90 | +### Steps: |
| 91 | +1. Create a file named `.coderabbit.yaml` in the root of your repository |
| 92 | +2. Add your configuration options to the file |
| 93 | +3. Commit and push the file to your repository |
| 94 | + |
| 95 | +### Sample `.coderabbit.yaml`: |
| 96 | + |
| 97 | +```yaml |
| 98 | +# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json |
| 99 | +language: "en-US" |
| 100 | +early_access: false |
| 101 | +reviews: |
| 102 | + profile: "chill" |
| 103 | + request_changes_workflow: false |
| 104 | + high_level_summary: true |
| 105 | + poem: true |
| 106 | + review_status: true |
| 107 | + collapse_walkthrough: false |
| 108 | + auto_review: |
| 109 | + enabled: true |
| 110 | + drafts: false |
| 111 | +chat: |
| 112 | + auto_reply: true |
| 113 | +``` |
| 114 | +
|
| 115 | +### Key Configuration Options: |
| 116 | +
|
| 117 | +- `language`: Set the language for CodeRabbit's responses |
| 118 | +- `early_access`: Enable/disable early access features |
| 119 | +- `reviews`: Configure review behavior and style |
| 120 | +- `chat`: Set chat-related options |
| 121 | + |
| 122 | +For a complete list of configuration options, refer to the [CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/schema.v2.json). |
| 123 | + |
| 124 | +## Configuration Precedence |
| 125 | + |
| 126 | +CodeRabbit uses the following order of precedence for configuration: |
| 127 | + |
| 128 | +1. YAML file in the repository (highest precedence) |
| 129 | +2. UI configuration for individual repositories |
| 130 | +3. UI configuration for the organization (lowest precedence) |
| 131 | + |
| 132 | +## Tips |
| 133 | + |
| 134 | +- To convert existing UI configuration to YAML, use the `@coderabbitai configuration` command on any PR. |
| 135 | +- Ensure the `.coderabbit.yaml` file is present in the feature branch for CodeRabbit to review. |
| 136 | +- New pull requests or incremental commits will trigger CodeRabbit reviews once configured. |
| 137 | + |
| 138 | +## Table of Contents |
| 139 | + |
| 140 | +- [Getting Started](#getting-started) |
| 141 | +- [Project Structure](#project-structure) |
| 142 | +- [Local Development](#local-development) |
| 143 | +- [Building for Production](#building-for-production) |
| 144 | +- [Contributing](#contributing) |
| 145 | + |
| 146 | +## Getting Started |
| 147 | + |
| 148 | +1. Clone this repository: |
| 149 | + |
| 150 | +```bash |
| 151 | +git clone https://github.com/coderabbit-ai/coderabbit-docs.git |
| 152 | +cd coderabbit-docs |
| 153 | +``` |
| 154 | + |
| 155 | +2. Install dependencies: |
| 156 | + |
| 157 | +```bash |
| 158 | +npm install |
| 159 | +``` |
| 160 | + |
| 161 | +3. Start the development server: |
| 162 | + |
| 163 | +```bash |
| 164 | +docusaurus start |
| 165 | +``` |
| 166 | + |
| 167 | +This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. |
| 168 | + |
| 169 | +## Project Structure |
| 170 | + |
| 171 | +``` |
| 172 | +coderabbit-docs/ |
| 173 | + ├── blog/ |
| 174 | + ├── docs/ |
| 175 | + ├── src/ |
| 176 | + │ ├── components/ |
| 177 | + │ ├── css/ |
| 178 | + │ └── pages/ |
| 179 | + ├── static/ |
| 180 | + ├── docusaurus.config.ts |
| 181 | + ├── sidebar.ts |
| 182 | + └── package.json |
| 183 | +``` |
| 184 | +
|
| 185 | +## Local Development |
| 186 | +
|
| 187 | +``` |
| 188 | +docusaurus start |
| 189 | +``` |
| 190 | +
|
| 191 | +This command starts a local development server and opens up a browser window. |
| 192 | +
|
| 193 | +## Building for Production |
| 194 | +
|
| 195 | +``` |
| 196 | +docusaurus build |
| 197 | +``` |
| 198 | +
|
| 199 | +This command generates static content into the `build` directory. |
| 200 | +
|
| 201 | +
|
| 202 | +## Contributing |
| 203 | +
|
| 204 | +We welcome contributions to improve our documentation. Here are some guidelines: |
| 205 | +
|
| 206 | +1. Fork this repository |
| 207 | +2. Create a new branch for your changes |
| 208 | +3. Make all the changes |
| 209 | +4. Test your changes locally |
| 210 | +5. Submit a pull request with a clear description of what changes you did and why. |
| 211 | +
|
| 212 | +For more detailed contributing guidelines, please see our [CONTRIBUTING.md](./CONTRIBUTING.md) file. |
| 213 | +
|
| 214 | +--- |
| 215 | +
|
| 216 | +For more information on using Docusaurus, please refer to the [official Docusaurus documentation](https://docusaurus.io/docs). |
| 217 | +
|
| 218 | +Built with ❤️ by the CodeRabbit team |
0 commit comments