CLI Configuration

The Flagify CLI stores configuration and credentials in ~/.flagify/config.json.

Config file

After running flagify login and authorizing via the browser, your config file looks like:

{
  "accessToken": "eyJhbGci...",
  "refreshToken": "eyJhbGci...",
  "apiUrl": "https://api.flagify.dev",
  "consoleUrl": "https://console.flagify.dev",
  "workspace": "acme-corp",
  "workspaceId": "01J5K8RQXHNZ4VMKD3GY7PSABET",
  "project": "web-app",
  "projectId": "01J5KBC3XPQR7WFMN4HY6TDASEV",
  "environment": "development"
}

Fields

FieldTypeDefaultDescription
accessTokenstringJWT access token (set by flagify login)
refreshTokenstringJWT refresh token (set by flagify login)
apiUrlstringhttps://api.flagify.devAPI endpoint
consoleUrlstringConsole URL (set by flagify login)
workspacestringDefault workspace slug (set by flagify workspaces pick)
workspaceIdstringDefault workspace ID (set by flagify workspaces pick)
projectstringDefault project slug (set by flagify projects pick)
projectIdstringDefault project ID (set by flagify projects pick)
environmentstringDefault environment key (set by flagify environments pick)

Setting defaults

Use the interactive pick commands to set defaults, so you don’t need to pass flags on every command:

flagify workspaces pick
flagify projects pick
flagify environments pick

Each command saves the selection to the config file. View your current defaults with:

flagify config

You can also set values directly:

flagify config set environment staging

Or read a single value (useful in scripts):

flagify config get project

Valid keys for config set and config get: api-url, workspace, project, environment

Command-line overrides

Command-line flags always take precedence over the config file:

# Uses the project from config
flagify flags list

# Overrides with a specific project
flagify flags list --project proj_other

Precedence order

When the same setting is specified in multiple places:

  1. Command-line flags--project proj_123
  2. Config file~/.flagify/config.json
  3. Defaults — built-in fallback values

Updating the CLI

npm

npm update -g @flagify/cli

Homebrew

brew upgrade flagify

Binary

Download the latest release from GitHub Releases.