Open-source AI code reviewer that runs LLM-based reviews on GitHub pull requests and local branch changes, with any model provider.
alibaba/open-code-review
AI-powered code review CLI that pairs deterministic file selection and rules with an LLM agent to leave line-level review comments on Git diffs.
Open-source alternative to:CodeRabbit
- Stars
- 49,564
- Forks
- 3,637
- Open issues
- 342
- Last commit
- yesterday
What is it?
Open Code Review is a command-line tool that reviews code changes with an LLM. It reads Git diffs, selects which files need review, groups related files into bundles, and sends each bundle to an agent that can read full file contents, search the codebase, and inspect other changed files for context. The output is structured review comments tied to specific lines.
The project splits work between fixed engineering logic and the model. File selection, rule matching, and comment positioning are handled by deterministic modules, while the agent handles dynamic decisions and context retrieval. The built-in ruleset covers issues such as null pointer dereferences, thread safety, XSS, and SQL injection across multiple languages.
Besides reviewing diffs for a workspace, a branch range, or a single commit, the `ocr scan` command reviews whole files or directories. It supports OpenAI- and Anthropic-compatible endpoints, and can run in a delegation mode where a coding agent such as Claude Code performs the review with its own model.
Key features
- 01Reviews Git diffs for a workspace, a branch range, or a single commit.
- 02Produces structured review comments with line-level positioning.
- 03Includes built-in rules for NPE, thread-safety, XSS, and SQL injection issues.
- 04Scans whole files or directories without requiring a diff via `ocr scan`.
- 05Works with OpenAI- and Anthropic-compatible model endpoints.
- 06Offers plugins for Claude Code, Codex, Cursor, Kimi Code, and OpenCode.
Use cases
- Adding automated review of pull requests to a CI/CD pipeline such as GitHub Actions or GitLab CI.
- Reviewing a feature branch against main before opening a merge request.
- Auditing an unfamiliar codebase or directory that has no meaningful diff.
- Letting an AI coding agent run the review with its own model through delegation mode.
Quick start
- 1
Install the CLI globally via npm
npm install -g @alibaba-group/open-code-review - 2
Configure an LLM provider
ocr config provider - 3
Pick a model for the active provider
ocr config model - 4
Run a review in your Git project
ocr review
Things to know
- Requires Git 2.41 or newer.
- Reviews need a configured LLM endpoint and API key, unless you use Delegation Mode.
- Recall is lower than general-purpose agents, a deliberate trade-off for precision.
In collections
Topics
FAQ
- What is open-code-review?
- AI-powered code review CLI that pairs deterministic file selection and rules with an LLM agent to leave line-level review comments on Git diffs. Open Code Review is a command-line tool that reviews code changes with an LLM. It reads Git diffs, selects which files need review, groups related files into bundles, and sends each bundle to an agent that can read full file contents, search the codebase, and inspect other changed files for context. The output is structured review comments tied to specific lines.
- Is open-code-review free to use? What license does it have?
- open-code-review is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is open-code-review still maintained?
- Actively maintained. The last commit to open-code-review was on Nov 6, 2026.
- What can I use open-code-review for?
- Adding automated review of pull requests to a CI/CD pipeline such as GitHub Actions or GitLab CI. Reviewing a feature branch against main before opening a merge request. Auditing an unfamiliar codebase or directory that has no meaningful diff. Letting an AI coding agent run the review with its own model through delegation mode.
- How do I install open-code-review?
- Install the CLI globally via npm: npm install -g @alibaba-group/open-code-review Configure an LLM provider: ocr config provider Pick a model for the active provider: ocr config model Run a review in your Git project: ocr review
- Where can I get open-code-review?
- The source code and installation instructions are on GitHub: https://github.com/alibaba/open-code-review
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
AI-powered code review tool that posts inline, summary and reply comments on pull and merge requests using LLMs like OpenAI, Claude or Ollama.
A best-effort security scanner for AI Agent Skills that detects prompt injection, data exfiltration and malicious code patterns.
Open-source, bring-your-own-key GitHub bot that runs AI code review, issue triage and CI autofixes inside your GitHub Actions workflows.
A self-hosted, all-in-one development platform combining Git hosting, issues, CI/CD, packages, wiki and AI agents.
A modular runtime and orchestration system that coordinates AI coding agents through gated pipelines for tasks, review, shipping and docs across Claude Code, Codex, Cursor and more.