CLI Commands

Complete reference for every command available in the Flagify CLI.

flagify login

Authenticate via the browser. Opens the Flagify console where you log in and click Authorize. Tokens are stored in ~/.flagify/config.json.

flagify login
Opening browser to authorize...
✓ Logged in as Jane Doe ([email protected])

If you are not already logged into the console, you will be redirected to the login page first and then back to the authorization screen.

flagify logout

Remove stored credentials.

flagify logout

flagify flags list

List all flags in a project.

flagify flags list --project <project-id>
KEY                NAME               TYPE       ENVIRONMENTS
checkout-redesign  Checkout Redesign  boolean    dev:on, staging:off, prod:off
beta-dashboard     Beta Dashboard     boolean    dev:on, staging:on, prod:off
OptionAliasRequiredDescription
--project-pYesProject ID

flagify flags create

Create a new feature flag. The flag is automatically provisioned across all environments in the project.

flagify flags create my-flag --project <project-id> --type boolean
Created flag "my-flag" (boolean) with 3 environments
OptionAliasRequiredDefaultDescription
--project-pYesProject ID
--type-tNobooleanFlag type: boolean, string, number, json
--descriptionNoHuman-readable description

flagify flags toggle

Toggle a flag on or off. Flips the current state in a specific environment, or in all environments with --all. If no flag key is provided, an interactive picker lets you select from existing flags.

flagify flags toggle checkout-redesign --project <project-id> --environment staging

Run without a key to pick interactively:

flagify flags toggle --project <project-id>
✓ Flag checkout-redesign is now ON in staging

Toggle in all environments at once:

flagify flags toggle dark-mode --project <project-id> --all
✓ Flag dark-mode is now OFF in development
✓ Flag dark-mode is now OFF in staging
✓ Flag dark-mode is now OFF in production
OptionAliasRequiredDefaultDescription
--project-pYesProject ID
--environment-eNodevelopmentTarget environment
--all-aNoToggle in all environments at once

flagify workspaces list

List all workspaces you belong to.

flagify workspaces list
ID                          NAME        SLUG          PLAN
01J5K8RQXHNZ4VMKD3GY7PSABET  Acme Corp   acme-corp     pro
01J5K9FWQM3TR8JXNE2PV7CDLHW  Side Proj   side-project  free

flagify workspaces pick

Interactively select a default workspace. The selection is saved to ~/.flagify/config.json so you don’t need to pass --workspace on every command.

flagify workspaces pick
? Select a workspace
> Acme Corp (acme-corp)
  Side Proj (side-project)

✓ Workspace set to Acme Corp

flagify projects list

List all projects in a workspace.

flagify projects list --workspace <workspace-id>
ID                          NAME         SLUG
01J5KBC3XPQR7WFMN4HY6TDASEV  Web App      web-app
01J5KBD9ZMSV2JXLR8GT5NFHQAW  Mobile App   mobile-app
OptionAliasRequiredDescription
--workspace-wFalls back to config defaultWorkspace ID

flagify projects pick

Interactively select a default project. The selection is saved to ~/.flagify/config.json.

flagify projects pick
? Select a project
> Web App (web-app)
  Mobile App (mobile-app)

✓ Project set to Web App

If no workspace is saved, the CLI will prompt you to pick one first.

flagify environments pick

Interactively select a default environment. The selection is saved to ~/.flagify/config.json.

flagify environments pick
? Select an environment
> Development (development)
  Staging (staging)
  Production (production)

✓ Environment set to Development

If no project is saved, the CLI will prompt you to pick workspace and project first.

flagify projects get

Show project details including environments.

flagify projects get <project-id>
ID:        01J5KBC3XPQR7WFMN4HY6TDASEV
Name:      Web App
Slug:      web-app

Environments:
  ID                          KEY          NAME
  01J5KBF7YNPT4QJRK2DX8MHGWCV  development  Development
  01J5KBG2ZMRW5HXLN3FY9PKJTDS  staging      Staging
  01J5KBH8XKQS6DVMR4GZ7NFCWET  production   Production

flagify keys generate

Generate an API key pair (publishable + secret) for an environment. These keys are required for SDK integration (@flagify/node, @flagify/react).

