# alibaba/open-code-review

> open-code-review is an AI-powered code review command-line tool for Git repositories. It reads Git diffs and sends the changed files to a language model you configure, using an agent that can read full file contents and search the codebase. It produces structured review comments with line-level precision, and its core code is written in Go, with TypeScript and Kotlin extensions for VS Code and IntelliJ.

Source: https://github.com/alibaba/open-code-review
Indexed: commit 39515dc on 2026-11-22 by Repowise. Facts come from the source and git history, not from the maintainer.

## Facts

- Type: Command-line tool
- Language: Go
- Stars: 55,254 at index time
- License: Apache-2.0
- Code health: 6.9/10, Fair
- Last commit: 2026-11-21
- Contributors: 180

## Install

From the README: https://github.com/alibaba/open-code-review#install

Install the ocr command globally with npm.
    npm install -g @alibaba-group/open-code-review

## How to use

Select a built-in model provider or add a custom one.
    ocr config provider

Pick a model for the active provider.
    ocr config model

## How it works

Commands enter through cmd/opencodereview/main.go, and bin/ocr.js is a launcher that starts the packaged Go binary with the arguments you typed. The internal directory holds the engine behind the review and scan commands, which decides which changed files get reviewed, asks the model about them, and keeps the findings. internal/agent/agent.go is one of the hotspot files that drives the agent, and internal/llm/client.go handles communication with the configured model. internal/llmloop/loop.go is another hotspot file in the review code. The extensions directory brings the same review into VS Code and IntelliJ, so a developer can start a review and act on each comment in the editor.

- acp/cmd/ocr-acp/main.go: entry point
- bin/ocr.js: entry point
- cmd/opencodereview/main.go: entry point
- extensions/frontend/src/webview/App.tsx: entry point
- internal/llm/gen/main.go: entry point
Modules: internal, cmd, extensions, acp, pages, scripts, examples, bin. 1,161 files, 169,380 lines, 9,604 symbols.

## Code health

- Score: 6.9/10 (Fair)
- Trend: 6.8 on 2026-11-17, 6.9 on 2026-11-22
- Rank: #154 of 4,000+ indexed repos
- Hotspots: internal/agent/agent.go, internal/llmloop/loop.go, internal/llm/client.go, cmd/opencodereview/session_cmd.go, cmd/opencodereview/output.go
- Lowest file: scripts/github-actions/post-review-comments.js
- Dead code: 3 findings

## Maintenance

- Last commit 2026-11-21, 500 commits
- 180 contributors, bus factor 3

## Security

- Security findings are shown to signed-in users at https://repowise.dev/repo/alibaba/open-code-review/security

## More

- Page: https://repowise.dev/repo/alibaba/open-code-review
- Ask this codebase: https://repowise.dev/repo/alibaba/open-code-review/chat
- Docs: https://repowise.dev/repo/alibaba/open-code-review/docs
- MCP (signs in with Repowise on first use):
    claude mcp add --transport http repowise https://api.repowise.dev/mcp/alibaba/open-code-review
