GrowthBook CLI
$ growthbook Official Med RiskGrowthBook CLI (growthbook) is generated from GrowthBook's OpenAPI spec to manage feature flags, A/B experiments, metrics, and populations. Designed explicitly for AI agents, it auto-enables --agent-mode under coding agents, supports -o json/yaml/toon, -q/--jq filtering, --dry-run payload previews, and --no-interactive.
brew install growthbook/tap/growthbook Built-in --agent-mode, -q/--jq filtering, TOON output, and --dry-run provide top-tier token efficiency without MCP overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Gold-standard agent ergonomics: --agent-mode auto-detection, -o json|yaml|toon, -q/--jq, --no-interactive, and GBCLI_BEARER_AUTH.
--agent-modewithCLAUDE_CODE/CURSOR_AGENTauto-detection-o json,-q/--jq, and--no-interactiveglobal flags
Supports global --dry-run request previews, named --profile isolation, and --no-interactive safety across OpenAPI operations.
- Global
--dry-runAPI payload preview - Named credential profiles via
--profile
Available via Homebrew tap (growthbook/tap/growthbook), npm/npx (growthbook), and GitHub releases across OSes.
- Homebrew tap, npm package, and prebuilt binaries
OpenAPI-generated coverage of features, experiments, schedules, metrics, and populations with TOON token compression.
- Full REST coverage with
jqandTOONcompact formatting
Official growthbook/cli repository maintained under MIT.
- Official
growthbook/clirepository
Includes auto-generated Markdown command docs under cli/docs/ in GitHub plus --help.
- Generated
cli/docs/markdown reference anddocs.growthbook.io
Security, Auth & Guardrails
Authenticates headlessly via GBCLI_BEARER_AUTH (or --bearer-auth) or named credential profiles stored locally via growthbook profiles.
MIT open-source CLI; GrowthBook offers a free open-source self-hosted edition and a free Starter Cloud tier.
# GrowthBook CLI Agent Rules - Always pass `-o json` (or use `--agent-mode`), `-q/--jq`, and `--no-interactive`. - Run mutations with `--dry-run` first and confirm `--profile` targets staging before production.
Agent-Ready Command Recipes
Safe Read-Only Queries
growthbook features list -o json -q '.features[] | {id, archived}' --no-interactive Retrieves feature flag IDs and archive status with minimal token footprint.
growthbook whoami -o json --no-interactive
Verifies the active GrowthBook server URL and token identity in JSON.
Controlled Writes & Previews
growthbook features toggle --id my-flag --dry-run -o json --no-interactive
Previews the exact API request payload without mutating the remote feature flag.
Strengths for Agents
- + Native
--agent-mode,-o json/toon,-q/--jq, and--no-interactivebuilt from the ground up for agents. - + Global
--dry-runpreviews exact API payloads before applying flag or experiment changes.
Caveats & Pitfalls
- ! Requires
GBCLI_BEARER_AUTHor a configured--profilesecret key with appropriate RBAC permissions. - ! OpenAPI-derived command paths distinguish between
features(v2) andfeatures-v1.