Skip to main content

Integrate your first flag

Create an app and environment in the Superflag dashboard, then copy the key for the runtime you are integrating. Use a public pub_ key for React, React Native, and Expo. Use a secret sdk_ key for server code. Create the example flag before running the application. The fixed production environment slug is prod:
For the Node example, keep the flag server-only. For React or Expo, opt into client delivery explicitly:
--client is a delivery decision, not a security label added automatically by an SDK. Client flags and every advanced dependency must be safe to ship to an untrusted browser or device.
Create the client once at module scope. See Node usage for serverless, edge, targeting, caching, and failure behavior.

Verify from the CLI

After each false write, confirm the application takes its classic path. Expo and React Native receive this JavaScript/config change without requiring a new native build. For automation, start with superflag contract --json, use explicit --app and --env selectors, and prefer validate/plan/dry-run/apply workflows before a mutation.

Understand keys and visibility

Choose the right credential and keep private targeting rules off clients.

Agent workflows

Build deterministic feature-flag workflows for coding agents and CI.