Skip to content

ezgh flags create

Create a flag, off in every environment.

Updated View as Markdown
ezgh flags create <key> [--type boolean|string|number|object] [--name n] [--variation key=value…] [--client-side] [--tag t…] [flags]

Create a flag. Its key is how your code asks for it and can’t change; --name defaults to the key.

A boolean flag (--type boolean, the default) serves false or true. A string, number or object flag serves one of 2 to 20 variations, each --variation key=value: the value as text, a number, or a JSON object. A new flag is off in every environment, serving its first variation (false for a boolean). Turned on with ezgh flags toggle, a new boolean flag serves true to everyone, and another type serves its first variation.

--client-side lets web pages evaluate it with a client key; other flags are invisible to client keys.

Part of ezgh flags.

Examples

ezgh flags create new-checkout --name "New checkout" --client-side --tag checkout
ezgh flags create banner-color --type string --variation blue=blue --variation green=green

Flags

Flag Type Default Description
--client-side boolean web pages may evaluate it with a client key
--description string what it’s for
--name string a display name (default: the key)
--tag string, repeatable a tag (repeat)
--type string boolean boolean, string, number or object (can’t change)
--variation string, repeatable a variation, key=value (repeat; string, number and object flags)

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close