Getting Started
Install gx, initialize a repository, and review your first change.
gx is a CLI for code review. It reads the change you are about to ship, holds it against the session that produced it, and gives you a ship / no-ship verdict. You work in plain Git; there is no gx commit verb and nothing to sign in to.
Install
curl -fsSL https://download.gx.run/install.sh | shThat puts gx, gx-mcp, and shell completions in ~/.local/bin, and verifies
the archive against its published checksum first. To build from source instead,
clone the repository and run just install.
Review runs a model, so it needs your key:
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEYThere is no gx account and no server in the path. The key goes to
api.anthropic.com or api.openai.com and nowhere else.
Basic usage
cd your-repo
gx init # once per repo: hooks, identity, and the MCP server
# ... make changes in your editor, using whatever coding agent you like ...
gx review # the verdict, before you ship
git push # ordinary git; the hook stamps each commit
gh pr create # ordinary gitgx review takes an optional intent — one sentence, in your words, saying what
the change was meant to do:
gx review "fix the auth timeout"It is not a question and not a filter. The reviewer holds the diff against it, so a change that quietly does more than the intent says is itself a finding.
If you are signed in with the GitHub CLI, gx review posts its comment on the
pull request as well. GH_TOKEN or GITHUB_TOKEN works too; --no-comment
skips it either way. Neither is required.
Reading the verdict
Findings land in two lanes. Blocking stops the change and exits 3.
Advisory is reported and does not. A finding blocks only when both reviewers
raised it independently and a third model confirmed it — one model's opinion
is advisory.
gx review --fail-on none # report everything, never gate
gx review --json # machine-readable
gx review --md # the PR-comment bodyExit codes: 0 clean, 3 blocking findings, 4 nothing to review, 5 the
review ran degraded. In CI, 3 is the gate.
Uninstall
rm -f ~/.local/bin/gx ~/.local/bin/gxr ~/.local/bin/gxe ~/.local/bin/gx-mcp
rm -f ~/.local/share/bash-completion/completions/gx ~/.zfunc/_gxInstalled hooks exit silently when the binary is gone, so plain Git keeps
working. Local data stays in ~/.gx.
Pages
- CLI — every command and flag
- How it works — what the reviewers read, and what the verdict means
- MCP — connect
gx_reviewto Claude Code, Cursor, and Codex - Pull Requests — posting the review comment