Skip to content

ezgh flags config set

Replace a flag's targeting in an environment from JSON.

Updated View as Markdown
ezgh flags config set <key> --env <environment> --file config.json [--comment text] [flags]

Replace a flag’s whole targeting in one environment with a JSON file (- for stdin): enabled, offVariation, targets, rules and defaultServe, as ezgh flags config get prints them (other fields are ignored). A file with a version is written only if the config is still at that version: if someone else changed it since you read it, nothing changes (precondition_failed), and you can read it again and reapply your edit. Without a version it replaces whatever is there.

Rules are tried top to bottom, the first match serving; each rule’s clauses are ANDed. Clause operators are in, notIn, contains, startsWith, endsWith, lt, lte, gt, gte, semverEq, semverLt, semverGt, segmentMatch and notSegmentMatch (the last two take segment keys and no attribute). A rollout’s weights are thousandths of a percent and add up to 100000.

Part of ezgh flags config.

Examples

ezgh flags config get new-checkout --env staging > c.json && $EDITOR c.json
ezgh flags config set new-checkout --env staging --file c.json --comment "Add the beta rule"

Flags

Flag Type Default Description
--comment string why, kept with the version (overrides the file’s)
--env string the environment’s key (required)
--file string the config as JSON, or - for stdin (required)

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close