The next-generation Flagsmith command-line interface (work in progress).
go build -o flagsmith .flagsmith init # log in, pick a project + environment, write flagsmith.json
flagsmith flag list # list the flags in the current environmentflagsmith init— bind the current directory to a project (writesflagsmith.json).flagsmith flag list— list feature flags in the current environment.flagsmith flag get <feature>— show a single flag's state (--segment <id>or--identifier <id>for an override).flagsmith flag update <feature>— toggle (--enable/--disable) or set the value (--value,--type);--segment <id>or--identifier <id>targets an override.flagsmith flag enable|disable <feature>— shorthand forflag update --enable/--disable(same--segment/--identifiertargeting).flagsmith flag delete <feature> --segment <id>|--identifier <id>— delete a segment or identity override.flagsmith segment list— list segments (--include-feature-specificto include feature-scoped ones).flagsmith segment get <segment>— show a segment and its rule tree.flagsmith segment create <name> --rules @rule.json— create a segment (--description,--feature).flagsmith segment update <segment>— replace the rules (--rules), description, or feature.flagsmith segment delete <segment>— delete a segment.flagsmith feature list— list project features (--include-archived).flagsmith feature get <feature>— show a feature and its variants.flagsmith feature create <name>— create a feature (--value,--enabled,--description,--variants).flagsmith feature update <feature>— update description or archive (--description,--archive/--unarchive).flagsmith feature delete <feature>— delete a feature.flagsmith feature variant list|add|update|delete <feature>— manage a multivariate feature's variants (by id or key).flagsmith organisation list|get|create|update|delete(aliasorg) — manage organisations.flagsmith project list|get|create|update|delete— manage projects (createuses--organisation).flagsmith environment list|get|create|update|delete|clone(aliasenv) — manage environments (by name or API key).flagsmith environment key list|create|delete <environment>— manage server-side SDK keys.flagsmith environment document [environment]— output the environment document (local-evaluation JSON).flagsmith config— show the resolved context and where each value comes from.flagsmith login/logout— browser OAuth (PKCE, loopback); alsoauth login/auth logout.flagsmith auth status— identity, organisations, credential source, token expiry.flagsmith auth token— print the active Admin API credential for curl/scripts.flagsmith api <path>— call any Flagsmith endpoint with the CLI's credentials applied (curl-like;--sdkfor the SDK API,-F/-ffields).
--json(orFLAGSMITH_JSON_OUTPUT) for machine-readable output;--jq <expr>to filter it.- Static credentials:
FLAGSMITH_API_KEY(Admin API),FLAGSMITH_ENVIRONMENT_KEY(SDK). - Self-hosted:
--api-urlorFLAGSMITH_API_URL.
Installation · Output & interactivity · Authentication · Project config · CRUD conventions · API · Flags · Segments · Features · Projects & organisations · Environments · Evaluate