TypeScript SDK quickstart

Last updated: 2026-06-06
1 min read

TypeScript SDK Quickstart

Build with TaskForceAI using TypeScript.

Installation

    bun add taskforceai-sdk

Setup

import { TaskForceAI } from 'taskforceai-sdk';

const client = new TaskForceAI({
  apiKey: process.env.TASKFORCEAI_API_KEY,
});

Basic Usage

const result = await client.runTask('Analyze this repository');
console.log(result.result);

Streaming

const stream = client.runTaskStream('Map the risks in this codebase');

for await (const status of stream) {
  console.log(`${status.status}: ${status.result ?? '...'}`);
}

Mock Mode

Use mock mode when building local integrations without an API key:

const client = new TaskForceAI({ mockMode: true });
const result = await client.runTask('Test your integration');

Next Steps

See the full documentation for the canonical SDK reference.

Still need help?

Our support team is available to assist you.

Contact Support