Configuration
File location
Section titled “File location”Ink looks for one user configuration file:
$XDG_CONFIG_HOME/ink/config.tomlwhenXDG_CONFIG_HOMEis a non-empty absolute path$HOME/.config/ink/config.tomlwhenXDG_CONFIG_HOMEis unset, empty, or relative
When the XDG path is active, Ink does not also read the home fallback.
Precedence
Section titled “Precedence”Settings resolve in this order, from lowest to highest priority:
- Built-in defaults
- User configuration
- Explicit command-line options
For example, --theme nord overrides a theme selected in config.toml.
Settings
Section titled “Settings”The configuration file accepts these settings:
normal: whether the prompt starts in Normal mode (falseby default)line-numbers: whether textarea shows line numbers (trueby default)theme: a case-insensitive bundled theme name, using hyphens as separators (tokyo-nightby default)colors: semantic#RRGGBBoverrides applied after the selected theme
#:schema https://dkarter.github.io/ink/schema/ink-config.schema.jsonnormal = truetheme = "catppuccin-mocha"
[colors]selection = "#33467c"normal-mode = "#7aa2f7"See Themes for every supported color role.
Schema and validation
Section titled “Schema and validation”Ink publishes its complete TOML schema at https://dkarter.github.io/ink/schema/ink-config.schema.json. Config files written by ink theme include the Taplo-compatible association automatically. Add this first line to existing hand-written files for editor completion and validation:
#:schema https://dkarter.github.io/ink/schema/ink-config.schema.jsonValidate the same path Ink uses during normal startup:
ink config validateA valid file, or an absent file that uses defaults, exits 0 with a concise message. Invalid or unreadable files exit 1 with a path-bearing diagnostic. Command usage errors exit 2.
Invalid settings
Section titled “Invalid settings”Invalid syntax, unknown themes, unsupported values, and unknown settings fail before Ink enters terminal raw mode. The diagnostic identifies the file and setting, standard output remains empty, and the process exits with status 1.