Install a runtime
Extract the project source to a trusted directory outside the checkout you plan to review. Run these commands from the extracted directory and replace ../project with the checkout path.
python3 -m venv .venv
. .venv/bin/activate
python -m pip install .
reviewgate review --repo ../project --stagedcargo install --path . --locked
reviewgate review --repo ../project --stagedBoth editions require Git 2.31 or newer. The Python edition requires Python 3.11 or newer. In PowerShell, activate the virtual environment with .venv\Scripts\Activate.ps1.
Both installations provide a reviewgate executable. If you use both, select the Python executable in its virtual environment or the Rust executable in Cargo’s installation directory.
Choose the coverage
| Capability | Python | Rust |
|---|---|---|
| Commit ranges, staged changes and JSON verdicts | Supported | Supported |
| Selected Rust, JS/TS, Go and C-family rules | Token checks | Token checks |
| Python files | Syntax tree, compilation and API changes | Targeted token rules |
| JSON syntax and duplicate keys | Supported | Supported |
| TOML syntax | Supported | Returns incomplete |
| MCP, optional Ruff and verified model packets | Supported | Use the Python edition |
Run reviewgate capabilities in the Rust edition for the native rule IDs. A file can receive different verdicts from the two editions. Native rule guide
Review a Git snapshot
For local development, inspect the staged index. For a pull request, compare the head to its merge base. For a branch push, pass the before and after commits with --comparison direct. Fetch the revisions before running the review.
reviewgate review --repo ../project --staged --format text
reviewgate review --repo ../project --base origin/main --head HEAD
reviewgate review --repo ../project --comparison direct --base BEFORE_SHA --head AFTER_SHAGate pull requests
From the trusted Python installation, select the command for your forge. Inspect the generated files and merge them into the protected default branch.
reviewgate-install --repo ../project --forge github
reviewgate-install --repo ../project --forge forgejoThe templates use the Python reviewer. Their setup guides cover required checks, credentials and runner permissions. Trusted CI jobs can also call the Rust CLI directly.
GitHub setup · Forgejo setup · GitHub workflow · Forgejo workflow
Read the verdict
| Exit | Verdict | Meaning |
|---|---|---|
| 0 | clear | All enabled checks completed within their declared scope. |
| 1 | blocked | At least one deterministic finding requires attention. |
| 2 | incomplete | Inspect issues and file coverage. The review is missing evidence. |
Parse the JSON even when the process exits with a nonzero code. Each finding names a rule, a file, the side of the change and a line where available. An incomplete review can still contain findings.
Keep the reviewer installation outside the candidate checkout. Treat code, quotations and model advisories as untrusted data in your agent harness. Harness and MCP guide
Deploy the Astro site
Import the monorepo into Vercel and keep the root directory at the repository root. The included configuration builds the Astro site. Under Settings → Domains, add a hostname you control, such as reviewgate.x47.dev, and use the DNS record Vercel displays.
For local development, use Node.js 24 and run npm ci followed by npm run dev from the repository root. Run npm run build to generate the web root in site/dist/. You can also deploy the extracted website ZIP to any static web root. Deployment guide