Conductor environment variables
Variables available to workspace terminals, agents, and scripts
Conductor makes these environment variables available in workspace terminals,
agents, and scripts. Cloud workspaces do not receive
CONDUCTOR_PORT or CONDUCTOR_DEFAULT_BRANCH; see cloud workspace environment
variables for cloud-specific details.
| Variable | Description |
|---|---|
CONDUCTOR_WORKSPACE_NAME | Workspace display name. Local workspaces fall back to their directory name; cloud workspaces set it only when a display name is available. |
CONDUCTOR_WORKSPACE_PATH | Workspace path. |
CONDUCTOR_ROOT_PATH | Repository root path. In a cloud workspace, this is the same as CONDUCTOR_WORKSPACE_PATH. |
CONDUCTOR_DEFAULT_BRANCH | Target branch for local workspaces, usually main. Not set in cloud workspaces. |
CONDUCTOR_BASE_DIR | Parent directory of the cloud workspace. Not set in local workspaces. |
CONDUCTOR_PORT | First port in a range of 10 ports assigned to a local workspace. Not set in cloud workspaces. |
CONDUCTOR_IS_LOCAL | 1 in local workspaces and 0 in cloud workspaces. |
CONDUCTOR_API_URL | Conductor API base URL. Set in every cloud workspace and not set in local workspaces. |
CONDUCTOR_API_TOKEN | Workspace-scoped API token in new machine-launched cloud workspaces by default. Each user can configure automatic API access separately for each organization in Settings → General. Changes affect only new workspaces; existing workspaces and tokens are unchanged. Not set automatically in other cloud or local workspaces. |
CONDUCTOR_API_KEY | Your own Conductor API key when you configure one; it takes precedence over the workspace token. When you don't supply your own, workspaces that receive an automatic token also set it here, and older cloud workspaces set their automatic workspace-scoped credential only here. |
CONDUCTOR_SESSION_ID | Current session ID in agent processes on current workspaces. It is not available to setup scripts or ordinary terminal processes, and older cloud sandboxes may not have it. Send it as the optional X-Conductor-Session-Id API header. |
Configure custom variables
Add custom variables in Conductor's settings:
- For every repository, open
Settings->Environment. - For one repository, select the repository in the Settings sidebar and open its Environment tab. A repository variable overrides a user variable with the same name in that repository.
Conductor passes these variables to local agents, terminals, setup scripts, and actions. It saves the values securely on your Mac, so they can hold secrets. You can also add env files to load variables from a file.
For cloud workspaces, see cloud workspace environment variables.
Common uses
Use CONDUCTOR_ROOT_PATH when a setup script needs a file from the repository root:
ln -s "$CONDUCTOR_ROOT_PATH/.env" .envUse CONDUCTOR_PORT when multiple workspaces need to run the same app without port conflicts:
npm run dev -- --port "$CONDUCTOR_PORT"For script behavior, see Scripts.