TypeScript SDK

Build apps and integrations with the official ForgeDeck TypeScript SDK.

Embed
Preview of the card
<a href="https://docs.forgedeck.net/sdk"><img src="https://docs.forgedeck.net/_api/public/orgs/db9cb8ff-b606-46cf-bbcd-02c8f8a9a3e2/spaces/6f417400-93ca-41a8-a914-df2ae3981dc6/pages/cb4c78de-e907-4061-8bd5-83464dd4e519/social-card.svg?v=3e7ae33eec8b" alt="TypeScript SDK" width="600" height="315"></a>

@forgedeck/sdk is the official, typed client for the REST API. Zero dependencies, works anywhere fetch exists (Node 18+, Deno, browsers).

GitHub: github.com/alphajew420/forgedeck-sdk

Install

npm install @forgedeck/sdk
# not on npm yet? install straight from GitHub:
npm install github:alphajew420/forgedeck-sdk

Quick start

import { ForgeClient } from "@forgedeck/sdk";

const forge = new ForgeClient({
  baseUrl: "http://127.0.0.1:47379/api", // Settings → API → Base
  token: "paste-your-token-here"          // Settings → API → Token
});

// Read
const projects = await forge.listProjects();
const tasks = await forge.listTasks(projects[0].id);

// Write (requires "Allow writes")
const task = await forge.createTask(projects[0].id, { title: "Ship the SDK" });
await forge.setTaskStatus(task.id, "Running");

// Drive a running agent the way a human would
const [pane] = await forge.listTerminals();
const snap = await forge.readTerminal(pane.id);
if (snap.agentStatus === "waiting") {
  await forge.sendInput(pane.id, "yes, proceed"); // free-text prompts
  await forge.pressKey(pane.id, "enter");         // menus / confirmations
}

Methods

health, listProjects, listRooms, listTasks, createTask, setTaskStatus, listTerminals, readTerminal, terminalStatus, sendInput, pressKey, createTerminal, searchMemory, gitStatus.

Errors throw a ForgeApiError carrying .status and the server's .body.

Build an app

Two ways to extend ForgeDeck — use the SDK for external integrations and orchestrators, or ship an in-app plugin. Many apps do both.

Updated