Documentation

Quick Start

Get ShipSilently running in your application in under 5 minutes, install the SDK, initialize once, evaluate flags anywhere.

1. Install the SDK

Pick your package manager:

npm install @shipsilently/node
bun add @shipsilently/node
yarn add @shipsilently/node
pnpm add @shipsilently/node

Using a different language? Jump straight to the matching SDK guide:

2. Initialize the client

Initialize ShipSilently once at app startup, not on every request. The client caches evaluations in memory and refreshes them in the background.

index.ts
import { ShipSilentlyClient } from 'shipsilently';

export const flags = new ShipSilentlyClient({
  apiKey: process.env.SHIPSILENTLY_KEY!,
});

3. Evaluate a flag

Call evaluate() anywhere in your code. The first call fetches from the edge; subsequent calls return from the local cache in under 1ms.

checkout.ts
import { flags } from './index';

async function renderCheckout(user) {
  const useNewFlow = await flags.evaluate('new-checkout-v2', {
    userId: user.id,
    plan: user.plan,
    country: user.country,
  }, false);

  return useNewFlow
    ? renderNewCheckout(user)
    : renderLegacyCheckout(user);
}
Tip: Context attributes like userId, plan, and country drive targeting rules and percentage rollouts. Pass whatever attributes are relevant for your flags.

Next steps

Ready to ship your first flag?

Open Dashboard