Postil

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.

Auth and endpoint, per forge

ForgeTokenSelf-managed / server base URL
GitHubGITHUB_TOKENGITHUB_API_URL (GitHub Enterprise Server)
GitLabGITLAB_TOKENGITLAB_API_URL (GitLab Self-Managed)
BitbucketBITBUCKET_TOKEN (set BITBUCKET_USER too to use an app password)BITBUCKET_API_URL (Bitbucket Data Center)
Azure DevOpsAZURE_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.

Forgepostil reviewpostil respond threadsHosted app
GitHubPull requestsIssues and pull requestsYes
GitLabMerge requestsIssues and merge requestsCLI in your own CI only
BitbucketPull requestsPull requests onlyCLI in your own CI only
Azure DevOpsPull requestsPull requests onlyCLI 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 7

Same gate thresholds, envelope schema, and exit codes everywhere; see the CLI reference and exit codes.