GO Feature Flag Command Line

May 16, 2026 · View on GitHub

What is GO Feature Flag Command Line?

The GO Feature Flag Command Line is a CLI tool to interact with GO Feature Flag in your terminal.
For now it supports the following commands:

  • evaluate to evaluate feature flags directly in your terminal
  • lint to validate a configuration file format.
  • generate manifest to create an OpenFeature flag manifest.

How to install the cli

Install using Homebrew (mac and linux)

brew tap thomaspoignant/homebrew-tap
brew install go-feature-flag-cli

Install using docker

docker pull gofeatureflag/go-feature-flag-cli

More information about the usage of the container in the dockerhub page.

How to use the command line

go-feature-flag-cli is a command line tool.

How to evaluate a flag

The evaluate command allows you to evaluate a feature flag or inspect the configuration of your retriever using --check-mode

go-feature-flag-cli evaluate [OPTIONS]

Key Flags

FlagShorthandDescriptionDefault
--kindkKind of configuration source. Determines where to read your flags fromfile
--configcPath to the local flag configuration file (⚠️ deprecated, use --path instead)""
--formatfFormat of your input file (YAML, JSON or TOML)yaml
--flagName of the flag to evaluate""
--timeoutTimeout in seconds to access your configuration file0
--ctxEvaluation context as a json string{}
--check-modeCheck only mode - when set, the command will not perform any
evaluation and returns the configuration of spanned retriever
false

Supported values for --kind are:

  • file
  • http
  • github
  • gitlab
  • s3
  • googleStorage
  • configmap (kubernetes)
  • mongodb
  • bitbucket
  • azureBlobStorage
  • postgresql

Caution: We do not support redis retriever as for now due to: https://github.com/thomaspoignant/go-feature-flag/issues/4023.

Retriever specific flags

The aforementioned --kind parameter is used to determine the retriever to use. The semantic meaning of other flags depends on that one, for example --path parameter is used to specify local file when --kind being file but when --kind being github it is used to specify the path to the remote file.

File

FlagDescriptionDefault
--pathPath to the local flag configuration file""

HTTP

FlagDescriptionDefault
--urlURL of the remote flag configuration file""
--methodHTTP method to access your configuration file on HTTPGET
--bodyHttp body to access your configuration file on HTTP""
--headerHeader to add to the request. Supported formats are k:v and k=v""

GitHub

FlagDescriptionDefault
--repository-slugName of the repository""
--branchGit branch name""
--auth-tokenAuthentication token to access your configuration file""
--github-tokenAuthentication token to access your configuration file on GitHub
(⚠️ deprecated, use --auth-token instead)
""
--pathPath to the remote flag configuration file inside github repository""

GitLab

FlagDescriptionDefault
--base-urlBase URL of your configuration file on Gitlab""
--repository-slugName of the repository""
--branchGit branch name""
--pathPath to the remote flag configuration file inside gitlab repository""

BitBucket

FlagDescriptionDefault
--base-urlBase URL of your configuration file on BitBucket""
--repository-slugName of the repository""
--branchGit branch name""
--pathPath to the remote flag configuration file inside bitbucket repository""

S3

FlagDescriptionDefault
--bucketName of the bucket""
--itemItem of the bucket""

Google Storage

FlagDescriptionDefault
--bucketName of the bucket""
--objectObject of the bucket""

ConfigMap (Kubernetes)

FlagDescriptionDefault
--namespaceNamespace of the ConfigMap"default"
--config-mapName of the ConfigMap""
--keyKey of the ConfigMap""

MongoDB

FlagDescriptionDefault
--uriURI of your configuration file""
--databaseDatabase name of your configuration file on mongodb""
--collectionCollection of your configuration file on mongodb""

Azure Blob Storage

FlagDescriptionDefault
--account-nameName of the storage account""
--account-keyKey of the storage account""
--containerName of the container""
--objectName of the object blob""

PostgreSQL

FlagDescriptionDefault
--uriURI of your configuration file""
--tableTable of your configuration file""
--columnColumn mapping to add. Supported format is c1:c2""

As mentioned above the --config flag is deprecated and we encourage you to use the --path flag instead. For example the following command:

go-feature-flag-cli evaluate --config="<location_of_your_flag_configuration_file>" --flag="<name_of_your_flag_to_evaluate>" --ctx='<evaluation_ctx_as_json_string>'

may be replaced by:

go-feature-flag-cli evaluate --kind="file" --path="<location_of_your_flag_configuration_file>" --flag="<name_of_your_flag_to_evaluate>" --ctx='<evaluation_ctx_as_json_string>'

How to lint a configuration file

go-feature-flag-cli lint <location_of_your_flag_configuration_file> --format="<yaml or json or toml>"

License

View license information for the software contained in this image.

How can I contribute?

This project is open for contribution, see the contributor's guide for some helpful tips.