Getting Started
Feature flag utilities for apps using the Flags SDK
@octopus-energy/flags extends the Flags SDK with Edge
Config management, visitor identity helpers, a Pages Router discovery endpoint,
and a CLI for generating typed flag declarations.
Install
npm i @octopus-energy/flags flags| Requirement | Version |
|---|---|
| Node.js | ≥24.0.0 |
| Peer dependency | Version | When |
|---|---|---|
flags | ^4.1.0 | Required |
@next/env | ^16.0.0 | CLI should resolve environment variables from .env* files |
@storyblok/experiments | ^1.2.1 | Using Storyblok CMS experiments middleware |
@vercel/global-config | ^1.5.1 | Using createGlobalConfigAdapter, createSaltRotationHandler, or the global-config CLI command |
next | >=14.2.0 <17.0.0 | Using createPagesRouterFlagsDiscoveryEndpoint |
react | ^19.0.0 | Using the client-side exposure-reporting pipeline (ExperimentsProvider, useExperimentExposure, ExperimentExposureReporter) |
varlock | ^1.9.0 | CLI should resolve environment variables using varlock |
vercel | >=54.0.0 | Generating types for Vercel Flags |
Choose your flag source
If you haven't used the Flags SDK before, start with the
Flags SDK quickstart to learn how
flag(), decide, and FLAGS_SECRET work.
Global Config
Manage flag definitions in a Vercel Global Config item. Control flags via the CLI or programmatically.
Vercel Flags
Manage flag definitions in the Vercel dashboard. Use the Vercel provider adapter.
Guides
Visitor identity
Set up cookie-based or rotating request-based bucketing.
Migrate Blueprint flags
Convert Blueprint definitions to the current Global Config format.
Storyblok experiments
Run Storyblok A/B experiments in Next.js middleware.
Report experiment exposures
Send experiment views through your app's analytics pipeline.
Entry points
Identity
Visitor and user identity helpers for the Flags SDK.
Discovery
Pages Router compatible discovery endpoint for the Flags Explorer.
Global Config
Adapter for reading flags from Vercel Global Config.
Storyblok
Middleware and source helpers for Storyblok experiments.
Reporting
React components and hooks for reporting experiment exposures.