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,PATHand 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.
The CommandChain app
Section titled “The CommandChain app”| Variable | What it changes |
|---|---|
COMMANDCHAIN_URL | The 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_DIR | The folder CommandChain uses on this computer. Default: ~/.commandchain (Windows: %USERPROFILE%\.commandchain). Must be an absolute path. |
LOG_LEVEL | How much the app writes to its log. Set it to debug when you capture a log for a bug report. Default: info. |
COMMANDCHAIN_RUNNER_PLAIN | Set to 1 to print plain log lines instead of the friendly text, like --plain. |
COMMANDCHAIN_AUTO_UPDATE | Turns 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_PATH | The Claude Code program commandchain-runner claude-integration uses, when claude on your PATH is not the one you want. |
Agent folders
Section titled “Agent folders”The app reads these the same way the agents do, so set them only if you already set them for the agent.
| Variable | What it changes |
|---|---|
CLAUDE_CONFIG_DIR | Claude Code’s configuration folder. Default: ~/.claude. |
CODEX_HOME | Codex’s folder. Default: ~/.codex. |
COPILOT_HOME | GitHub Copilot’s folder, where its saved sessions are found. Default: ~/.copilot. |
CURSOR_CONFIG_DIR | Cursor’s configuration folder, where its saved sessions are found. |
Installers only
Section titled “Installers only”| Variable | What it changes |
|---|---|
COMMANDCHAIN_RUNNER_VERSION | The release to install, like --version (Windows: -Version). Default: the latest. |
COMMANDCHAIN_RUNNER_NAME | The computer name, like --display-name (Windows: -DisplayName). |
COMMANDCHAIN_INSTALL_PREFIX | Where the program goes. Default: $HOME/.local/bin on macOS and Linux, %LOCALAPPDATA%\Programs\CommandChain on Windows. |