wf run¶
Execute a workflow.
Synopsis¶
<workflow> is the workflow name (the .toml filename without extension).
Flags¶
| Flag | Type | Default | Description |
|---|---|---|---|
--parallel | bool | false | Enable level-based parallel execution |
--work-stealing | bool | false | Enable work-stealing scheduler (dependency-driven) |
--max-parallel | int | 4 | Maximum number of concurrently running tasks |
--timeout | duration | none | Maximum wall-clock time for the entire run |
--var | string | — | Set a runtime variable (KEY=VALUE). Repeatable. |
--print-output | bool | false | Print each task's stdout/stderr after it completes |
--clean-env | bool | false | Start all tasks with an empty environment (global override) |
--dry-run | bool | false | Print the execution plan without running any tasks |
--json, -j | bool | false | Output the execution plan as JSON (requires --dry-run) |
Execution Modes¶
Only one of --parallel and --work-stealing can be specified at a time.
Tasks within the same topological level run concurrently.
Runtime Variables¶
Variables are available as {{.TARGET_ENV}} and {{.VERSION}} in task commands and if conditions.
Timeout¶
Duration syntax: 30s, 5m, 1h30m, 24h. When the timeout fires, all running tasks are killed and the run is marked cancelled.
Print Output¶
By default, task output is written to log files only. With --print-output, each task's stdout and stderr are buffered and printed atomically to the terminal after the task completes. Output is capped at 64 KiB per task on the terminal; the full output is always in the log file.
Dry Run¶
Prints the resolved execution plan (task order, dependencies, levels) without executing any task.
Clean Environment¶
Overrides all tasks in the workflow to start with an empty environment. Individual tasks can also set clean_env = true in the TOML.
Examples¶
# Basic run
wf run cicd-pipeline
# Full production run
wf run cicd-pipeline \
--work-stealing \
--max-parallel 8 \
--timeout 30m \
--print-output \
--var REGISTRY=ghcr.io/myorg \
--var TAG=$(git rev-parse --short HEAD)
# Check what would run
wf run cicd-pipeline --dry-run
# Debug mode
wf --log-level debug run my-workflow
Exit Codes¶
| Code | Meaning |
|---|---|
0 | Workflow completed successfully |
1 | One or more tasks failed |
2 | Workflow definition is invalid |
130 | Interrupted (Ctrl+C) |