CLI
oe.flags
Command-line interface for managing flags
The oe.flags CLI provides commands for generating typed declarations and
managing flags stored in Vercel Global Config.
Installation
The CLI ships with the @octopus-energy/flags package:
npx oe.flags --helpGlobal Options
These options apply to all commands:
| Option | Description |
|---|---|
--varlock | Load environment variables via varlock |
--next-env | Load environment variables via @next/env |
-h, --help | Show help |
--version | Show version |
Environment Loading
The CLI needs environment variables (e.g. GLOBAL_CONFIG, VERCEL_API_TOKEN) to
be available at runtime. By default it auto-detects the loader:
- If a
.env.schemafile exists andvarlockis resolvable, it runsvarlock load --format=jsonand merges the output intoprocess.env. - Otherwise, if
@next/envis resolvable, it loads.env*files using the Next.js convention. - If neither is available, it relies on the shell environment.
Use --varlock or --next-env to force a specific loader.
Commands
| Command | Description |
|---|---|
oe.flags generate | Generate typed flags/next declarations |
oe.flags global-config | Manage flags stored in Vercel Global Config |