Getting started
Installation
Add forges to your project.
Install the package from npm:
pnpm add forges
npm install forges
yarn add forges
bun add forges
forges requires Node.js 22.18 or later. The package is ESM only and ships its own types. It has no runtime dependencies and uses the global fetch. To use another implementation, pass a fetch option to a provider.
Import paths
The root entry exports every provider and the shared helpers:
import { createForges, github } from 'forges'
Each provider also has its own subpath. A bundle that imports one subpath contains one forge:
import { github } from 'forges/github'
| Subpath | Contents |
|---|---|
forges/github, forges/gitlab and so on | One provider. See Providers |
forges/env | Configure providers from the environment |
forges/fake | An in-memory forge for tests |
forges/testing | Fixture replay and webhook signing for tests |
forges/schema | JSON Schemas for the model types |
Browsers
Every provider except pushin.eu has a Lite factory, such as githubLite(), that leaves out webhook code. Use it in browser code. Read Browser bundles for sizes and details.