Skip to content
Configuration keys

Configuration keys

The reference table. Configuration explains what the settings do and when styling applies.

KeyEnvironmentTypeDefault
themeKX_THEMEstringgithub-dark
engineKX_ENGINEstringscout
max_historyKX_MAX_HISTORYinteger10
shellsKX_SHELLSlist of strings["bash", "sh"]
debug_imageKX_DEBUG_IMAGEstringbusybox
diag_max_ageKX_DIAG_MAX_AGEduration stringunset (no limit)
events_max_ageKX_EVENTS_MAX_AGEduration stringunset (no limit)
theme_disableKX_THEME_DISABLEbooleanfalse

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 1

A 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 = false

The 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

PathEnvironmentContents
~/.kx/config.tomlKX_CONFIGThe keys above.
~/.kx/state.jsonKX_STATESaved 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_COLORThe cross-tool convention. Any non-empty value disables styling.
--no-colorPer-run, on any command.
stdout not a terminalStyling is dropped automatically, so pipes and redirects stay plain.