diff --git a/README.md b/README.md index 5a62316d..cf7d301d 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the co [![Discord](https://img.shields.io/discord/1134356397673414807?color=7289DA&label=Discord&logo=discord&logoColor=green)](http://discord.gg/coderabbit) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/coderabbitai/coderabbit-docs/pulls) [![Node.js CI](https://github.com/coderabbitai/coderabbit-docs/actions/workflows/node.js.yaml/badge.svg)](https://github.com/coderabbitai/coderabbit-docs/actions/workflows/node.js.yaml) +![CodeRabbit Reviews](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Fapi.coderabbit.ai%2Fstats%2Fgithub%2Fcoderabbitai%2Fcoderabbit-docs&query=reviews&suffix=%20Reviews&style=flat&label=CodeRabbit&link=https%3A%2F%2Fcoderabbit.ai) ## About CodeRabbit @@ -24,125 +25,7 @@ Welcome to the official docs for [**CodeRabbit**](https://coderabbit.ai), the co - Interactive chat - Sequence diagrams - Integration with popular version control platforms -- Support for multiple programming languages - -## Getting Started with CodeRabbit - -Follow these steps to and start using CodeRabbit: - -1. **Sign Up** - Visit [coderabbit.ai](https://coderabbit.ai/) and create your account. - -2. **Connect Your Repository** - Link your repository from one of the supported platforms: - - - GitHub - - GitLab - - Azure DevOps - -3. **Configure Settings** - Customize your preferences in the CodeRabbit dashboard as per your project's needs. - -4. **Initiate Code Reviews** - Start creating pull requests on your platform, and let CodeRabbit assist with intelligent code reviews. - -# Configuring CodeRabbit - -CodeRabbit offers flexible configuration options. There are two primary methods for configuring CodeRabbit: - -1. Using the CodeRabbit UI (Web Interface) -2. Using a YAML Configuration File - -## 1. Using the CodeRabbit UI - -When you create an account and add repositories through the CodeRabbit web interface, you can configure settings for your organization and individual repositories. - -### Steps - -1. Sign up or log in at [coderabbit.ai](https://coderabbit.ai) -2. Navigate to the "Organization Settings" section or "Repositories" section -3. Click "Add Repositories" to connect your Git repositories -4. Use the UI to configure settings for each repository or at the organization level - -### Available UI Configuration Options - -#### General Settings - -- Review Language: Choose the natural language for CodeRabbit to write reviews (e.g., English (US)) -- Tone Instructions: Set the tone for reviews and chat -- Early Access: Enable or disable early-access features -- Fine-tune Your Reviews: Allow CodeRabbit to learn from your usage and improve over time - -#### Review Settings - -- Customize review profile, summary options, and automated review preferences - -#### Chat Settings - -- Configure chat-related options - -#### Knowledge Base - -- Set up and manage your organization's knowledge base - -#### API Keys - -- Create and manage API keys for accessing the CodeRabbit API - -> **Note:** Settings configured at the repository level will override organization-level settings. - -## 2. Using a YAML Configuration File - -For more advanced and version-controlled configuration, you can use a YAML file in your repository. - -### Steps - -1. Create a file named `.coderabbit.yaml` in the root of your repository -2. Add your configuration options to the file -3. Commit and push the file to your repository - -### Sample `.coderabbit.yaml` - -```yaml -# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json -language: "en-US" -early_access: false -reviews: - profile: "chill" - request_changes_workflow: false - high_level_summary: true - poem: true - review_status: true - collapse_walkthrough: false - auto_review: - enabled: true - drafts: false -chat: - auto_reply: true -``` - -### Key Configuration Options - -- `language`: Set the language for CodeRabbit's responses -- `early_access`: Enable/disable early access features -- `reviews`: Configure review behavior and style -- `chat`: Set chat-related options - -For a complete list of configuration options, refer to the [CodeRabbit Configuration Schema](https://coderabbit.ai/integrations/schema.v2.json). - -## Configuration Precedence - -CodeRabbit uses the following order of precedence for configuration: - -1. YAML file in the repository (highest precedence) -2. UI configuration for individual repositories -3. UI configuration for the organization (lowest precedence) - -## Tips - -- To convert existing UI configuration to YAML, use the `@coderabbitai configuration` command on any PR. -- Ensure the `.coderabbit.yaml` file is present in the feature branch for CodeRabbit to review. -- New pull requests or incremental commits will trigger CodeRabbit reviews once configured. +- Support for all programming languages ## Table of Contents diff --git a/docs/early-access.md b/docs/early-access.md new file mode 100644 index 00000000..c15a914b --- /dev/null +++ b/docs/early-access.md @@ -0,0 +1,42 @@ +--- +title: CodeRabbit's Early Access Program +sidebar_label: Early Access +description: How Early Access works, what are the expectations and how to get started. +sidebar_position: 10 +--- + +# Early Access Program + +In CodeRabbit's dashboard, in the settings of a repository, there is the **Early Access** toggle, which enables early access features. Early access is divided into two categories: **Beta** and **Experiments**. Both are enabled by the same toggle but should be differentiated by a warning whenever they are used. + +## Beta + +Beta features are ready for public testing. + +- The documentation may be incomplete or outdated. +- The changelog may be missing. +- The feature may not be fully stable, but it should give a general idea of the final user experience. +- Edge cases may not be fully covered. +- Some parts of the feature may not be implemented. For example, the GitHub integration may be prioritized over others. + +Whenever you use a beta feature, you may see a warning like this: + +:::warning +This feature is in [beta](/early-access#beta). +::: + +## Experiments + +Experiments are ways for CodeRabbit's development team to gather more experience with in-development features. + +- They are highly unstable and may not work at all. +- There is no guarantee that they will reach the beta stage and they may be cancelled at any time without any prior notice. +- They are not ready for public use and may not be sufficiently documented. +- They do not represent the end result of the planned feature and do not have a satisfactory user experience. +- We are not gathering feedback for experiments - the direction they take can vary widely. + +Whenever you use an experiment, you may see a warning like this: + +:::warning +This feature is [experimental](/early-access#experiments). +::: diff --git a/docs/finishing-touches/_category_.yaml b/docs/finishing-touches/_category_.yaml new file mode 100644 index 00000000..8101ddcb --- /dev/null +++ b/docs/finishing-touches/_category_.yaml @@ -0,0 +1,4 @@ +label: Finishing Touches +position: 12 +collapsible: true +collapsed: true diff --git a/docs/finishing-touches/docstrings.md b/docs/finishing-touches/docstrings.md new file mode 100644 index 00000000..050c4984 --- /dev/null +++ b/docs/finishing-touches/docstrings.md @@ -0,0 +1,73 @@ +--- +title: Docstrings generation with CodeRabbit +sidebar_label: Docstrings (Experiment) +description: Automated docstrings pull requests with CodeRabbit +--- + +# Docstrings + +Docstrings generation is part of the [finishing touches](/future-developments#finishing-touches) initiative. + +:::warning +The [docstrings](/finishing-touches/docstrings) feature is [experimental](/early-access#experiments). +::: + +## Usage + +Once you are done with your pull request and its reviews, you may want to perform finishing touches to your code, such as adding in-code documentation. You can request CodeRabbit to generate docstrings by typing `@coderabbitai generate docstrings` in a comment under that pull request. + +Once sent, CodeRabbit will perform the following actions: + +- All functions that are in the pull request's changes will be fetched using `ast-grep` +- Docstrings will be generated for the functions where they are missing or incomplete +- These docstrings will be committed in a new branch in the same repository +- CodeRabbit will open a pull request from this new branch to the existing pull request + +Here's an example of what a pull request may look like: + +![Docstrings PR](/img/finishing-touches/docstrings-pull-request.png) + +CodeRabbit cannot perform further modifications to opened pull requests. From there, it's your turn to checkout the branch and improve it to satisfaction. We believe that this workflow provides a significant headstart to documenting code. + +We are testing this workflow internally to adjust the prompts, add more supported software forges, add more supported languages and craft an excellent user experience. However, you can use this preview and enjoy a sneak peek at the future of CodeRabbit. + +## Supported software forges + +The checked software forges are supported: + +- [ ] Azure DevOps +- [ ] Bitbucket +- [x] GitHub +- [ ] GitLab + +The presence of an unsupported software forge in this list does not constitute a commitment to support it in the future. Remember that the docstrings feature is [experimental](/early-access#experiments). + +## Supported languages + +The checked languages are supported: + +- [ ] Bash +- [ ] C +- [x] C++ +- [ ] C# +- [x] Elixir +- [x] Go +- [ ] Haskell +- [ ] Java +- [x] JavaScript +- [ ] Kotlin +- [ ] Lua +- [ ] Php +- [x] Python +- [ ] React TypeScript +- [ ] Ruby +- [ ] Rust +- [ ] Scala +- [ ] Swift +- [x] TypeScript + +The presence of an unsupported language in this list does not constitute a commitment to support it in the future. Remember that the docstrings feature is [experimental](/early-access#experiments). + +:::note +In the case of JavaScript and TypeScript, there are tons of ways to declare functions. At the moment, we only support the keyword `function` at the top level. +::: diff --git a/docs/Future Development.md b/docs/future-developments.md similarity index 100% rename from docs/Future Development.md rename to docs/future-developments.md diff --git a/docs/overview/why-coderabbit.md b/docs/overview/why-coderabbit.md index 0cb7c5b7..ccad9f89 100644 --- a/docs/overview/why-coderabbit.md +++ b/docs/overview/why-coderabbit.md @@ -6,152 +6,57 @@ sidebar_position: 2 description: CodeRabbit is AI-powered code reviews built for modern development teams --- -# Why CodeRabbit? +As developers, we understand the critical value of code reviews - they're the backbone of maintaining code quality and knowledge sharing across teams. But let's be honest about the growing challenges: as codebases expand and development velocity increases, traditional code reviews often become a bottleneck. This is where CodeRabbit comes in, not to replace human reviewers, but to make their work more impactful and helpful. -Looking back at CodeRabbit's journey, our fundamental mission remains unchanged: +### Deep Understanding, Immediate Insights -> To build the best code review experience in the cloud +Think about how you approach reviewing a complex pull request. You first try to understand the context, examine potential edge cases, and consider architectural implications. CodeRabbit performs this same thoughtful analysis, but delivers insights within minutes of PR submission. -This is our core mission today. It's clear to us that as development teams grow and codebases become more complex, manual code reviews become increasingly challenging and time-consuming. No one wants to spend hours reviewing code when they could be building features. +For example, when examining a change to your authentication system, CodeRabbit doesn't just flag syntax issues - it analyzes the entire authentication flow, identifying potential security vulnerabilities in token handling or session management specific to your implementation: -## Real-World Code Reviews +![CodeRabbit Review comment on a Auth Flow](/img/about/why-cr-auth-flow-cors.png "CodeRabbit Code Review Comment") -> CodeRabbit currently processes [Over 470,000 pull requests](https://github.com/search?q=coderabbitai&type=pullrequests) across multiple languages including TypeScript, Go, Python, JavaScript, Java, Rust, C#, and PHP. +### Intelligence Through Integration -:::tip See it in action -Browse through real-world examples of CodeRabbit's reviews on GitHub to see how it helps developers write better code every day. -::: +CodeRabbit combines the specialized insights of over 20 analysis tools (ESLint, Semgrep, Checkov, and more) with AI understanding to provide meaningful, actionable feedback. But instead of drowning you in alerts, it provides curated, context-aware suggestions. -## The Problem With Traditional Code Reviews +### Learning Your Team's DNA -As engineering teams scale, several critical issues emerge: +What makes CodeRabbit truly valuable is its ability to learn and adapt to your team's codebase, practices, and standards. It doesn't just pattern match - it builds a deep understanding through direct interactions with your team. For example, when a reviewer indicates a preference: -1. **Review Latency** - PRs often sit for days waiting for review, blocking feature delivery -2. **Inconsistent Quality** - Different code reviewers focus on different aspects -3. **Knowledge Silos** - Critical insights stay trapped with individual code reviewers -4. **Context Switching** - Developers lose focus when reviewing large PRs -5. **Scale Limitations** - Senior developers become review bottlenecks +![CodeRabbit Learnings](/img/about/why-cr-learnings.png "How CodeRabbit learns and remembers org standards") -## CodeRabbit is AI-Powered +CodeRabbit will then: -CodeRabbit leverages advanced AI to provide intelligent, context-aware code reviews. +- Remember this preference for future reviews +- Apply this knowledge across the entire codebase +- Share this learning with the whole team through its review comments +- Maintain consistency with your established standards -Our AI engine understands not just the syntax, but the intent and context of code changes. This enables reviews that go beyond simple style checks to provide meaningful insights about: +### Practical Impact on Your Workflow -- Security vulnerabilities -- Performance optimizations -- Design patterns -- Best practices -- Documentation completeness +When a developer opens a pull request, CodeRabbit: -:::tip Did you know? -CodeRabbit's AI model is trained on millions of code reviews and continuously learns from user feedback to improve its suggestions. -::: +- Analyzes changes across the entire codebase context +- Generates a clear, actionable summary +- Creates visual sequence diagrams for complex changes +- Provides specific feedback and suggestions -## CodeRabbit is Context-Aware +This means human reviewers can focus on architectural decisions and knowledge sharing, rather than catching basic issues. -A review system that understands your codebase and team preferences. +### Built for Production Teams -Unlike traditional automated review tools that apply generic rules, CodeRabbit: +For teams building production software, CodeRabbit provides: -- Learns from your team's coding patterns -- Understands your project's architecture -- Considers the full context of changes -- Adapts to your team's preferences -- Provides relevant, actionable feedback +- SOC 2 Type II and GDPR compliance for enterprise security requirements +- Self-hosted deployment options for complete control +- Zero data retention policy - code is analyzed in memory and immediately discarded -## CodeRabbit is Fully Managed +Want to see the impact yourself? Try CodeRabbit on your next complex refactoring PR - you might be surprised at the subtle implications it catches that could easily be missed in manual review. -Leave the infrastructure management to us. +## Not convinced? Read more -Being fully managed means CodeRabbit: - -- Automatically scales with your needs -- Requires zero maintenance -- Provides enterprise-grade security -- Ensures high availability -- Handles updates seamlessly - -## CodeRabbit is Platform Agnostic - -Supporting all major Git platforms and development workflows. - -CodeRabbit integrates seamlessly with: - -- GitHub -- GitLab -- Azure DevOps - -And supports all major programming languages and frameworks without requiring any special configuration. - -## Who should use CodeRabbit? - -### Individual Developers - -- Get expert-level code reviews instantly -- Learn best practices through AI suggestions -- Improve code quality before team review - -### Development Teams - -- Standardize review processes -- Reduce review bottlenecks -- Share knowledge across the team -- Maintain consistent code quality - -### Enterprises - -- Scale code review processes efficiently -- Enforce security and compliance standards -- Reduce technical debt -- Accelerate development cycles - -:::tip Free for Open Source -CodeRabbit is completely **FREE** for open-source projects. Our architecture enables us to provide a sustainable free tier that includes: - -- Unlimited public repositories -- Full feature access -- No credit card required - ::: - -## CodeRabbit Doesn't Lock You In - -Built on open standards, easy to integrate and customize. - -CodeRabbit: - -- Works with your existing Git workflow -- Requires minimal configuration -- Supports standard code review protocols -- Allows easy export of review data -- Integrates with popular development tools - -## CodeRabbit Makes Code Reviews Easy - -Set up automated code reviews in minutes. - -1. Log in with GitHub, GitLab, or Azure DevOps -2. Select repositories to review -3. Create a pull request -4. Watch CodeRabbit provide instant feedback - -```bash -# Example review feedback time -Traditional Review: 24-48 hours -CodeRabbit Review: < 5 minutes -``` - -## Data Privacy and Security - -Your code's security is our top priority. - -- **SOC2 Type II Certified** -- **GDPR Compliant** -- **Zero Data Retention**: Reviews are ephemeral -- **Isolated Environments**: Your code stays private -- **No Training**: Your code is never used to train models - -## Are you ready? +You can read more about our custom [code review instructions](/guides/review-instructions) or how we verify issues using [knowledge bases](/integrations/knowledge-base) like Linear and Jira. Join thousands of developers who are already benefiting from AI-powered code reviews. diff --git a/docs/platforms/_category_.yaml b/docs/platforms/_category_.yaml index 185b2b05..8ae92cb7 100644 --- a/docs/platforms/_category_.yaml +++ b/docs/platforms/_category_.yaml @@ -1,4 +1,4 @@ -label: Git +label: Git Platforms position: 3 collapsible: true collapsed: false diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 8254684b..901453af 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -180,7 +180,7 @@ const config: Config = { className: "navbar-link-active", }, { - href: "https://blog.coderabbit.ai/blog", + href: "https://coderabbit.ai/blog", label: "Blog", position: "left", }, diff --git a/src/css/custom.css b/src/css/custom.css index a2d00fbc..6c7fad2b 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -81,7 +81,7 @@ a[docid="docs"] > svg { } @media screen and (max-width: 480px) { - a.navbar__item.navbar__link[href="https://blog.coderabbit.ai/blog"] + a.navbar__item.navbar__link[href="https://coderabbit.ai/blog"] { display: none; } @@ -148,7 +148,7 @@ a[docid="docs"] > svg { } @media screen and (max-width: 480px) { - a.navbar__item.navbar__link[href="https://blog.coderabbit.ai/blog"] + a.navbar__item.navbar__link[href="https://coderabbit.ai/blog"] { display: none; } diff --git a/src/theme/Footer/index.js b/src/theme/Footer/index.js index 72e042fa..365cc671 100644 --- a/src/theme/Footer/index.js +++ b/src/theme/Footer/index.js @@ -43,7 +43,7 @@ function CustomFooter(props) { Docs Blog diff --git a/static/img/about/why-cr-auth-flow-cors.png b/static/img/about/why-cr-auth-flow-cors.png new file mode 100644 index 00000000..b06829b9 Binary files /dev/null and b/static/img/about/why-cr-auth-flow-cors.png differ diff --git a/static/img/about/why-cr-learnings.png b/static/img/about/why-cr-learnings.png new file mode 100644 index 00000000..01081663 Binary files /dev/null and b/static/img/about/why-cr-learnings.png differ diff --git a/static/img/finishing-touches/docstrings-pull-request.png b/static/img/finishing-touches/docstrings-pull-request.png new file mode 100644 index 00000000..c610e468 Binary files /dev/null and b/static/img/finishing-touches/docstrings-pull-request.png differ