Quickstart
5 min read · updated Dec 2Review your first pull request in under five minutes. You’ll run LGTM locally with the CLI, then connect the GitHub App so it comments on every PR.
No account needed. The CLI reviews a local branch with your own model keys. The GitHub App and LGTM Cloud are optional.
1
Install the CLI
LGTM ships as a single npm package. Node 20 or newer is required.
terminalCopy
$ npm install -g lgtm
$ lgtm --version
lgtm 1.0.0
2
Review a branch
Point LGTM at a base branch. It reads the diff, runs the reviewers and prints findings sorted by severity.
terminalCopy
$ lgtm review --base main
HIGH src/webhooks/refunds.ts:42 Webhook retries refund twice
MED src/api/orders.ts:118 Unbounded page size
2 findings · score 3/5 · $0.04 · 18 s
Keys stay local. LGTM reads OPENAI_API_KEY, ANTHROPIC_API_KEY or GEMINI_API_KEY from your environment and never uploads them.
3
Add lgtm.yml
Commit a config to tune models, rules and merge gates. Everything is optional; these are the defaults.
lgtm.ymlCopy
reviewers: [gemini-4-neon, claude-opus-5-5]
judge: claude-sonnet-5-5
gates:
min_score: 4
block_on: [critical, high]
4
Connect the GitHub App
Install the LGTM GitHub App on the repositories you want reviewed. It reads the same
lgtm.yml, comments inline on every opened or updated pull request, and reports the merge gate as a status check.5
Next steps
Run LGTM on your own infrastructure with the self-hosting guide, tune reviewers and rules in
lgtm.yml, or join the LGTM Cloud waitlist if you would rather not run it yourself.← PreviousIntroduction
Next →Self-hosting