agent-statsig
Statsig feature flag CLI for AI agents
- Language
- Go
- Version
- 0.3.0
- License
- MIT
- Category
- CLI Tool
A Statsig CLI for managing feature gates, dynamic configs, experiments, segments, and tags from the command line. Structured JSON output optimized for LLM consumption, with full CRUD, lifecycle management, and rule manipulation.
Features
Five entity types — feature gates, dynamic configs, experiments, segments, tags
Full CRUD + lifecycle — create, read, update, delete, enable, disable, archive
Rule manipulation — add, update, and remove targeting rules with criteria validation
Tag management — CRUD for tags and --tag flag on entity create/update
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 --console-key console-YOUR_KEY Console API keys are required for management. Pass --client-key as well for gate evaluation (gate check). Keys are stored in macOS Keychain when available.
02 · Test the connection
$ agent-statsig project test 03 · List feature gates
$ agent-statsig gate list Default output is JSON; pass --format jsonl for line-per-record streaming.
Usage
$ agent-statsig gate list $ agent-statsig gate check my_feature --user '{"userID":"user123"}' $ agent-statsig gate create new_feature --description "Enable new checkout flow" $ agent-statsig gate rule add new_feature --name "Beta users" --criteria user_id --value user1 --value user2 $ agent-statsig experiment list $ agent-statsig config get pricing_tiers