Skip to main content
Expected location: the current working directory (the directory where you run the Cognite Toolkit.) Use the cdf.toml to configure the Cognite Toolkit CLI. The file is created automatically when you run the cdf modules init command. The cdf.toml file is written in the TOML format and looks similar to this:

The cdf section

The cdf section contains these keys:
  • default_organization_dir (string): specifies the default organization directory to use if the --organization-dir/-o flag isn’t specified. The key is used by all commands that require the organization directory.
  • default_env (string): specifies the default environment to use when the --env/-e flag isn’t specified. The key is used by all commands that require the environment.
  • file_encoding (string, available from version 0.5.14): specifies the encoding used by the Cognite Toolkit when reading configuration files from the /modules directory. If not specified, the default depends on the operating system, typically utf-8 on Linux and MacOS, and cp1252 on Windows. We recommend using utf-8 to avoid issues with special characters and ensure compatibility across different platforms.
  • file_upload_timeout_seconds (float, available from version 0.7.139): specifies the timeout in seconds for uploading function code when running the cdf upload command. To deploy a Cognite Function, the Cognite Toolkit first uploads a file with the function code and then references that file in the function configuration. If the upload exceeds the specified timeout, the deployment fails. The default value is 120 seconds.

The rules section

This section controls how cdf build reports insights. An insight is a finding in your configuration, such as a missing reference, a schema warning, or a recommendation. For example, referenced resources must be in the build or already exist in CDF.
  • ignore (list of strings): insight codes to skip in every file. cdf build leaves these codes out of the terminal output and still writes them to build/insights.csv.
  • enforce (boolean, default false): when true, cdf build raises an error if any insight remains after ignored codes are filtered out, including errors, warnings, and recommendations. Set enforce = true in CI/CD when the build must be clean. When false, cdf build logs the violations to build/insights.csv and prints them in the terminal output.
To skip a code in one file, add a comment on any line in that file. Write # rules: ignore[CODE] or # rule: ignore[CODE]. Separate multiple codes with commas.

Insight codes

The Cognite Toolkit version 0.9 reports these insight codes. Use a code in rules.ignore or in a file comment.

The plugins section

This section turns plugins on or off. See the Plugins for more information.

The alpha_flags section

This section enables alpha features. Alpha features are experimental and may change or be removed in future releases.

The modules section

This section specifies the version of the modules found in the modules/ directory. The Cognite Toolkit uses it to ensure that the CLI matches the modules. It’s automatically updated when you run the cdf modules upgrade command.
Last modified on October 13, 2026