For the complete documentation index, see llms.txt. This page is also available as Markdown.

TypeScript SDK

Build custom integrations with BugBug SDK

BugBug TypeScript SDK is a typed Node.js client for BugBug API. Use it when you want to call BugBug from your own scripts, services, CI/CD tools, internal dashboards, or AI-powered automation.

The SDK wraps BugBug API with TypeScript types, resource modules, request retries, rate limiting, error classes, cancellation support, and helpers for watching test and suite run progress.

Use SDK when you are writing JavaScript or TypeScript code. Use CLI when you want ready-made terminal commands. Use Public API when you need direct HTTP API control from another language.

Requirements

BugBug TypeScript SDK access requires a Business BugBug plan because it uses API access.

You need:

  • Node.js version 24 or newer

  • npm

  • a BugBug account

  • access to the BugBug project you want to manage

  • a BugBug API token

Install via NPM

Install the package in your project:

Get your API token

  1. Go to the Integrations page.

  2. Open the API or CLI tab.

  3. Copy the project API token.

The API token belongs to a project. Treat it as a secret and store it in your environment or secret manager.

Create the SDK client

Import createBugBug and pass your token:

You can also configure the API URL, request timeout, logging, and rate limiting:

Run a test

Run a test and wait until it finishes:

Run a test without waiting:

Override variables for a single run:

Run a suite

Work with runs

After a test or suite is started, you can read run details, stop the run, or download reports.

For suite runs:

Manage BugBug resources

SDK modules are organized around BugBug resources:

Module
What it is used for

tests

List, create, update, delete, import, export, and run tests.

suites

List, inspect, and run suites.

profiles

List profiles and find profiles by name.

project

Read project settings, export project data, and import project ZIP files.

projects

List projects available to the current credentials.

groups

Manage groups and reusable test building blocks.

components

List reusable components and check component usage.

steps

Create, update, inspect, and delete test steps.

stepRuns

Read step run details, including debug data.

variables

Create and update project variables.

visualRegression

Manage visual regression reference screenshots.

projectArtifacts

Upload project artifacts for upload-file steps.

auth

Build OAuth-based authentication flows.

Example:

Handle errors

The SDK exports typed error classes so your integration can react to common failure modes.

Cancel requests

All requests support AbortController.

Technical documentation

The full generated SDK documentation includes exported classes, modules, options, and types:

Open TypeScript SDK technical docs

Last updated

Was this helpful?