Skip to content

Contexts

virtufin-tui supports multiple virtufin-api endpoints ("contexts") so you can operate against dev, staging, and prod from the same session.

See getting-started.md for the contexts.toml schema and the XDG-aware file path.

Switching

Press c in the TUI to open the contexts picker. Highlight a context and press Enter to make it active. Switching closes the current gRPC channel and opens new ones; the dashboard refreshes within 1 second.

Programmatic override

For one-off overrides without editing contexts.toml, set the env var VIRTUFIN_TUI_CONTEXT=name. The TUI starts with that context active, ignoring the file's active_context setting.

VIRTUFIN_TUI_API_HOST and VIRTUFIN_TUI_API_PORT override the host/port of the active context (useful for ad-hoc connections to a port-forwarded gRPC server).

Per-context settings

Field Purpose
tls Use TLS for the gRPC channel. Recommended for any non-localhost endpoint.
default_worker_topic If set, the events panel auto-subscribes to this topic on context start. Defaults to subscribing to the topic from the currently-highlighted row.
description Free-form label shown in the picker (e.g. "Production — last deploy 2026-07-05").

Persistence

The contexts picker writes back to contexts.toml on every change. The active_context line is updated. The file is created with mode 0600 on Linux and macOS (XDG default).