CLI Commands Reference
Complete reference for all available commands in the Superflag CLI.Using Claude Code? Check out the Claude Code skill for AI-powered flag management.
Quick Commands
Optimized for automation and AI agents with minimal output.use
Set default app and environment context.~/.superflag/context.json and used by get and set commands.
get
Get a flag value using saved context.superflag use.
set
Set a flag value using saved context.superflag use.
config
Dump full config as JSON.Authentication Commands
login
Log in to your Superflag account.logout
Log out and clear credentials.whoami
Show current user.status
Show authentication and context status.App Management
apps list
List all your apps.apps create
Create a new app.Environment Management
envs list
List environments for an app.Flag Management
flags list
List all flags in an environment.flags create
Create a new flag.bool, string, number, json
Example:
flags set
Set a flag value.flags toggle
Toggle a boolean flag.flags delete
Delete a flag.flags upsert
Create or update a flag (idempotent).flags bulk-set
Set multiple flags from a JSON file.--file is not provided, reads from stdin:
flags rollout
Configure gradual rollout percentage for a flag.--percentage: Percentage of users to show the flag value (0-100, decimals allowed)--remove: Remove rollout configuration
- Users are deterministically assigned based on their
userId(passed to SDK) - Same user always gets same result (consistent bucketing)
- Users not in rollout see the type’s default value (false, "", 0, )
flags variants
Configure A/B testing variants for a flag.--variant: Variant definition in formatvalue:weight:name(can be repeated)--remove: Remove all variants
- Weights must sum to 100
- All variant values must match the flag’s type
- Users are deterministically assigned (consistent bucketing)
- Cannot have both rollout and variants on the same flag
Key Management
keys list
List API keys for an environment.keys create
Create a new API key.sdk, pub
Example:
keys revoke
Revoke an API key.Options
Global Options
Available on all commands:| Option | Description |
|---|---|
--help, -h | Show help |
--version, -v | Show version |
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Error |
2 | Not authenticated |
3 | Not found |