Conductor environment variables
Variables available to terminals and scripts in a workspace
Conductor makes these environment variables available in workspace terminals and scripts.
| Variable | Description |
|---|---|
CONDUCTOR_WORKSPACE_NAME | Workspace name |
CONDUCTOR_WORKSPACE_PATH | Workspace path |
CONDUCTOR_ROOT_PATH | Path to the repository root directory |
CONDUCTOR_DEFAULT_BRANCH | Name of the default branch, usually main |
CONDUCTOR_PORT | First port in a range of 10 ports assigned to the workspace |
Configure custom variables
Use settings when every agent, terminal, setup script, or run script in a repository needs the same custom environment variables:
"$schema" = "https://conductor.build/schemas/settings.repo.schema.json"
[environment_variables]
API_BASE_URL = "http://localhost:3000"
[environment_variables.local]
CONDUCTOR_TARGET = "local"
[environment_variables.cloud]
CONDUCTOR_TARGET = "cloud"Use environment_variables for values shared by local and cloud agents. Use environment_variables.local and environment_variables.cloud when a value should only apply to one execution environment. Do not commit secrets to .conductor/settings.toml; use .conductor/settings.local.toml for machine-local secret values. For the full key reference, see Settings reference.
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.