Skip to main content

Settings

The Kwil application supports a number of configuration options that can be set through:

  1. The config.toml file
  2. Command line flags
  3. Environment variables

To see all of the available configuration options, run kwild start -h.

To see the current configuration, which merges all three sources listed above, run kwild print-config. This output may be used as a config file template.

For example:

kwild print-config > sample_config.toml

Configuration Source Priority

As described above, the Kwil settings may be changed through the config.toml file, command line flags, or environment variables. The order of priority is env variables > flags > config.toml > defaults.

The structure of config.toml is hierarchical, using sections and subsections. Below are the rules to translate a field from config.toml to environment variables or command line flags.

config.toml
[section]
field = "val"

[section.subsection]
other_field = "val"

The corresponding command line flags and environment variables for field and other_field are as follows:

FlagEnvironment Variable
--section.fieldKWILD_SECTION_FIELD
--section.subsection.other-fieldKWILD_SECTION_SUBSECTION_OTHER_FIELD

The one exception to the above is for configuring values in the app.extensions section of the config.toml. Extension configs must be specified after all others, and must be delimited from the rest of the command line arguments by a double dash --:

kwild start --autogen --log.level=debug -- --extension.<extension-name>.<config-key> <config-value>