Postil is a quiet AI code review gate. It reports merge-relevant bugs, security issues, breaking changes, concurrency hazards, and explicit policy violations. Clean changes produce no review comment.
One binary reviews local changes, pull requests, and merge requests. It supports OpenAI-compatible model endpoints and the native Anthropic Messages API.
curl -fsSL https://postil.dev/install.sh | shThe installer verifies the release checksum and, when cosign is available, its Sigstore signature. Pass --require-cosign to refuse checksum-only installation. You can also build from source:
cargo install --git https://github.com/postil-dev/postil-cli --lockedRelease binaries cover Linux x86_64 and ARM64 with glibc or musl, plus macOS on Intel and Apple Silicon.
export MODEL_API_KEY=... # OpenRouter is the default endpoint
export REVIEW_MODEL=provider/qualified-model
postil doctor # validate the endpoint and repository
postil review --staged # review the staged change
postil review --base origin/main # review the branch
postil review --bounded --base origin/main # cap large reviews at five source batches
postil hook install # add a pre-push reviewpostil review exits 0 when the gate passes, 1 when it fails, and 2 when it cannot produce a review envelope.
export GITHUB_TOKEN=...
postil review --repo owner/repository --pr 123 --publish--publish is required for any forge write. Without it, the CLI fetches the pull request and reports locally. Published runs create inline findings and separate postil/review and postil/gate checks. Mark only postil/gate as required in branch protection.
For GitHub Actions, use postil-action. Hosted GitHub reviews are available at postil.dev/install.
postil init writes .postil.yaml. Flags override environment variables, which override repository configuration and defaults.
ignore:
- "**/dist/**"
severityThreshold: info
minConfidence: 0.6
maxFindings: 20
reviewer:
tone: "direct, specific, no praise, no filler"
focus: [security, concurrency]
gate:
failOn: error
onError: blockUnknown keys are rejected. Repository configuration cannot redirect a deployment credential to another API host unless the operator explicitly permits that behavior. The CLI has no implicit model roster. Review and scorer models must be selected explicitly from models qualified by the benchmark.
| Guide | Covers |
|---|---|
| Configuration | Policy, precedence, model selection, and environment variables |
| Model providers | OpenAI-compatible, Anthropic, and local endpoints |
| Code forges | GitHub, GitLab, Bitbucket, and Azure DevOps |
| Automation | SARIF, incremental review, envelopes, planning, and interactive replies |
| Architecture | Trust boundaries and review pipeline |
| Benchmarks | Model evaluation harness |
The rendered product documentation is at postil.dev/docs.
Apache-2.0.