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
| Field | Type | Default | Description |
|---|---|---|---|
accessToken | string | — | JWT access token (set by flagify login) |
refreshToken | string | — | JWT refresh token (set by flagify login) |
apiUrl | string | https://api.flagify.dev | API endpoint |
consoleUrl | string | — | Console URL (set by flagify login) |
workspace | string | — | Default workspace slug (set by flagify workspaces pick) |
workspaceId | string | — | Default workspace ID (set by flagify workspaces pick) |
project | string | — | Default project slug (set by flagify projects pick) |
projectId | string | — | Default project ID (set by flagify projects pick) |
environment | string | — | Default 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:
- Command-line flags —
--project proj_123 - Config file —
~/.flagify/config.json - 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.