Skip to main content

Environment variables

Everything Versionx reads from the environment, grouped by category.

Paths and directories

VariableDefaultDescription
VERSIONX_HOMEunsetMaster override. If set, every other path below is derived from this directory. Mirrors the ~/.vers-style layouts users coming from older tools expect.
VERSIONX_CONFIG_HOME$XDG_CONFIG_HOME/versionxUser config directory.
VERSIONX_DATA_HOME$XDG_DATA_HOME/versionxRuntimes, state DB, shims.
VERSIONX_CACHE_HOME$XDG_CACHE_HOME/versionxDownload and resolution cache.
VERSIONX_STATE_HOME$XDG_STATE_HOME/versionxLogs.
VERSIONX_RUNTIME_DIR$XDG_RUNTIME_DIR/versionxDaemon socket. Linux-only.

Daemon

VariableDefaultDescription
VERSIONX_DAEMONautoauto / on / off. Off forces --no-daemon for every invocation.
VERSIONX_DAEMON_SOCKETplatform defaultOverride the daemon socket path.
VERSIONX_DAEMON_TIMEOUT_MS30000Client-side timeout when talking to the daemon.

Logging and tracing

VariableDefaultDescription
VERSIONX_LOGinfotrace / debug / info / warn / error. RUST_LOG is also respected with the same syntax.
VERSIONX_LOG_FORMATautoauto / pretty / json. json emits one JSON object per line.
VERSIONX_OTLP_ENDPOINTunsetOTLP endpoint (e.g., http://localhost:4317). Opt-in.
VERSIONX_OTLP_PROTOCOLgrpcgrpc / http/protobuf.

AI (BYO API key)

VariableDefaultDescription
ANTHROPIC_API_KEYunsetUsed by --ai-changelog and versionx mcp if Anthropic is selected.
OPENAI_API_KEYunsetOpenAI path.
GEMINI_API_KEYunsetGoogle Gemini path.
OLLAMA_BASE_URLunsetLocal Ollama endpoint.
VERSIONX_AI_PROVIDERunsetExplicit provider selection when multiple are configured.

Versionx never calls an LLM unless one of these is set.

GitHub

VariableDefaultDescription
GITHUB_TOKENunsetUsed by versionx-github for API calls. Standard GitHub Actions usage.
VERSIONX_GH_APP_IDunsetApp-mode authentication (1.1+).
VERSIONX_GH_APP_PRIVATE_KEYunsetApp-mode private key path.

Networking

VariableDefaultDescription
HTTP_PROXY / HTTPS_PROXY / NO_PROXYunsetStandard proxy envs honored by reqwest.
VERSIONX_OFFLINE01 forces offline mode — no downloads, no network probes.

CI detection

VariableDefaultDescription
CIunsetStandard flag. When set, Versionx defaults to --no-daemon, disables color, and uses --output json for structured steps.

Shim dispatch

VariableDefaultDescription
VERSIONX_SHIM_DEBUG01 logs the shim's dispatch decision to stderr — useful for debugging "wrong version" issues.
VERSIONX_SHIM_CACHE$VERSIONX_DATA_HOME/shim-cache.binPath to the mmap'd PATH cache.

See also