FeatureGate

CLI Reference

Preview

Use the first-party CLI preview with management automation keys.

The official featuregate CLI is available as an automation-key preview. It calls public Management routes and accepts management automation keys created in the console.

Server runtime keys and browser client keys are not management credentials.

Create a management automation key from organisation settings > Access keys, grant the scopes your workflow needs, and provide the key through an environment variable, stdin, or a local config profile. Human featuregate login is still future scope, so this preview is best suited for CI, scripts, and agent-assisted workflows.

FEATUREGATE_MANAGEMENT_KEY="fg_ak_test_..." featuregate --format json project list

You can also pass keys without storing them in shell history:

printenv FEATUREGATE_MANAGEMENT_KEY | featuregate --management-key-stdin project list

Common commands:

  • featuregate org list
  • featuregate project list
  • featuregate project show <projectId>
  • featuregate env list --project <projectId>
  • featuregate flag list --project <projectId>
  • featuregate flag create --project <projectId> --key <key> --name <name> --lifecycle temporary --intent release
  • featuregate flag set-default --project <projectId> --flag <key> --environment <key> --value true
  • featuregate runtime-key list --project <projectId> --environment <key>
  • featuregate runtime-key create --project <projectId> --environment <key> --name "Production server"
  • featuregate runtime-key revoke --project <projectId> --environment <key> --key <keyId> --yes
  • featuregate --format json audit list --project <projectId>

Use --format json for scripts and agents. Put global options such as --format, --api-url, and --management-key before the command group. Use --yes for destructive commands.

The key must include the scopes required by the command group. For example, project list needs management:projects:read, flag set-default needs management:flags:write, and runtime-key create needs management:runtime-keys:write.