One client, every forge.
forges is a TypeScript library for working with issues, pull requests, notifications, checks and webhooks on ten forges: GitHub, GitLab, Bitbucket, Forgejo, Gitea, Gitee, Azure DevOps, Cursor Origin, Tangled and Pushin.eu. A forge is a service that hosts Git repositories and the collaboration around them. It also reads repositories and their contents from Git hosts without the collaboration, such as Cloudflare Artifacts. Each provider normalises the forge's responses into one data model and declares which operations it supports.
Read the documentation at forges.link.
pnpm add forgesforges requires Node.js 22.18 or later.
import { createForges, forgejo, github } from 'forges'
const forges = createForges([
github({ auth: { type: 'token', token: process.env.GITHUB_TOKEN! } }),
forgejo({ baseUrl: 'https://codeberg.org', auth: { type: 'token', token: process.env.CODEBERG_TOKEN! } }),
])
for await (const notification of forges.notifications.list()) {
console.log(notification.ref.forge, notification.title)
}The example above lists the notifications of two forges in a single loop. To go further, the quick start walks you through reading a thread, writing a comment and checking what a forge supports.
- Getting started covers installation, import paths and a first call.
- The guides explain authentication, working with several forges, environment variables, webhooks, capabilities, errors, pagination, browser bundles and testing.
- The concepts describe the data model, capabilities, providers and events.
- Each provider page explains how to authenticate and how that forge behaves.
- The reference lists the API, the capability matrix, errors and JSON schemas.
- The examples are small, tested projects that use
forges.
@agntn/forges: a TypeScript API for GitHub, GitLab, Gitea, Forgejo and GitBucket, with an MCP server and Pi and OMP extensions for agents.git-pkgs/forge: a Go library and CLI for GitHub, GitLab, Gitea, Forgejo, Bitbucket Cloud, Gerrit and Tangled.
Contributions are welcome. The contribution guide explains how to set up the repository and run the checks.
Made with ❤️
Published under the MIT licence.