Documentation

Environment variables

Environment variables that affect Vectron behavior.

This page documents environment variables that directly affect Vectron. Child process environment composition is configured in vectron.toml.

CLI and tracing

VariableEquivalent optionValues / formatDefaultNotes
VECTRON_LOG--log-leveltracing levelUnsetExamples: trace, debug, info.

--trace-subscriber has no environment variable. Its accepted values are pretty and json, with default pretty.

TUI metrics

These variables are read by vectron start and have the same meaning as the matching CLI options. CLI options override environment values when both are provided.

VariableEquivalent optionValues / formatDefaultNotes
VECTRON_TUI_METRICS--tui-metricson, offonEnables process CPU/RSS metrics in the TUI.
VECTRON_TUI_METRICS_MODE--tui-metrics-modeauto, foreground, background, frozenautoControls metrics behavior with terminal focus.
VECTRON_TUI_METRICS_INTERVAL--tui-metrics-intervalduration1sForeground partial refresh interval.
VECTRON_TUI_METRICS_FULL_SCAN_INTERVAL--tui-metrics-full-scan-intervalduration10sForeground full scan interval.
VECTRON_TUI_METRICS_BACKGROUND_INTERVAL--tui-metrics-background-intervalduration20sBackground partial refresh interval when focus events are supported.
VECTRON_TUI_METRICS_BACKGROUND_FULL_SCAN_INTERVAL--tui-metrics-background-full-scan-intervalduration120sBackground full scan interval when focus events are supported.

Duration values use the same parser as the CLI. Examples: 500ms, 1s, 10s, 120s.

Use vectron doctor --json to inspect the resolved terminal and metrics-related configuration.

Shell completion install paths

vectron completions install uses these variables when --dir is omitted.

VariableUsed forDefault / fallbackNotes
XDG_CONFIG_HOMEFish completion base directoryFalls back to ~/.configFinal path: $XDG_CONFIG_HOME/fish/completions.
XDG_DATA_HOMEBash and Zsh completion base directoryFalls back to ~/.local/shareBash final path: $XDG_DATA_HOME/bash-completion/completions; Zsh final path: $XDG_DATA_HOME/zsh/site-functions.
HOMEUnix home directory resolutionRequired when XDG vars are unsetUsed to resolve ~ fallbacks.
USERPROFILEWindows home directory resolutionUsed by the home resolver on WindowsPresent in the resolver, but Vectron’s main supported development targets are macOS and Linux.

Default completion files:

ShellFile
Bashvectron
Fishvectron.fish
Zsh_vectron

Child process environment

Vectron constructs each child process environment in this order:

  1. parent environment
  2. global.env
  3. global.env_file
  4. process.env
  5. process.env_file
  6. instance-specific variables
  7. variables derived by instance_env_suffix

Relevant configuration fields:

FieldEffect
global.envAdds or overrides variables for all processes.
global.env_fileLoads variables after global.env.
process.envAdds or overrides variables for one process.
process.env_fileLoads variables after process.env.
process.port_envExports the allocated instance port into the named variable.
global.instance_env_suffixDerives per-instance variable names; must contain {index}.
process.instance_env_suffixOverrides the global suffix for one process; must contain {index}.
global.disable_color_envDisables ANSI color-related environment variables in child processes.
process.disable_color_envOverrides color-env behavior for one process.