Skip to main content
DemoForge
Production·api-gateway v2.4.1

CLI & SDK

Install the SDK, explore code examples, and use the CLI.

Installation

npmnpm install @forge/sdk
pnpmpnpm add @forge/sdk
yarnyarn add @forge/sdk

CLI Quick Reference

forge init my-projectScaffold a new project
forge deployDeploy to production
forge logs --followStream real-time logs
forge keys create --scope read,writeCreate an API key
forge webhooks listList webhook endpoints
forge statusCheck platform status

Your API key

FORGE_API_KEY=fk_live_a3f8b2c1

Set as an environment variable. Never commit to source control.

SDK Examples

import { Forge } from "@forge/sdk";

const forge = new Forge({
  apiKey: "fk_live_a3f8b2c1",
});

// Create a webhook endpoint
const webhook = await forge.webhooks.create({
  url: "https://example.com/hook",
  events: ["user.created", "invoice.paid"],
});

logger.info(webhook.id); // whk_a1b2c3
DemoUI kit preview — content is fictional.