Stop bad commits before they become PR noise.
GitPreflight is the commit-time review gate for agentic teams. 1000x developers do not chase the white rabbit.
Review runs on git commit (or optional pre-push), checks only git diff --cached, and returns stable Markdown with suggestion blocks your agent can apply before you push.
SaaS mode works out of the box. For local-agent mode, run gitpreflight setup local-agent once and GitPreflight stores command config in ~/.config/gitpreflight/config.json.
Tells your agent what to fix before the PR is made.
No more copying LLM feedback back and forth between the PR and your agent.
# npm
npm i -g gitpreflight
# curl
curl -fsSL https://gitpreflight.ai/install | bash
# setup
gitpreflight auth login
gitpreflight install
gitpreflight setup local-agent
# run
gitpreflight review --staged --local-agentProblem
You push code, bots pile onto the PR, and now your agent is stuck reading thread noise instead of fixing code.
- PR review happens after push, when the diff is already public and the context has shifted.
- Agents and bots dump feedback into PR threads, not into the codebase.
- The result is noise: long comment chains, repeated nits, and low-signal review for humans.
- Fix loops get slower: push -> bot feedback -> agent patch -> more feedback -> repeat.
- By the time a human reviews, they are reading the aftermath instead of the intent.
Before vs After
Same agent. Different loop. One creates PR noise, the other ships clean intent.
Before: chase the white rabbit
- Push first, review later.
- Feedback lands in PR comments after context is gone.
- You copy review text into your agent and wait for another patch.
- The PR becomes a debugging transcript.
After: closed loop before push
- Tells your agent what to fix before the PR is made.
- No more copying LLM feedback back and forth between the PR and your agent.
- Commit-time review returns stable Markdown with actionable
suggestionblocks. - Your local loop runs PASS/FAIL/UNCHECKED, and you push only after PASS.
Solution
PR bots review after push. GitPreflight blocks or clears the commit before the PR exists.
- Run review in git hooks at commit time, with optional pre-push mode.
- Review the staged diff only (`git diff --cached`) so the scope stays small.
- Output a stable Markdown report with actionable `suggestion` blocks.
- Use explicit loop semantics: FAIL blocks, UNCHECKED allows with local backlog, PASS is ready to push.
- Close the loop locally: your agent iterates to PASS, then humans review intent instead of cleanup.
How it works
A commit-time protocol for agents that ends at PASS.
- Stage changes.
- Run `git commit`.
- GitPreflight reviews the staged diff and prints stable Markdown with Result: PASS, FAIL, or UNCHECKED.
- If FAIL, your agent applies `suggestion` blocks and retries. If UNCHECKED, commit is allowed but backlog must clear.
- Repeat until PASS, then push a clean PR.
Local-agent setup
Local-agent mode is configured once, then reused on every review run.
- Run
gitpreflight setup local-agent. - Choose your provider:
Codex,Claude, orOpenCode. - GitPreflight probes the selected command by sending
hi are you aliveto stdin. - If probe passes (spawn ok + exit 0 + non-empty output), config is saved.
- Saved files:
~/.config/gitpreflight/config.jsonandconfig.schema.json.
Codex -> codex
Claude -> claude
OpenCode -> opencode runMarkdown contract
Output is stable by design so your agent can parse it, apply suggestions, and rerun.
# GitPreflight Review
Result: PASS
Counts: note=0 minor=0 major=0
## Findings
### path/to/file.ts
#### <short title>
Path: path/to/file.ts
Line: 42
Severity: minor
Agreement: 2/3
<explanation paragraphs>
```suggestion
<replacement code>
```Privacy stance
Short version: GitPreflight avoids storing customer repo source code at rest.
- The server stores instruction file contents (by hash) when configured (e.g. `AGENTS.md`).
- The server stores review outputs and aggregated usage/statistics.
- The server does not store arbitrary repo files.
Pricing
Pick your daily commit budget. Keep commits small, PRs quiet.
- 69 commits/day
- Reviews up to 5 files per commit
- 420 commits/day
- 1337 commits/day
FAQ
Do you store my repo code?
GitPreflight avoids storing customer repo source code at rest. The server stores instruction file contents (by hash) when configured (e.g. `AGENTS.md`), plus review outputs and aggregated usage/statistics. It does not store arbitrary repo files.
What happens if GitPreflight is offline or times out?
The commit is allowed. The commit is marked `UNCHECKED` locally under `.git/gitpreflight/`. The next run on the same branch is blocked until the backlog is cleared or explicitly bypassed.
How do I bypass GitPreflight?
- One-shot bypass: `gitpreflight skip-next --reason "<why>"`
- Universal bypass: `git commit --no-verify`
How do I configure local-agent mode?
Run gitpreflight setup local-agent, pick Codex, Claude, or OpenCode, and let GitPreflight probe the command. On success, config is saved to ~/.config/gitpreflight/config.json.
Is GitHub required?
For now, yes. GitPreflight sign-in uses GitHub.
What does "reviews up to 5 files" mean on LLM Dabbler?
If a commit changes more than 5 files, GitPreflight reviews the first 5 files only (unique staged paths sorted lexicographically). The commit is still allowed, and the report includes a note listing skipped paths plus an upgrade CTA.