Configuration keys
The reference table. Configuration explains what the settings do and when styling applies.
| Key | Environment | Type | Default |
|---|---|---|---|
theme | KX_THEME | string | github-dark |
engine | KX_ENGINE | string | scout |
max_history | KX_MAX_HISTORY | integer | 10 |
shells | KX_SHELLS | list of strings | ["bash", "sh"] |
debug_image | KX_DEBUG_IMAGE | string | busybox |
diag_max_age | KX_DIAG_MAX_AGE | duration string | unset (no limit) |
events_max_age | KX_EVENTS_MAX_AGE | duration string | unset (no limit) |
theme_disable | KX_THEME_DISABLE | boolean | false |
Environment variables win over the file.
The shells key is a TOML array in the file and a comma-separated string in the environment:
KX_SHELLS=zsh,bash,sh kx exec 1A complete file:
theme = "dracula"
engine = "trivy"
max_history = 25
shells = ["zsh", "bash", "sh"]
debug_image = "alpine"
diag_max_age = "7d"
events_max_age = "1h"
theme_disable = falseThe diag_max_age key is a duration in s, m, h or d: 90s, 30m, 12h, 7d.
A fraction or a mixture works too — 1.5h, 1h30m — except with d, which takes a fraction but not a mixture: 1.5d, never 1d12h.
It bounds how far back kx diag looks for evidence; unset — or "0" — reports everything however old.
The events_max_age key is the same for kx events, and separate from diag_max_age: neither falls back to the other.
Both are overridden per run by --since.
Nothing here is required — kx runs on the defaults with no config file at all.
Paths
| Path | Environment | Contents |
|---|---|---|
~/.kx/config.toml | KX_CONFIG | The keys above. |
~/.kx/state.json | KX_STATE | Saved listings and the history cursor; see state. |
The KX_CONFIG and KX_STATE variables point kx at a different file entirely, rather than overriding one key the way the settings table above does — useful for a terminal or CI job that wants its own config or history instead of sharing the one in ~/.kx.
Neither can be set from inside the file it names, so there’s no config.toml equivalent for them.
Running kx --version prints both paths, resolved, along with the version and build.
Also honored
NO_COLOR | The cross-tool convention. Any non-empty value disables styling. |
--no-color | Per-run, on any command. |
| stdout not a terminal | Styling is dropped automatically, so pipes and redirects stay plain. |