{"name":"Open Code Review: AI-Powered Code Review Tool from Alibaba","description":"Open Code Review is an AI-powered command-line interface tool for code review, battle-tested at Alibaba's scale. It leverages a hybrid architecture, combining deterministic engineering with an LLM agent, to provide secure, fast, and efficient code analysis. This tool generates precise, line-level comments and supports a multi-language ruleset, ensuring high-quality code reviews.","github":"https://github.com/alibaba/open-code-review","url":"https://osrepos.com/repo/alibaba-open-code-review","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/alibaba-open-code-review","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/alibaba-open-code-review.md","json":"https://osrepos.com/repo/alibaba-open-code-review.json","topics":["agent","code-review","code-review-assistant","AI","DevTools","Go","LLM"],"keywords":["agent","code-review","code-review-assistant","AI","DevTools","Go","LLM"],"stars":null,"summary":"Open Code Review is an AI-powered command-line interface tool for code review, battle-tested at Alibaba's scale. It leverages a hybrid architecture, combining deterministic engineering with an LLM agent, to provide secure, fast, and efficient code analysis. This tool generates precise, line-level comments and supports a multi-language ruleset, ensuring high-quality code reviews.","content":"## Introduction\n\nOpen Code Review is an AI-powered code review CLI tool, originally developed and battle-tested at Alibaba Group. It has served tens of thousands of developers, identifying millions of code defects with high efficiency and precision. This open-source project offers a robust solution for automated code analysis, leveraging a hybrid architecture that combines deterministic pipelines with an LLM agent.\n\nIt reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use capabilities, and generates structured review comments with line-level precision. The agent can read full file contents, search the codebase, inspect other changed files for context, and produce deep reviews, not just surface-level diff feedback. Beyond diff review, `ocr scan` can review entire files for auditing unfamiliar codebases.\n\n## Why Use and Key Benefits\n\nGeneral-purpose AI agents often struggle with code review due to incomplete coverage, inaccurate issue positioning, and inconsistent quality. Open Code Review addresses these challenges with its unique hybrid design, combining deterministic engineering with an intelligent agent.\n\n**Deterministic Engineering** ensures critical review steps are precise and reliable. This includes accurate file selection, smart bundling of related files for isolated context, and fine-grained rule matching to focus the model's attention. It also features external positioning and reflection modules for improved comment accuracy.\n\nThe **Agent** component excels in dynamic decision-making and context retrieval, utilizing scenario-tuned prompts and a purpose-built toolset optimized for code review. This approach leads to significantly higher precision and F1 scores, while consuming fewer tokens compared to general-purpose agents, as demonstrated by its benchmark results.\n\n## Installation\n\nTo get started with Open Code Review, ensure you have Git version 2.41 or higher installed. The easiest way to install the CLI tool is via npm:\n\nbash\nnpm install -g @alibaba-group/open-code-review\n\n\nAfter installation, the `ocr` command will be globally available. For alternative installation methods, including binaries from GitHub Releases or building from source, please refer to the [official documentation](https://open-codereview.ai/docs/installation).\n\n## Examples\n\nBefore reviewing code, you need to configure your Large Language Model (LLM) provider and model. The CLI provides an interactive setup:\n\nbash\nocr config provider          # Select a built-in provider or add a custom one\nocr config model             # Pick a model for the active provider\n\n\nOnce configured, you can start reviewing your code using various modes:\n\nbash\ncd your-project\n\n# Workspace mode, reviews all staged, unstaged, and untracked changes\nocr review\n\n# Branch range, reviews changes since it diverged from main\nocr review --from main --to feature-branch\n\n# Single commit review\nocr review --commit abc123\n\n# Full-file scan, reviews entire files without git history\nocr scan\n\n# Delegation mode, lets your AI coding agent perform the review\nocr delegate preview\n\n\n## Links\n\nExplore Open Code Review further with these resources:\n\n*   [Official Website](https://open-codereview.ai)\n*   [GitHub Repository](https://github.com/alibaba/open-code-review)\n*   [Full Documentation](https://open-codereview.ai/docs)","metrics":{"detailViews":2,"githubClicks":0},"dates":{"published":null,"modified":"2026-09-18T15:05:04.000Z"}}