Why not an env var
Env vars are fixed when a container is created, so changing one needs a redeploy or restart. A feature flag is read at runtime: your app calls the control plane’s HTTP API for the current value. It authenticates with an ordinary API token, so there is no separate auth system to set up.How flags behave
- Scope: a flag belongs to one app, and the dashboard and CLI manage it per app. Its
key, the string your app looks up, is unique across the whole control plane, not just within the app. The evaluate endpoint is flat (/api/v1/flags/evaluate/{key}, no app in the path) because API tokens are not scoped to an app. - Kill switch:
enabled: falseturns the flag off for every caller. - Rollout: when
enabledis true,rollout_percentage(0 to 100) decides which callers get it. Callers are bucketed by a consistent hash (FNV-1a) of theidentifierquery parameter, so the same identifier always lands on the same side of a partial rollout. Pass a stable per-user or per-device value. Callers that send no identifier all share one outcome.
Set up a flag
1
Create the flag
In the dashboard, open an app’s Feature flags tab. From the CLI:
--rollout defaults to 100 and the flag starts enabled unless you pass --disabled.2
Create a read-only token for your app
FLAGS_TOKEN ({ secret: true } in app.yaml).3
Call the evaluate endpoint from your app
4
Change it live
Flip the switch or move the rollout slider in the dashboard, or use
flags set. The next evaluate call reflects it.CLI
flags set replaces the flag’s settings. It requires --name, and any option you leave out returns to its default (enabled, rollout 100, empty description). To change only the rollout, repeat the others:
API reference
The evaluate response is only
key and enabled, because apps may call it on every request.
Not supported
Rollout is a flat percentage by identifier, so you cannot target by user attribute such as plan. There is also no flag-specific history view: create, update and delete show up in the generic audit log (GET /api/v1/audit-log).
Next steps
Identity and access
Creating read-only tokens.
Deploying apps
Injecting a token as a secret env var.