Open-Code-Review Deployment Requirements: Complete Setup Guide

Deploy Open-Code-Review by installing Git ≥2.41 and either Node.js with npm for the JavaScript wrapper, or download pre-compiled binaries for Linux, macOS, or Windows; Go 1.22+ is only required when building from source.

The alibaba/open-code-review repository distributes a cross-platform AI-powered code review CLI that requires specific runtime dependencies depending on your installation method. Understanding the deployment requirements ensures seamless integration into local development workflows or CI/CD pipelines. This guide covers every prerequisite, from Git versioning to network connectivity for LLM endpoints.

Core Prerequisites

All deployment paths share two non-negotiable requirements: a compatible Git installation and network access to an AI provider.

Git Version Requirements

Git ≥2.41 is mandatory for all installation methods. According to the source code in cmd/opencodereview/main.go, the CLI relies on the local Git client to generate diffs, resolve file contents, and perform repository-wide scans. The tool executes native Git commands to read staged and unstaged changes, making the binary incompatible with older Git versions that lack required diff-generation flags.

Operating System Support

The project officially supports Linux, macOS, and Windows. The install.sh and install.ps1 scripts in the repository root detect the host platform and download the appropriate pre-compiled binary. No additional virtualization layers are required for the standalone binary releases.

Installation Methods and Their Requirements

Choose from four distinct deployment paths, each with unique toolchain dependencies.

npm Global Installation (Node.js)

The primary distribution method uses npm to install the @alibaba-group/open-code-review package. This requires:

  • Node.js ≥14 (enforced by the engines field in package.json)
  • npm or yarn for package management

The npm wrapper installs the compiled Go binary and creates the ocr command shim. This method abstracts platform differences but adds a Node.js dependency.

npm install -g @alibaba-group/open-code-review
ocr version

Shell Script Installers (Linux/macOS and Windows)

For users without Node.js, the repository provides native installers:

Linux/macOS: Requires a POSIX-compatible shell (sh, bash, zsh) and curl. The script downloads the binary to /usr/local/bin and sets up the ocr command.

curl -fsSL https://raw.githubusercontent.com/alibaba/open-code-review/main/install.sh | sh

Windows: Requires PowerShell 5+. The install.ps1 script places ocr.exe in $Env:ProgramFiles\OpenCodeReview and updates the system PATH.

irm https://raw.githubusercontent.com/alibaba/open-code-review/main/install.ps1 | iex

Binary Releases (Standalone)

Download pre-compiled archives directly from GitHub Releases. This method requires no language runtime—only the OS-specific binary. Extract the archive and move the binary to a directory in your system PATH (e.g., /usr/local/bin on Unix systems or C:\Windows\System32 on Windows).

Building from Source (Go)

Compiling from source requires the full Go toolchain:

  • Go ≥1.22 (declared in go.mod)
  • C compiler (for cgo dependencies)
  • Git (to clone the repository)
git clone https://github.com/alibaba/open-code-review.git
cd open-code-review
go build ./cmd/opencodereview

# Move the resulting binary (opencodereview or ocr.exe) to your PATH

Network and Runtime Dependencies

Beyond local binaries, Open-Code-Review requires external connectivity for its AI functionality.

LLM Endpoint Connectivity

The deployment requires network connectivity to an LLM endpoint. As implemented in alibaba/open-code-review, the CLI forwards changed files to configurable providers (Claude, OpenAI, or custom endpoints) to generate review comments. Without this connectivity, the ocr review command cannot function, though local diff generation remains available.

Optional Docker Support

While not strictly required, Docker simplifies deployment in CI/CD environments. The repository documentation references containerized runners for GitHub Actions and GitLab CI that bundle the ocr binary with Git and networking utilities. This eliminates version conflicts in ephemeral build environments.

Summary

  • Git ≥2.41 is mandatory for all installation methods to enable diff generation and repository operations.
  • Node.js ≥14 is required only for the npm installation path (@alibaba-group/open-code-review).
  • Go 1.22+ is necessary solely for compiling from source via go build ./cmd/opencodereview.
  • Linux, macOS, and Windows are fully supported through pre-compiled binaries.
  • Network access to an LLM endpoint is required for AI-powered code review functionality.
  • Shell script installers provide the fastest deployment for users without Node.js or Go toolchains.

Frequently Asked Questions

Does Open-Code-Review require a specific Node.js version for the npm package?

Yes. The package.json specifies "engines": {"node": ">=14"}, meaning you need Node.js version 14 or higher to install the @alibaba-group/open-code-review package globally. The npm wrapper handles the underlying Go binary installation automatically.

Can I deploy Open-Code-Review without installing Node.js or Go?

Absolutely. Download the pre-compiled binary for your operating system from the GitHub Releases page, or use the platform-specific install scripts (install.sh for Linux/macOS, install.ps1 for Windows). These methods require only Git ≥2.41 and place a standalone binary on your system PATH.

What Go version is required to build Open-Code-Review from source?

The go.mod file declares Go 1.22 as the minimum version. You also need a C compiler available on your system for cgo dependencies, along with Git to clone the repository and build the cmd/opencodereview package.

Is an internet connection required after installation?

Yes, for the AI review features. While the ocr CLI operates offline for local diff generation, the ocr review command requires network connectivity to reach your configured LLM endpoint (OpenAI, Claude, or custom providers). CI/CD deployments must ensure egress rules allow HTTPS traffic to these endpoints.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →