LangChain
Agent engineering platform for building LLM applications from composable parts
A Go CLI that reviews Git diffs with an LLM agent and returns line-level comments, with built-in rules.
Made open-code-review? Claim it to edit the listing and see how many people view it. Sign in to claim
open-code-review is a command-line code reviewer from Alibaba that reads your Git diff and posts structured, line-level comments using a model you choose. It is for developers who want AI review without a hosted service.
It is written in Go, uses the Apache-2.0 license, and has about 55,000 stars. The README says it began as Alibaba's internal code review assistant before being released as open source.
Table of contents
The tool, invoked as ocr, reads the changes in a Git repository, splits them into review units, and sends them to a configurable LLM through an agent that can use tools. The agent can read full files, search the codebase and look at other changed files for context before it writes a comment.
The design idea in the README is a hybrid. Steps that must not go wrong are handled by ordinary code, and the model handles the judgment calls. Deterministic code picks which files to review, bundles related files together (a pair of translated .properties files is the README's example), matches rules to each file, and runs separate modules that check comment position and content. The agent then decides what context to fetch and what to say.
The README argues this fixes common problems with general-purpose agents used for review: skipping files on large changesets, comments pointing at the wrong line, and quality that shifts with small prompt changes. It publishes a benchmark of 200 pull requests from 50 open-source repositories across 10 languages, and says open-code-review beats Claude Code on precision and F1 with the same model while using about one ninth of the tokens. It also says recall is lower, and calls that deliberate. Fewer false alarms and a few more missed issues is the trade.
You need Git 2.41 or newer. Install the skills into the project you want to review and pick your agent in the installer:
npx skills add alibaba/open-code-review
Or install the CLI globally:
npm install -g @alibaba-group/open-code-review
Then set up a provider and model with the interactive prompts:
ocr config provider
ocr config model
Review your current changes, or a branch against main:
ocr review
ocr review --from main
If you have no separate API key, the README suggests starting with delegation mode, which uses your host agent's own model and login. It notes this skips OCR provider setup but not the host agent's costs or usage limits.
It suits solo developers and small teams who want a second reviewer on every change, and who are comfortable choosing and paying for an LLM endpoint. The CLI shape makes it easy to run before a push or inside CI, and the JSON output suits scripts.
Skip it if you want a hosted bot that comments on pull requests with no setup, since this is a local CLI that you configure. Skip it if maximum recall matters more than noise, because the README says recall is lower than general-purpose agents. Benchmark numbers come from the maintainers, so run it on a few of your own pull requests before relying on it.
The README compares itself to general-purpose coding agents with review skills, such as Claude Code. Beyond that, compare against hosted AI pull request reviewers that comment inside GitHub, and against plain static analysis tools and linters, which are deterministic but do not reason about intent. A reasonable setup often combines a linter with an AI reviewer. See open-code-review alternatives and the wider AI repos directory.
The code is Apache-2.0, so you can use it commercially. The tool is free, but in native mode you pay your model provider per token. Delegation mode uses whatever your host agent already costs you.
The README says its benchmark covers 10 programming languages and that it ships a multi-language ruleset. It does not list every supported language in the part of the README reviewed here.
In native mode, yes, you configure a provider and model with ocr config. In delegation mode you do not, because your coding agent reviews the code.
Yes. The skills work in Claude Code, Codex, Cursor, Kimi Code and other agents that support Agent Skills and can run local commands.
It adds engineering guardrails for file selection, bundling, rule matching and comment positioning. The README says this gives higher precision and lower token use, at the cost of lower recall.
Yes. Use ocr session list, then pass --resume with the session id on the same review command.
Agent engineering platform for building LLM applications from composable parts
Agent harness optimisation for Claude Code, Codex, OpenCode and Cursor
Self-improving agent from Nous Research that learns across sessions
Small, composable agent skills from Matt Pocock's daily .agents directory