agent-statsig
Statsig feature flag CLI for AI agents
- Language
- Go
- Version
- 0.2.0
- License
- MIT
- Category
- CLI Tool
A Statsig CLI for managing feature gates, dynamic configs, experiments, and segments from the command line. Structured JSON output optimized for LLM consumption, with full CRUD, lifecycle management, and rule manipulation.
Features
Four entity types — feature gates, dynamic configs, experiments, segments
Full CRUD + lifecycle — create, read, update, delete, enable, disable, archive
Rule manipulation — add, update, and remove targeting rules with criteria validation
JSON Schema validation — dynamic config return values validated client-side
Structured output — JSON/YAML/NDJSON with classified errors (fixable_by: agent|human|retry)
Secure credential storage — macOS Keychain integration, multi-project support
Progressive documentation — top-level, per-entity reference, and criteria discovery
Single compiled Go binary — no runtime dependencies
Install
Homebrew
$ brew install shhac/tap/agent-statsig AI Agent Skill
$ npx skills add shhac/agent-statsig GitHub Release (macOS)
$ curl -L https://github.com/shhac/agent-statsig/releases/latest/download/agent-statsig-darwin-arm64.tar.gz | tar xz Go Install
$ go install github.com/shhac/agent-statsig/cmd/agent-statsig@latest Build from Source
$ git clone https://github.com/shhac/agent-statsig.git && cd agent-statsig && make build Getting Started
agent-statsig needs a Statsig Console API key before it can manage feature flags. Store credentials per project for multi-project support.
01 · Add your Statsig project
$ agent-statsig project add myapp --api-key console-YOUR_KEY API keys are stored in macOS Keychain when available. Use Console API keys, not client/server SDK keys.
02 · Test the connection
$ agent-statsig project test 03 · List feature gates
$ agent-statsig gate list Returns NDJSON by default for token-efficient streaming.
Usage
$ agent-statsig gate list $ agent-statsig gate check my_feature --user-id user123 $ agent-statsig gate create new_feature --description "Enable new checkout flow" $ agent-statsig gate rule add new_feature --type user_id --values user1,user2 $ agent-statsig experiment list $ agent-statsig config get pricing_tiers