SDKs
SDK overview
Choose the right @flagfix package and point it at the FlagFix API.
Last updated on

FlagFix ships client libraries. They talk to the FlagFix API, not to the dashboard session.
Your app (browser / Node / React)
│ X-FlagFix-Sdk-Key
▼
https://api.flagfix.io
├── /api/v1/runtime/* flags
└── /api/v1/ingest/* eventsWhich package should I install?
| Package | Use when | Key type |
|---|---|---|
@flagfix/browser | SPA, vanilla JS, or any browser bundle | Client SDK key |
@flagfix/node | APIs, workers, SSR helpers | Server SDK key |
@flagfix/react | React 18+ UI (provider + hooks) | Client key (wraps browser) |
@flagfix/react depends on @flagfix/browser. Do not import @flagfix/sdk-core in your application. It is installed for you.
Quick start
- Install the package for your runtime
- Create a key in the FlagFix dashboard (Client or Server)
- Set
apiHosttohttps://api.flagfix.io, or to the API host your company uses - Call
start(), thenidentify/hasFeature/track
import { createFlagFix } from "@flagfix/browser";
const client = createFlagFix({
clientKey: process.env.NEXT_PUBLIC_FLAGFIX_CLIENT_KEY!,
apiHost: "https://api.flagfix.io",
});
await client.start();
client.identify("user_123", { plan: "pro" });
if (client.hasFeature("new_checkout")) {
client.trackExposure("new_checkout");
}Next
SDK package version 0.1.0 and runtime contract 1.0.0 are different numbers. Do not treat them as a single “platform version”.
Was this page useful?