We've raised a $22m Series A →Skip to docs content
Conductor

Reference

Conductor environment variables

Variables available to terminals and scripts in a workspace

Conductor makes these environment variables available in workspace terminals and scripts.

VariableDescription
CONDUCTOR_WORKSPACE_NAMEWorkspace name
CONDUCTOR_WORKSPACE_PATHWorkspace path
CONDUCTOR_ROOT_PATHPath to the repository root directory
CONDUCTOR_DEFAULT_BRANCHName of the default branch, usually main
CONDUCTOR_PORTFirst port in a range of 10 ports assigned to the workspace

Common uses

Use CONDUCTOR_ROOT_PATH when a setup script needs a file from the repository root:

ln -s "$CONDUCTOR_ROOT_PATH/.env" .env

Use 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.

On this page