The ConfigCat Command Line Interface (CLI) allows you to interact with the Public Management API via the command line. It supports most functionality found on the ConfigCat Dashboard. You can manage ConfigCat resources like Feature Flags, Targeting / Percentage rules, Products, Configs, Environments, and more.
See the command reference documentation for more information about each available command.
The following instructions will guide you through the first steps to start using this tool.
In the meantime, you can download the binaries directly from GitHub Releases.
You can install the CLI by executing an install script on Unix platforms.
By default, the script downloads the OS specific artifact from the latest GitHub Release with
curl and moves it into the
It might happen, that you don't have permissions to write into
/usr/local/bin, then you should execute the install script with
The script accepts the following input parameters:
|The directory where the CLI should be installed.|
|The desired version to install.|
|The desired architecture to install.|
The possible architecture values for Linux:
For macOS, the architecture is fixed to
x64, but we plan the support of Apple silicon in the future.
Script Usage examples:
Custom installation directory:
Install a different version:
Install with custom architecture:
After a successful installation, the CLI must be configured with your ConfigCat Management API credentials.
The CLI can read your credentials from the following environment variables.
|The Management API host. (default: api.configcat.com)|
|The Management API basic authentication username.|
|The Management API basic authentication password.|
When any of these environment variables are set, the CLI will use those over their local values set by the
configcat setup command.
The CLI supports both interactive and argument driven execution. When no arguments provided for a command and user input is enabled (stdout is not redirected), the CLI automatically activates interactive mode.
The same operation with command arguments would look like this:
create command writes the newly created resource's ID to the standard output, that you can save for further operations.
Here are a few examples showing the true power of the CLI.
Create a Feature Flag
The following example shows how you can create a Feature Flag in a specific Config via command line.
The following example shows how you can update the value of a Feature Flag in a specific Environment via command line.
Add targeting rules
The following example shows how you can add targeting rules to a Feature Flag via command line.
Add percentage rules
The following example shows how you can set percentage rules on a Feature Flag via command line.
Scan for code references
The following example shows how you can scan a codebase for Feature Flag or Setting usages. The scanner command searches for every Feature Flag / Setting key defined within the given Config.
scan command respects all include/exclude patterns listed inside
.ignore files within the given directory.
In addition, you can create an extra
.ccignore file with patterns that the scanner must include/exclude.
Each pattern must follow the gitignore pattern format.