Alibaba's open-source CLI reviews code diffs with an LLM agent and rule checks
A command-line tool that combines an LLM agent with fixed engineering steps to review Git diffs or whole files and leave line-level comments.
Open Code Review is a command-line tool that runs as ocr. It reads Git diffs, sends the changed files to a configured LLM through an agent with tool use, and writes structured review comments with line-level positions. According to the README, the project began as an internal AI code review assistant at Alibaba Group and was open-sourced after serving tens of thousands of developers. The ocr scan command reviews whole files instead. It suits auditing unfamiliar codebases or directories where there is no meaningful diff.
The README argues that general agents such as Claude Code, when driven by a skill, cut corners on large changesets and report misplaced line numbers. Its answer is to split the work. Deterministic code selects files, bundles related ones such as paired message_en and message_zh properties files, and matches rules. The agent handles judgment inside each bundle. In a benchmark the README calls AACR-Bench, built from 50 repositories and 200 pull requests, the project reports higher precision and F1 than Claude Code on the same model, using about 1/9 of the tokens. It also reports lower recall, which the README describes as a deliberate trade-off.
Setup requires Git 2.41 or later. Native mode needs a model provider set with ocr config provider. Delegation mode lets the host agent do the analysis using its own login. The README notes that a host-agent subscription is not an API credential for native mode. Install with npm install -g @alibaba-group/open-code-review, and add agent skills with npx skills add alibaba/open-code-review. The project is licensed under Apache-2.0. The README does not list open items.
In the author's words
Open Code Review is an AI-powered code review CLI tool.
From the README or the author's post. We checked that the sentence is there, not that it is true.
When to reach for it
When one general agent skips files or drifts on line numbers, the README's split between deterministic file selection and agent analysis is a pattern worth copying. Delegation mode lets you run it without a separate API key.
Works with
See it
AI wrote this entry from the project's own README or its author's post. What the project does, and that AI built it where the entry says so, are the author's statements, quoted here. Nobody at IKANGAI ran or tested it. How this list is made