The @shoal/sdk package has no runtime dependencies and ships ESM and CommonJS builds with type definitions.
Terminal
npm install @shoal/sdkTerminal
pnpm add @shoal/sdkTerminal
yarn add @shoal/sdkTerminal
bun add @shoal/sdkSupported runtimes
| Runtime | Minimum version | Notes |
|---|---|---|
| Node.js | 18 | Uses the built-in fetch |
| Bun | 1.0 | |
| Deno | 1.40 | Import from npm:@shoal/sdk |
| Browsers | Last 2 versions | Use a client key |
| Edge (Cloudflare, Vercel, Netlify) | — | Streaming falls back to polling |
Framework packages
Thin wrappers add idiomatic helpers on top of the core SDK. Install the one for your framework instead of — not in addition to — the core package when you only need it there.
Terminal
npm install @shoal/reactTerminal
pnpm add @shoal/reactTerminal
yarn add @shoal/reactTerminal
bun add @shoal/reactApp.tsx
import { ShoalProvider, useFlag } from "@shoal/react";
function Banner() {
const on = useFlag("summer-banner");
return on ? <p>Summer sale — 20% off</p> : null;
}Terminal
npm install @shoal/nextTerminal
pnpm add @shoal/nextTerminal
yarn add @shoal/nextTerminal
bun add @shoal/nextRead the full Next.js guide for server components and middleware.
Terminal
npm install @shoal/vueTerminal
pnpm add @shoal/vueTerminal
yarn add @shoal/vueTerminal
bun add @shoal/vuemain.ts
import { shoal } from "@shoal/vue";
app.use(shoal, { key: import.meta.env.VITE_SHOAL_CLIENT_KEY });Generate flag types
The CLI reads your project and writes a type file so flag keys are checked at compile time.
Terminal
npm install -D @shoal/cliTerminal
pnpm add -D @shoal/cliTerminal
yarn add -D @shoal/cliTerminal
bun add -d @shoal/cliTerminal
npx shoal generate --out src/shoal.d.tsTypeScript
shoal.isOn("new-chekout");
// ^ Argument of type '"new-chekout"' is not assignable to parameter of type FlagKey