BT

Installation

Add @bodytracker/sdk to your project using your package manager of choice, or load it directly from a CDN.

Package managers

The core SDK ships as a single package with no runtime dependencies. Install it with npm, yarn, pnpm, or bun — or import it straight from a CDN with no build step at all.

Shell
npm install @bodytracker/sdk

React bindings

Building with React? Install @bodytracker/react alongside the core SDK for hooks and components that manage the tracker lifecycle for you.

Shell
npm install @bodytracker/react

Requirements

Node.js 18+ for your build tooling, and a modern browser (the latest two versions of Chrome, Edge, Safari, or Firefox) with camera access for tracking at runtime. See Getting Started for the full list.

Verify your installation

Once installed, import the SDK and log its version to confirm everything resolved correctly:

verify.tsTypeScript
import { BodyTracker, VERSION } from "@bodytracker/sdk"; console.log(`@bodytracker/sdk v${VERSION}`); const tracker = new BodyTracker({ apiKey: "bt_test_3Lw8p...redacted" });console.log(tracker.getStatus()); // "idle"

Version history

VersionStatusHighlights
3.4.0CurrentAdds pauseSession/resumeSession and the qualityChanged event.
3.3.0PriorIntroduces exportSession with JSON, CSV, and PDF output.
3.2.0PriorAdds configurable smoothing and locale support.
3.0.0PriorRewrites the event system around on()/off() with unsubscribe functions.