Skip to content
v4.2 Plan a rollout from 1% to everyone across days, with automatic pauses when error rates rise. Read the release
Plinth
Start free

Quickstart

Install the SDK, create a flag and check it in your code, in about two minutes.

Install the SDK

npm i @plinth/sdk

Initialise the client

Create one client when your app starts. The server key stays on your server; browsers use the client key.

import { createClient } from '@plinth/sdk';

export const plinth = createClient({
  key: process.env.PLINTH_SERVER_KEY,
});

Check a flag

const on = await plinth.isEnabled('checkout-v2', { user });

if (on) renderNewCheckout();
else renderCheckout();

The second argument is the context: who is asking. Rules match against it, so include the attributes you want to target on, such as plan or country.

Next steps

Stuck? Email support@plinth.example