Skip to content

Quick Start

Get feature flags working in your app in under 5 minutes.

Prerequisites

  1. Install the SDK

    bash npm install @featsync/sdk
  2. Get your API key

    1. Log in to the Featsync dashboard
    2. Go to API Keys in the sidebar
    3. Copy your Production API key (starts with fs_)
  3. Initialize the SDK

    import { Featsync } from '@featsync/sdk';
    const featsync = new Featsync({
    apiKey: 'fs_your_api_key',
    });
  4. Create a flag

    1. In the dashboard, go to Flags
    2. Click Create Flag
    3. Name it new-feature and click Create
  5. Use the flag in your code

    if (await featsync.isEnabled('new-feature')) {
    // Show new feature
    showNewFeature();
    } else {
    // Show old behavior
    showOldFeature();
    }
  6. Toggle it!

    Go back to the dashboard, find your flag, and toggle it on. Your feature is now live!

That’s it!

You now have feature flags working in your app. Here’s what you can do next: