one client, every forge
A unified interface for issues, pull requests, notifications, checks and webhooks across 16 forgesA service that hosts Git repositories and the collaboration around them: issues, pull requests, reviews and CI. GitHub, GitLab and Codeberg are forges..
import { createForges, github, gitlab } from 'forges'
const forges = createForges([
github({ auth: { type: 'token', token: process.env.GITHUB_TOKEN! } }),
gitlab({ auth: { type: 'token', token: process.env.GITLAB_TOKEN! } }),
])
for await (const notification of forges.notifications.list()) {
console.log(notification.ref.forge, notification.title)
}features
You write your code against one model, and forges takes care of the endpoints, pagination, authentication and rate limits of each forge.
one data model
Issues, pull requests, comments, checks and events have the same shape on every forge, and the original payload is still there in the raw field when you need it.
declared capabilities
Every provider declares what its forge supports, and we check those claims against the tests on every commit to forges. Ask provider.can() before you call an operation.
verified webhooks
The provider verifies each delivery for you and turns it into typed events, with the same kinds and actions on every forge.
small bundles
Bundles keep only the forges you import, and the code that translates webhook deliveries loads only when you ingest one. The GitHub provider is about 42 kB gzipped.
see what each forge can do
Every provider declares what its forge supports, so your code can check before it makes a call.
| Capability | GitHub | GitLab | Bitbucket | Forgejo | Gitea | Gitee | Azure DevOps | Cursor Origin | Pushin.eu | Tangled | Cloudflare Artifacts | Sourcehut | Entire | GitBucket | GitCafe | Upstream |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| threads.merge | Native | Native | Native | Native | Native | Native | Native | Experimental | Not applicable | Native | Not available | Not available | Native | Native | Unverified | Native |
| notifications.list | Native | Native | Not applicable | Native | Native | Native | Not available | Not applicable | Native | Experimental | Not available | Not available | Not available | Not available | Not applicable | Native |
| checks.list | Native | Native | Native | Native | Native | Native | Native | Experimental | Not available | Not applicable | Not available | Not available | Not available | Native | Native | Native |
| ci.runs | Native | Native | Not available | Native | Native | Not available | Not available | Not available | Not available | Not available | Not available | Emulated | Not available | Not applicable | Native | Native |
| releases.list | Native | Native | Not applicable | Native | Native | Native | Not available | Not applicable | Native | Not applicable | Not available | Emulated | Not applicable | Native | Not applicable | Native |
| webhooks.create | Native | Native | Native | Native | Native | Unverified | Not available | Not available | Not applicable | Unverified | Not available | Not available | Not available | Native | Unverified | Native |
| search.threads | Native | Native | Native | Native | Native | Native | Native | Not available | Not available | Native | Not available | Not available | Not available | Not available | Not available | Native |
- Native and verified
- Experimental
- Emulated
- Unverified
- Not applicable
- Not available
what you can build
Explore the examples and guides to get started on your next project.
make your first call
Install the package, read an issue and add a second forge.