oe.flags global-config
Create, update, list, inspect, delete, and migrate flags in Global Config
The oe.flags global-config commands manage flag definitions stored in a Vercel
Global Config item.
Requirements
Install @vercel/global-config in the project where you run the CLI. All commands
require a connection string in GLOBAL_CONFIG or EDGE_CONFIG; GLOBAL_CONFIG
takes precedence when both are set. Write operations additionally require
VERCEL_API_TOKEN.
list, inspect, create, update, and delete use the item named by
OE_FLAGS_GLOBAL_CONFIG_KEY, falling back to flags when the environment
variable is unset. An explicit --key takes precedence.
Commands
list
List all flags in the Global Config item:
npm exec oe.flags global-config list| Option | Description |
|---|---|
-k, --key | Global Config item key (default: environment variable or flags) |
--json | Output as JSON |
inspect
Display detailed information about a single flag:
npm exec oe.flags global-config inspect theme| Option | Description |
|---|---|
-k, --key | Global Config item key (default: environment variable or flags) |
--json | Output as JSON |
create
Run create without arguments to define a flag through guided prompts:
npm exec oe.flags global-config createThe prompts collect the name, description, value type, variants, default variant, and optional activation periods. Dates and 24-hour times are entered in the system's local timezone and stored as UTC ISO 8601 datetimes. The completed flag is shown for confirmation before it is written.
Pass --interactive or -i to seed the prompts with command-line values:
npm exec oe.flags global-config create theme --kind string --default-variant light --variant "light:Light=light" --variant "dark:Dark=dark" --description "UI theme" -iFor non-interactive use, provide a name, kind, and default variant:
npm exec oe.flags global-config create new-dashboard --kind boolean --default-variant off --variant on=true --variant off=false| Option | Description |
|---|---|
--kind <type> | Value type: boolean, string, number, json (required without -i) |
--default-variant <key> | Key of the default variant (required without -i) |
--variant <key[:[label]]=value> | Variant definition (repeatable) |
--activation <variant:start[::end]> | Activation period (repeatable) |
--description <text> | Human-readable description |
-i, --interactive | Prompt for and review the flag definition |
-k, --key <name> | Global Config item key (default: environment variable or flags) |
Interactive creation requires interactive input and output terminals. In CI or
piped environments, provide all required values without -i.
update
Run update without arguments to select a flag, or provide only its name to open
the interactive editor directly:
npm exec oe.flags global-config update
npm exec oe.flags global-config update themeThe editor can change the description and default variant; add, edit, rename, or remove variants; and manage activation periods. Renaming a variant updates its default and activation references. Removing a referenced variant shows the consequences and requires confirmation.
Pass --interactive or -i to apply command-line options to an initial draft
before reviewing and amending it:
npm exec oe.flags global-config update theme --description "Updated theme controls" -iBefore writing, the CLI compares the original and proposed definitions. Declining the save confirmation returns to the editor. The command reads the flag again before writing and stops if it changed during editing.
For non-interactive use, provide a name and at least one mutation option:
npm exec oe.flags global-config update theme --default-variant dark| Option | Description |
|---|---|
--default-variant <key> | New default variant key |
--variant <key[:[label]]=value> | New variant definitions (repeatable, replaces all variants) |
--activation <variant:start[::end]> | Add activation period (repeatable, appended to existing) |
--clear-activations | Remove all activation periods |
--description <text> | New description; an empty value removes it |
-i, --interactive | Review and edit changes interactively |
-k, --key <name> | Global Config item key (default: environment variable or flags) |
The value type (kind) is inferred from the existing flag definition. Interactive
updates require interactive input and output terminals. In CI or piped
environments, provide a name and mutation options without -i.
migrate
Migrate flags from @krakentech/blueprint-utils/feature-flags to
@octopus-energy/flags:
npm exec oe.flags global-config migrateThe command reads from flags and writes to oe-flags by default. It shows each
proposed flag for approval, editing, or omission. The source item is not changed.
| Option | Description |
|---|---|
--from <key> | Source Global Config item key (default: flags) |
--to <key> | Destination Global Config item key (default: oe-flags) |
-y, --yes | Accept valid, non-conflicting migrations without review |
Existing destination flags are preserved. During interactive review, conflicting
incoming flags can be renamed or omitted. With --yes, invalid and conflicting
flags are skipped. The command checks the destination again before writing and
stops if it changed during the migration.
See Migrate Blueprint flags for the schema conversion rules and a complete migration workflow.
delete
Delete a flag (requires confirmation):
npm exec oe.flags global-config delete new-dashboard --yes| Option | Description |
|---|---|
-y, --yes | Skip confirmation prompt |
-k, --key | Global Config item key (default: environment variable or flags) |
Variant syntax
The --variant flag accepts two formats:
| Format | Example | Result |
|---|---|---|
key=value | on=true | Variant on with value true |
key:label=value | "light:Light=light" | Variant light, label "Light", value light |
Activation syntax
The --activation flag accepts variant:startDate[::endDate]. Dates can be
provided in three formats:
| Format | Example | Interpretation |
|---|---|---|
| Date only | 2026-07-01 | Local midnight, converted to UTC |
| Local datetime | 2026-07-01T09:00:00 | Local time, converted to UTC |
| UTC datetime | 2026-07-01T00:00:00Z | Explicit UTC, stored as-is |
Omitting the end date creates an open-ended activation (active from the start date onward indefinitely). When provided, the end date must be strictly later than the start date and is exclusive.
Overlapping activation periods are rejected with a validation error. Adjacent activations may share an end/start boundary.
Help
Run command-specific help for full option details:
npm exec oe.flags global-config --help
npm exec oe.flags global-config create --help
npm exec oe.flags global-config migrate --help