Skip to content
The feature flag reference validator for ConfigCat. ConfigCat is a hosted feature flag service: Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
Python Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


PyPI Docker version

CLI tool for validating ConfigCat feature flag references in your source code.

This tool can be used for discovering ConfigCat feature flag usages in your source code and validating them against your own ConfigCat configuration dashboard. It searches for ConfigCat SDK usage and greps the feature flag keys from the source code, then it compares them with the keys got from your ConfigCat dashboard.


This CLI tool is written in python so you have to have python installed on your system.

  1. Install the The silver searcher used for source code scanning.
    • Linux
      apt-get install silversearcher-ag
    • Windows
      choco install ag
  2. Install the reference validator using pip.
    pip install configcat-flag-reference-validator
  3. Execute the validator.
    configcat-validator [YOUR-CONFIGCAT-APIKEY] [DIRECTORY-TO-SCAN] 


Pull the configcat/feature-flag-reference-validator docker image to your environment. The image provides an entrypoint configcat-validator to execute the validator.

docker pull configcat/feature-flag-reference-validator

docker run configcat-validator [YOUR-CONFIGCAT-APIKEY] [DIRECTORY-TO-SCAN]


Name Required Default value Description
configcat_api_key yes N/A The api key of your ConfigCat project.
search_dir yes N/A The directory to scan for flag references.
-s, --configcat_cdn_server no The domain name of the ConfigCat CDN where you ConfigCat configuration file is stored.
-f, --fail_on_warnings no false Signals an error when the validation fails. By default only warnings are showed.
-v, --verbose no false Turns on detailed logging.


The following command will execute a flag reference validation on the ./repo folder and signals a failure when it finds flag key mismatches.

configcat-validator \
    ./repo \
    --fail_on_warnings \


INFO:configcat.reference_validator.config_fetcher:Fetching the current ConfigCat configuration from
INFO:configcat.reference_validator.config_fetcher:Successful fetch, 2 settings found: ['key1', 'key2'].
INFO:configcat.reference_validator.reference_finder:Scanning the ./repo directory for ConfigCat setting references.
INFO:configcat.reference_validator.reference_finder:6 references found: {'key1', 'key2', 'key3'}.
WARNING:configcat.reference_validator.reference_validator:Feature flag/Setting keys not found in ConfigCat (but present in source code): {'key3'}.
Exited with code 1

CI Integrations

About ConfigCat

You can’t perform that action at this time.