Skip to main content

Install and use the Flaggr CLI to manage feature flags from the terminal

Last updated March 15, 2026

Flaggr CLI

The Flaggr CLI lets you manage feature flags, evaluate flags, and export configurations directly from your terminal.

Installation

Quick install (macOS / Linux)

curl -fsSL https://raw.githubusercontent.com/skunkworq/flaggr/main/scripts/install.sh | sh

Download from GitHub Releases

Download the latest binary for your platform from GitHub Releases.

PlatformArchitectureDownload
macOSApple Silicon (M1+)flaggr_*_darwin_arm64.tar.gz
macOSIntelflaggr_*_darwin_amd64.tar.gz
Linuxx86_64flaggr_*_linux_amd64.tar.gz
LinuxARM64flaggr_*_linux_arm64.tar.gz

Extract and move to your PATH:

tar -xzf flaggr_*_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m).tar.gz
sudo mv flaggr /usr/local/bin/

Build from source

git clone https://github.com/skunkworq/flaggr.git
cd flaggr/cli
go build -o flaggr .
sudo mv flaggr /usr/local/bin/

Authentication

The CLI uses a browser-based auth flow (similar to gcloud auth login):

flaggr login

This will:

  1. Open your browser to the Flaggr login page
  2. After signing in, you select a project to authorize
  3. The CLI receives credentials and saves them to ~/.flaggr/config.json

For non-interactive environments (CI/CD), pass a token directly:

flaggr login --token fgr_your_api_token

To log out and remove saved credentials:

flaggr logout

Commands

flaggr status

Show CLI and server versions, check API health.

$ flaggr status
CLI version:    0.1.0 (abc1234)
Server version: 0.9.0 (d1939eb)
Environment:    production
 
 Flaggr is healthy

flaggr projects list

List all projects you have access to.

flaggr projects list
flaggr projects list --json  # JSON output

flaggr services list

List services in the current project.

flaggr services list

flaggr flags list

List feature flags.

flaggr flags list
flaggr flags list --service my-service

flaggr flags toggle

Toggle a flag on or off.

flaggr flags toggle my-flag --service my-service

flaggr eval

Evaluate a flag with targeting context via Connect-RPC.

flaggr eval my-flag --bool
flaggr eval my-flag --string --context '{"userId":"user-123"}'

flaggr export

Export full project configuration as JSON.

flaggr export > flaggr-backup.json

Configuration

The CLI stores configuration at ~/.flaggr/config.json:

{
  "api_url": "https://flaggr.dev",
  "api_token": "fgr_...",
  "default_project_id": "proj_abc123"
}
 

Override the API URL for self-hosted instances:

flaggr login --url https://flaggr.internal.company.com

Global Flags

FlagDescription
--jsonOutput as JSON (works with all commands)
--versionShow CLI version
--helpShow help for any command