flagify keys generate --project <project-id> --environment development
✓ Generated API keys for development

  Publishable:  pk_dev_abc123_xxxxxxxx
  Secret:       sk_dev_abc123_xxxxxxxx

⚠ Save these keys now — the secret key won't be shown again.
OptionAliasRequiredDescription
--project-pYesProject ID
--environment-eYesTarget environment

flagify keys list

List all API keys for an environment, showing prefix, type, creation date, and status.

flagify keys list --project <project-id> --environment development
PREFIX            TYPE          CREATED            STATUS
pk_dev_abc123     publishable   2026-03-29 10:00   active
sk_dev_abc123     secret        2026-03-29 10:00   active
OptionAliasRequiredDescription
--project-pYesProject ID
--environment-eYesTarget environment

flagify keys revoke

Revoke all active API keys for an environment. This immediately invalidates all keys — SDKs using these keys will stop receiving flag updates.

flagify keys revoke --project <project-id> --environment staging
✓ Revoked all API keys for staging
OptionAliasRequiredDescription
--project-pYesProject ID
--environment-eYesTarget environment

flagify ai-setup

Generate AI tool config files for your project. Creates config files so AI coding tools understand your Flagify setup.

flagify ai-setup

Generate for a specific tool:

flagify ai-setup --tool cursor

By default, generated configs instruct the AI tool to run flagify flags list for live data. Use --include-flags to also embed a point-in-time snapshot:

flagify ai-setup --include-flags
✓ Generated claude CLAUDE.md + .claude/commands/
✓ Generated cursor .cursorrules
✓ Generated copilot .github/copilot-instructions.md
✓ Generated windsurf .windsurfrules

● 4 config file(s) created. Commit them to your repo.
OptionRequiredDefaultDescription
--toolNoGenerate for a specific tool: claude, cursor, copilot, windsurf
--include-flagsNofalseEmbed a snapshot of current flags (marked as potentially outdated)

Files generated per tool:

ToolFiles created
Claude CodeCLAUDE.md (appends section), .claude/commands/flagify-create.md, .claude/commands/flagify-toggle.md, .claude/commands/flagify-list.md
Cursor.cursorrules
GitHub Copilot.github/copilot-instructions.md
Windsurf.windsurfrules

flagify config

Show the current CLI configuration — auth status, URLs, scope, and config file location. Values are grouped into Configuration (auth, URLs) and Scope (workspace, project, environment).

flagify config
  Configuration

  Logged in:    yes
  API URL:      https://api.flagify.dev (default)
  Console URL:  https://console.flagify.dev

  Scope

  Workspace:    acme-corp (01J5K8RQXHNZ4VMKD3GY7PSABET)
  Project:      web-app (01J5KBC3XPQR7WFMN4HY6TDASEV)
  Environment:  development

  Config file:  /Users/jane/.flagify/config.json

flagify config set

Set a configuration value. Shows the previous and new value on update.

flagify config set environment staging
✓ environment updated: development → staging
flagify config set api-url https://api.custom.dev
✓ api-url set to https://api.custom.dev
OptionRequiredDescription
keyYesConfig key: api-url, workspace, project, environment
valueYesValue to set

flagify config get

Get a single configuration value. Prints the raw value, useful for scripts.

flagify config get project
web-app
flagify config get environment
development
OptionRequiredDescription
keyYesConfig key: api-url, workspace, project, environment

flagify version

Print the CLI version and commit hash.

flagify version
flagify 0.0.2 (a1b2c3d)

flagify completion

Generate shell completion scripts for autocompletion.

Zsh (macOS default):

flagify completion zsh > "${fpath[1]}/_flagify"

Bash:

flagify completion bash > /usr/local/etc/bash_completion.d/flagify

Fish:

flagify completion fish > ~/.config/fish/completions/flagify.fish

PowerShell:

flagify completion powershell > flagify.ps1

Restart your shell after installing completions.

Global flags

These flags are available on all commands:

FlagAliasDescription
--workspace-wWorkspace ID (overrides config default)
--project-pProject ID (overrides config default)
--environment-eEnvironment key (overrides config default)
--yes-ySkip confirmation prompts
--help-hHelp for any command

Confirmation prompts

Destructive commands (flags create, flags toggle, keys generate, keys revoke) ask for confirmation before executing. Skip with --yes:

flagify flags toggle my-flag -y