Settings
The Kwil application supports a number of configuration options that can be set through:
- The
config.toml
file - Command line flags
- 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.
[section]
field = "val"
[section.subsection]
other_field = "val"
The corresponding command line flags and environment variables for field
and
other_field
are as follows:
Flag | Environment Variable |
---|---|
--section.field | KWILD_SECTION_FIELD |
--section.subsection.other-field | KWILD_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>