Skip to content

Environment Variables

Configuration variables

VariableDefaultDescription
PIPE_MAX_PARALLEL0 (unlimited)Maximum number of parallel commands/sub-runs per step
PIPE_LOG_ROTATE10Number of log files to keep per pipeline (0 = keep all)
PIPE_STATE_ROTATE10Number of state files to keep per pipeline (0 = keep all)
PIPEHUB_URLhttps://hub.getpipe.devHub API base URL
PIPE_EXPERIMENTAL_UNSAFE_VARSunsetDisable the vars contract — allow override sources to introduce keys not declared in vars (see Variables)
PIPE_EXPERIMENTAL_PRESERVE_INTERACTIVE_OUTPUTunsetKeep interactive step session output visible after the step finishes (by default, output is cleared and only the status line remains)

Step output variables

Each single-command step’s stdout is captured and exposed as an environment variable:

PIPE_<STEP_ID>

Hyphens in the step ID become underscores, and the name is uppercased.

Step IDEnvironment Variable
get-versionPIPE_GET_VERSION
buildPIPE_BUILD
fetch-dataPIPE_FETCH_DATA

For named sub-runs, each sub-run produces its own variable:

PIPE_<STEP_ID>_<SUBRUN_ID>
Step IDSub-run IDEnvironment Variable
fetchapi-versionPIPE_FETCH_API_VERSION
buildlinuxPIPE_BUILD_LINUX

User-defined variables

Variables declared in the vars section are exposed as:

PIPE_VAR_<KEY>
Var KeyEnvironment Variable
namePIPE_VAR_NAME
registryPIPE_VAR_REGISTRY
deploy-targetPIPE_VAR_DEPLOY_TARGET

Only keys declared in the vars block are accepted. Override sources that provide keys not declared in vars are ignored with a warning. See Variables & Templating for the full contract.

Loading variables from a .env file

When a pipeline specifies dot_file, variables are loaded from the given .env file. Keys use plain NAME=value format and are matched against the vars block:

.env
registry=docker.io/myorg
env=production

.env file values override YAML defaults but are overridden by PIPE_VAR_* environment variables and CLI arguments. Keys not declared in vars are ignored with a warning.

Overriding variables via environment

You can override a pipeline’s declared variable by setting the corresponding PIPE_VAR_* environment variable before running:

Terminal window
export PIPE_VAR_REGISTRY=ghcr.io/myorg
pipe deploy

This takes precedence over the YAML default and .env file values, but is overridden by CLI arguments. PIPE_VAR_* variables that don’t match any declared var generate a warning.

See Variables & Templating for the full precedence chain.