Statsig SDK
Install, authenticate, and manage Statsig resources with Effect-native Console API operations.
Public package OpenAPI 3 312 operationsThe Statsig SDK pins the official 20240601 Console API contract and generates the complete administrative surface through the shared OpenAPI path.
Install
npm install @kevinmichaelchen/distilled-statsig effectpnpm add @kevinmichaelchen/distilled-statsig effectbun add @kevinmichaelchen/distilled-statsig effectAuthentication
Set STATSIG_API_KEY. The client sends it as STATSIG-API-KEY and pins the matching STATSIG-API-VERSION header.
Quickstart
List active temporary feature gates:
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
import * as FetchHttpClient from "effect/unstable/http/FetchHttpClient";
import {
CredentialsFromEnv,
gatesListGates,
} from "@kevinmichaelchen/distilled-statsig";
const StatsigLive = Layer.mergeAll(FetchHttpClient.layer, CredentialsFromEnv);
const program = gatesListGates({
type: "TEMPORARY",
includeArchived: "false",
limit: 100,
});
const gates = await Effect.runPromise(Effect.provide(program, StatsigLive));
Source and package
npm package
Public package, generated source, declarations, and release history.
Implementation (private)
Provider policy and 312 committed Effect operations.
Specification (private)
Immutable mirror of Statsig’s versioned Console API contract.
Statsig omits operationId throughout the source. Distilled derives stable lower camelCase names from tags and summaries and rejects collisions at the shared generator boundary.