Skip to main content
Version: Next

Evaluate feature flags directly in your terminal

Sometimes for debug or testing purposes, you may want to be able to know what will be the variant used during the evaluation of your feature flag. With the GO Feature Flag Command Line, you can evaluate a feature flag directly in your terminal.

tip

You can also use the evaluate command to use feature flags in your CI/CD pipelines.

Install the Command Line

Check the installation guide to install the go-feature-flag-cli.

Use the evaluate command in your terminal

./go-feature-flag-cli evaluate \
--config="<location_of_your_flag_configuration_file>" \
--format="yaml" \
--flag="<name_of_your_flag_to_evaluate>" \
--ctx='<evaluation_ctx_as_json_string>'
paramdescription
--config(mandatory) The location of your configuration file.
--ctx(mandatory) The evaluation context used to evaluate the flag in json format (ex: {"targetingKey":"123"}).
--formatThe format of your configuration flag (acceptable values:yaml, json, toml).
Default: yaml
--flagThe name of the flag you want to evaluate, if omitted all flags will be evaluated

Get the latest GO Feature Flag updates