Open Code Review is an open source CLI tool that reads Git diffs and generates s...
O

Open Code Review is an open source CLI tool that reads Git diffs and generates s...

Open Code Review is an open source CLI tool that reads Git diffs and generates s...

CLI
9,704 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

Open Code Review: Let AI Handle Your First Pass at Code Reviews

You know that feeling when you open a PR and immediately spot something obvious? Missing error handling. A logic gap. A formatting nitpick that’s clearly a copy-paste leftover. You could leave a comment, but it feels like noise.

What if the machine caught those things before you even opened the diff?

Open Code Review is a new open source CLI tool from Alibaba that does exactly that. It reads your Git diff, feeds it to an LLM (like GPT-4 or DeepSeek), and spits out structured, context-aware review comments. No dashboard. No plugin. Just your terminal.

What It Does

Under the hood, open-code-review is dead simple:

  1. You run the CLI (either standalone or in a CI/CD pipeline).
  2. It grabs the current Git diff (uncommitted changes or a specific commit range).
  3. It sends that diff to a configured LLM with a prompt designed to catch bugs, style issues, and logical errors.
  4. It outputs the review comments in a clean, markdown-friendly format.

The output groups comments by file, each with a category like "bug risk," "improvement suggestion," or "style nit." You can pipe it to a file, a PR comment endpoint, or just read it in your terminal.

Why It’s Cool

It doesn’t try to replace your reviewer. That’s the key. The tool is intentionally positioned as a first pass. Think of it as a linter on steroids. It catches the kind of boring, repetitive issues that make human reviewers zone out, so the actual review conversation can focus on architecture, trade-offs, and design.

A few specific things I like:

  • It works with any Git project. No platform lock-in. Use it with GitHub, GitLab, or a bare repo on your laptop.
  • Multiple model backends. Supports OpenAI, DeepSeek, and local models via Ollama. You can pick the cheapest or most private option depending on your needs.
  • Prompt is customizable. You can tweak the system prompt to match your team’s style guide or focus on specific languages.
  • No config hell. A single OPENAI_API_KEY or equivalent, and you’re good. The tool infers the diff from your current branch state.

The implementation is straightforward Rust (it’s fast), but the design philosophy is what stands out. It respects that you work in Git, not in a web UI.

How to Try It

Installation is one command if you have Rust installed:

Did you like this issue?

Join our weekly newsletter

Related Projects

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: May 30, 2026