Skip to content

Settings

The files the TUI reads and writes, its config.toml keys, its state, its command-line flags and its environment variables. $XDG_CONFIG_HOME defaults to ~/.config and $XDG_STATE_HOME to ~/.local/state, on every OS.

Files

File What it holds
$XDG_CONFIG_HOME/virtufin/api/contexts.toml The contexts (The contexts file).
$XDG_CONFIG_HOME/virtufin/tui/config.toml The TUI's settings (below), seeded from the shipped default on first run.
$XDG_CONFIG_HOME/virtufin/tui/env.toml Your personal environment variables, owner read and write only (Views › Environment variables).
$XDG_CONFIG_HOME/virtufin/tui/secrets.toml Your personal secrets, owner read and write only (Views › Secrets).
$XDG_CONFIG_HOME/virtufin/tui/llm_providers.toml The AI providers (AI).
$XDG_CONFIG_HOME/virtufin/tui/workers.toml Your entries of the worker registry, merged over the shipped catalog (Views › Workers).
$XDG_CONFIG_HOME/virtufin/tui/navigation.json Your navigation structure (Pages, navigation and custom panes).
$XDG_CONFIG_HOME/virtufin/tui/representations.json Your value kinds and representations (Views › Representations).
$XDG_CONFIG_HOME/virtufin/tui/panes/ Custom panes (Custom panes).
$XDG_CONFIG_HOME/virtufin/tui/examples/ Your scripts for the Scripts pane (Scripts).
$XDG_CONFIG_HOME/virtufin/tui/scripts/ The init_scripts (Scripts).
$XDG_STATE_HOME/virtufin/api/state.toml The active context (The contexts file).
$XDG_STATE_HOME/virtufin/tui/state.json The TUI's state (below).
$XDG_STATE_HOME/virtufin/tui/changes.jsonl The change log (Views › Changes).
$XDG_STATE_HOME/virtufin/tui/tui.log The log (The contexts file).

config.toml

Key Default Meaning
preset_events the shipped file: sys.api.state.saved, sys.api.state.deleted, sys.workmanager.worker.lifecycle Topics offered first in the Events pane's Add Topics picker.
preset_themes the shipped file: textual-dark, textual-light, textual-ansi The themes to choose from.
theme the shipped file: textual-dark The theme on first start; the theme you pick later is state.
liveness_keepalive_seconds 20 Seconds between the keepalive pings on each context's health stream; 0 turns liveness off (Contexts and the write gate).
table_max_row_height 5 The most lines a table row takes (Views › Tables).
table_max_column_width 60 The widest a table cell gets before it wraps (Views › Tables).
show_wallclock true Default of the Events pane's wallclock column (w); the toggled value is state.
show_msgtime true Default of the Events pane's message-time column (t); the toggled value is state.
init_scripts the shipped file: ["system_startdate.py"] Scripts to run once after connecting (Scripts).
[secrets] patterns ["TOKEN", "KEY"] Regular expressions (anywhere in a name, any case) that make a .env name a secret; edited on the Secrets page (Views › Secrets).

State (state.json)

What the TUI sets as you use it; not meant to be edited by hand: events (the subscribed topics), scenario (the active scenario, LIVE by default), default_llm_provider, theme, show_wallclock, show_msgtime, column_widths and page_picks.

Command line

Flag Meaning
--context <name> Start with this context active (over VIRTUFIN_TUI_CONTEXT and the stored one).
--config <path> Read the contexts from this file instead of the default contexts.toml.
--version Print the version and exit.

Environment variables

Variable Meaning
VIRTUFIN_TUI_CONTEXT The active context (The contexts file).
VIRTUFIN_TUI_API_HOST, VIRTUFIN_TUI_API_PORT Override host and port of the active context.
VIRTUFIN_API_KEY The API key of a context without api_key.
VIRTUFIN_TUI_AI_PROVIDER, VIRTUFIN_TUI_AI_MODEL, VIRTUFIN_TUI_AI_API_KEY The AI provider, model and key (AI).
VIRTUFIN_TUI_AI_DOCS_SITES The docs sites the assistant reads (The assistant).
<NAME>_API_KEY A provider's key, by its api_key_env (AI).

The TUI sets VIRTUFIN_TUI_API_*, VIRTUFIN_TUI_WORKER_API_* and VIRTUFIN_TUI_FORM_DATA for the scripts it runs (Scripts › The env-var contract).