flagsmith flag update
Change a flag’s state in the current environment
flagsmith flag update <feature> [flags]Examples
# toggle the environment default
flagsmith flag update onboarding --enable
flagsmith flag update onboarding --disable
# set a value (type inferred, or forced with --type)
flagsmith flag update banner-text --value "Welcome!"
flagsmith flag update max-items --value 10 --type integer
# target a segment or identity override instead of the default
flagsmith flag update onboarding --enable --segment 12
flagsmith flag update onboarding --value beta --identifier user-123
# re-weight a multivariate flag's variants (by key or id)
flagsmith flag update banner-copy --weight hero=25 --weight sub=75
flagsmith flag update banner-copy --segment 12 --weight hero=100,sub=0Options
--disable turn the flag off
--enable turn the flag on
-h, --help help for update
-i, --identifier string target this identity's override instead of the environment default
--priority int move the segment override to this priority (0 is evaluated first)
--segment string target this segment's override (id or name) instead of the environment default
--type string force the value type: string, integer, or boolean
--value string set the flag value
--weight stringArray set a variant's weight, as <key|id>=<percentage> (repeatable, or comma-separated)Options inherited from parent commands
--api-url string Flagsmith API base URL (env: FLAGSMITH_API_URL) (default "https://api.flagsmith.com")
-c, --config-path string path to flagsmith.json (env: FLAGSMITH_CONFIG_PATH)
-e, --environment string environment as its client-side SDK key (env: FLAGSMITH_ENVIRONMENT)
--jq string filter JSON output through a jq expression (implies --json)
--json output JSON instead of human-readable text (env: FLAGSMITH_JSON_OUTPUT)
--no-input never prompt or open a browser; fail if required input is missing (env: FLAGSMITH_NO_INPUT)
--organisation string organisation ID or name (env: FLAGSMITH_ORGANISATION)
-p, --project string project ID or name (env: FLAGSMITH_PROJECT)
--sdk-api-url string SDK API base URL for flag evaluation (env: FLAGSMITH_SDK_API_URL)
--yes answer confirmations affirmativelySEE ALSO
- flagsmith flag - Inspect feature flags in the current environment