TypeScript SDK
Build apps and integrations with the official ForgeDeck TypeScript SDK.
@forgedeck/sdk is the official, typed client for the REST API. Zero dependencies, works anywhere fetch exists (Node 18+, Deno, browsers).
Install
npm install @forgedeck/sdk
# not on npm yet? install straight from GitHub:
npm install github:alphajew420/forgedeck-sdkQuick 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