Skip to content

Environment variables

You rarely need any of these. Each one changes a default you can usually also set with a flag.

Variables apply to commands you run in a terminal. The background app does not see variables you set in a terminal:

  • On macOS and Linux, it sees only HOME, PATH and the state folder chosen at install, so it uses each agent’s default folders.
  • On Windows, it is started by Windows when you sign in, not from your PowerShell window, so variables you set with $env: in a window do not reach it.

To make the background app use a different state folder, set COMMANDCHAIN_RUNNER_STATE_DIR when you run the install command.

VariableWhat it changes
COMMANDCHAIN_URLThe CommandChain address used by commandchain-runner, commandchain-runner logout and the installers when you do not pass one. A url argument or --server option wins over it. commandchain-runner status and commandchain-runner sessions-connect do not read it: status shows every saved connection, or the one you name with --url, and sessions-connect uses the hosted CommandChain unless you pass a url.
COMMANDCHAIN_RUNNER_STATE_DIRThe folder CommandChain uses on this computer. Default: ~/.commandchain (Windows: %USERPROFILE%\.commandchain). Must be an absolute path.
LOG_LEVELHow much the app writes to its log. Set it to debug when you capture a log for a bug report. Default: info.
COMMANDCHAIN_RUNNER_PLAINSet to 1 to print plain log lines instead of the friendly text, like --plain.
COMMANDCHAIN_AUTO_UPDATETurns automatic updates off with 0, false, off or no, and on with 1, true, on or yes. It wins over commandchain-runner update --auto, and --no-auto-update wins over it. The background app does not see it, so to turn updates off there, run commandchain-runner update --auto off. See Automatic updates.
COMMANDCHAIN_CLAUDE_PATHThe Claude Code program commandchain-runner claude-integration uses, when claude on your PATH is not the one you want.

The app reads these the same way the agents do, so set them only if you already set them for the agent.

VariableWhat it changes
CLAUDE_CONFIG_DIRClaude Code’s configuration folder. Default: ~/.claude.
CODEX_HOMECodex’s folder. Default: ~/.codex.
COPILOT_HOMEGitHub Copilot’s folder, where its saved sessions are found. Default: ~/.copilot.
CURSOR_CONFIG_DIRCursor’s configuration folder, where its saved sessions are found.
VariableWhat it changes
COMMANDCHAIN_RUNNER_VERSIONThe release to install, like --version (Windows: -Version). Default: the latest.
COMMANDCHAIN_RUNNER_NAMEThe computer name, like --display-name (Windows: -DisplayName).
COMMANDCHAIN_INSTALL_PREFIXWhere the program goes. Default: $HOME/.local/bin on macOS and Linux, %LOCALAPPDATA%\Programs\CommandChain on Windows.