Skip to Content
Octopus Energy Packages
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 --help

Global Options

These options apply to all commands:

OptionDescription
--varlockLoad environment variables via varlock
--next-envLoad environment variables via @next/env
-h, --helpShow help
--versionShow 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:

  1. If a .env.schema file exists and varlock is resolvable, it runs varlock load --format=json and merges the output into process.env.
  2. Otherwise, if @next/env is resolvable, it loads .env* files using the Next.js convention.
  3. If neither is available, it relies on the shell environment.

Use --varlock or --next-env to force a specific loader.

Commands

CommandDescription
oe.flags generateGenerate typed flags/next declarations
oe.flags global-configManage flags stored in Vercel Global Config

On this page