Reference · Machines and disk
Environment variables
Every environment variable Turret reads, and what setting it changes.
Most variables Turret defines for itself are read once, at launch. A change made while Turret is already running has no effect on those until the next launch.
TURRET_CODEX_BINARY and TURRET_AGENT_HARNESS_BINARY differ from the rest of Turret's own
variables. Each is read fresh on every engine readiness check, so a change reaches the next
check the Vendors panel runs. Neither needs Turret itself restarted.
CODEX_HOME and CLAUDE_CONFIG_DIR differ the same way. Turret reads each live, at the point
it needs to match the engine whose variable it is. A change reaches the next session that
engine starts.
| Variable | What it does | Defined by |
|---|---|---|
TURRET_USER_DATA_DIR |
Overrides Electron's userData directory. Set on every worktree launch so each one keeps its own sessions, settings and grants. | Turret |
TURRET_TAILNET_LIVE |
Set to 1 to let a launch with TURRET_USER_DATA_DIR start the real Tailscale sidecar, which such a launch refuses by default. For a manual live check from a worktree; no test sets it. | Turret |
TURRET_CODEX_BINARY |
Overrides the path binary discovery searches for the Codex CLI. | Turret |
TURRET_AGENT_HARNESS_BINARY |
Overrides the path to the agent-harness binary, shared by the DeepSeek, Gemini and Claude API engines. On Android the app's shell sets it to the harness it ships, which is treated as the packaged binary rather than an override. | Turret |
TURRET_AGENT_HARNESS_PRICES |
Overrides the path to the agent-harness engines' shared price table, resolved relative to the current directory. | Turret |
TURRET_AGENT_HARNESS_RG |
Overrides the path to the ripgrep binary the agent-harness engines' Grep tool runs, resolved relative to the current directory. | Turret |
TURRET_BACKGROUND_LAUNCH |
Set to 1 to open the window without taking focus, so a worktree launched while you work somewhere else leaves you where you are. The window is still on screen — TURRET_NO_ACTIVATE is what keeps one off it. |
Turret |
TURRET_DISABLE_GPU |
Set to 1 to turn off GPU hardware acceleration for the whole app. A safety valve for a Linux box whose graphics driver crashes Chromium’s GPU process outright rather than falling back to software rendering on its own. |
Turret |
TURRET_SUDO_TOKEN |
Set by Turret on a session's environment when a sudo password is stored: the token the askpass helper sends to say which session is asking. Not for setting by hand. | Turret |
TURRET_SUDO_SOCKET |
Set by Turret on a session's environment when a sudo password is stored: the unix socket the askpass helper connects to. Not for setting by hand. | Turret |
TURRET_NO_ACTIVATE |
Set to 1 to keep the app out of the Dock and the app switcher, and to open its windows fully transparent, click-through and unable to take the keyboard. The Playwright suite sets it so a run leaves the screen it runs on alone. |
Turret |
TURRET_TEST_HOOKS |
Set to 1 to expose main-process hooks on globalThis.__turretTestHooks for the Playwright suite to call, and to let TURRET_FAKE_GOOGLE_DRIVE take effect. |
Turret |
TURRET_FAKE_GOOGLE_DRIVE |
Set to 1, with TURRET_TEST_HOOKS=1, to run Google Drive sync against an in-memory Drive that is already signed in, for an end-to-end spec or screenshots. Ignored otherwise. |
Turret |
TURRET_GOOGLE_DRIVE_CLIENT_ID |
Turret's own Google OAuth client id for Google Drive, a Desktop app client. Read when the app is built, and baked in; a build without it offers no Google Drive. | Turret |
TURRET_GOOGLE_DRIVE_CLIENT_SECRET |
That client's secret, which Google treats as non-confidential for an installed app. Read and baked in with the id. | Turret |
TURRET_GOOGLE_DRIVE_TESTING |
Set to 1 while Google has not yet verified the client's drive scope, so Settings says why Google asks everyone to sign in again each week. |
Turret |
TURRET_MOBILE_PORT |
Overrides the port a desktop's peer server binds. | Turret |
TURRET_TELEGRAM_API_BASE |
Points Telegram calls at another Bot API server, in place of https://api.telegram.org. Only a loopback address is honoured. The Playwright suite sets it so e2e/telegram.spec.ts talks to a fake. |
Turret |
TURRET_SLACK_API_BASE |
Points Slack Web API calls at another server, in place of https://slack.com/api. Only a loopback address is honoured, so a token is never sent anywhere else. For a fake Slack in a test; no shipped test sets it yet. |
Turret |
TURRET_PEER_SERVICE_TYPE |
Overrides the mDNS service type peer discovery advertises and browses, in place of turret. The Playwright suite sets it so the instances it launches never appear on a real Turret on the same network. A launch with TURRET_USER_DATA_DIR advertises only while this is set. |
Turret |
TURRET_DEFAULT_CWD |
Overrides the working directory a session opens in when none is given, in place of the user's home directory. | Turret |
TURRET_UPDATES_BASE_URL |
Overrides where an update check and download are fetched from. | Turret |
TURRET_API_PROXY_PORT |
Overrides the local proxy's port in front of the Anthropic API. | Turret |
TURRET_API_LOG |
Set to turn on logging of every call through the local Anthropic API proxy. | Turret |
TURRET_SKIP_AGENT_HARNESS |
Set to 1 to package the app without staging a Gemini binary, for a checkout with no agent-harness beside it. |
Turret |
CODEX_HOME |
Codex's own config directory. Turret reads it to find the same config and auth Codex's own CLI uses, rather than assuming ~/.codex. |
The engine it names |
CLAUDE_CONFIG_DIR |
Claude Code's own config directory, read the same way for the same reason. | The engine it names |
ANTHROPIC_BASE_URL |
A non-default Anthropic API base URL, passed through to the local proxy in front of it. | The engine it names |
TURRET_USER_DATA_DIR is what a worktree launch sets to give itself its own sessions,
settings and grants, separate from every other checkout's. See
What a session leaves on disk for the folder it overrides.