Forges
Postil is one review engine behind a Forge trait: fetch the diff, post inline comments, complete two check-runs, reply to a mention. Four code hosts implement it (GitHub, GitLab, Bitbucket, and Azure DevOps), each covering its self-managed or server variant through a base-URL environment variable. Pick a forge with --forge; it defaults to github when --repo is set.
GitHub
github.com and GHES. Issues and PRs. The only forge the hosted app talks to today.
GitLab
gitlab.com and self-managed. Issues and merge requests, run from your own CI.
Bitbucket
Cloud and Data Center. Pull requests only, no issue tracker support.
Azure DevOps
Services and Server. Pull requests only, no work item support.
Auth and endpoint, per forge
| Forge | Token | Self-managed / server base URL |
|---|---|---|
| GitHub | GITHUB_TOKEN | GITHUB_API_URL (GitHub Enterprise Server) |
| GitLab | GITLAB_TOKEN | GITLAB_API_URL (GitLab Self-Managed) |
| Bitbucket | BITBUCKET_TOKEN (set BITBUCKET_USER too to use an app password) | BITBUCKET_API_URL (Bitbucket Data Center) |
| Azure DevOps | AZURE_DEVOPS_TOKEN (a PAT) | AZURE_DEVOPS_API_URL (Azure DevOps Server) |
Every forge also needs an inference key: MODEL_API_KEY for any OpenAI-compatible endpoint. See the CLI reference for the full environment variable list.
What each forge supports
Every forge gets the full postil review engine: the same findings, the same gate semantics, the same envelope, the same exit codes. What differs is thread coverage for postil respond (the interactive @postil bot) and whether the hosted app reaches the forge at all.
| Forge | postil review | postil respond threads | Hosted app |
|---|---|---|---|
| GitHub | Pull requests | Issues and pull requests | Yes |
| GitLab | Merge requests | Issues and merge requests | CLI in your own CI only |
| Bitbucket | Pull requests | Pull requests only | CLI in your own CI only |
| Azure DevOps | Pull requests | Pull requests only | CLI in your own CI only |
Stated plainly: GitHub and GitLab cover issues and PRs/MRs for the interactive bot; Bitbucket and Azure DevOps cover pull requests only. Their issue tracker and work-item APIs use a different shape Postil does not talk to yet. The hosted app at postil.dev is GitHub-only today; every other forge runs the same binary in your own CI with your own inference key, which is why the CLI ships forge support independent of hosted rollout.
Gitea and Forgejo are not supported. The forge abstraction would cover them the same way, but no implementation exists yet.
One command per forge
# GitHub (default when --repo is set)
postil review --repo owner/name --pr 123
# GitLab (gitlab.com or self-managed)
export MODEL_API_KEY=...
export POSTIL_API_KEY="$MODEL_API_KEY"
export GITLAB_TOKEN=... GITLAB_API_URL=https://gitlab.example.com/api/v4
postil review --forge gitlab --repo group/project --pr 42
# Bitbucket (Cloud, or Data Center via BITBUCKET_API_URL)
export MODEL_API_KEY=...
export POSTIL_API_KEY="$MODEL_API_KEY"
export BITBUCKET_TOKEN=... # set BITBUCKET_USER too for an app password
postil review --forge bitbucket --repo workspace/repo --pr 7
# Azure DevOps Services (or Server via AZURE_DEVOPS_API_URL)
export MODEL_API_KEY=...
export POSTIL_API_KEY="$MODEL_API_KEY"
export AZURE_DEVOPS_TOKEN=... # a PAT
postil review --forge azure --repo organization/project/repository --pr 7Same gate thresholds, envelope schema, and exit codes everywhere; see the CLI reference and exit codes.