dibbla run
Execute a `dibbla-task.yaml` pipeline locally — from a file, a URL, or as a preview without running anything. Supports per-step platform filters, dependencies, env injection, and GitHub Actions-style output.
dibbla run executes a dibbla-task.yaml pipeline on your machine. The pipeline is a list of steps — command, tool_check, or write_env — with dependencies, platform filters, and per-step env vars.
The argument is one of:
- omitted — runs
./dibbla-task.yamlfrom the current directory. - a local path — runs the given file. The default working directory is the file’s parent.
- an HTTPS URL — fetches the YAML (5 MB max, 30 s timeout) and runs it. The default working directory is the invocation CWD, not a temp dir, so bootstrap pipelines can clone projects into your current directory.
Flags
| Flag | Purpose |
|---|---|
[path-or-url] (positional) | Local path, HTTPS URL, or omitted (defaults to ./dibbla-task.yaml). |
--preview | Parse and print the execution plan without running anything. |
--env KEY=VAL | Set or override an env var for the steps. Repeatable. |
--env-file <path> | Load env vars from a .env-style file. |
--work-dir <dir> | Override the working directory for command steps. |
--format plain|gh | Output format. plain (default) is human-readable; gh emits GitHub Actions workflow commands — easy to parse line-by-line. |
Examples
# Run ./dibbla-task.yaml from CWD $dibbla run
$dibbla run ./pipelines/build.yaml # Fetch & run a hosted bootstrap $dibbla run https://templates.dibbla.com/expense-reporter/bootstrap.yaml
# lists every step in the file — including ones your OS will skip $dibbla run --preview Execution plan: 1. write-env write_env Write .env File 2. verify-go tool_check Verify Go tool=go 3. build command Build Backend 4. test command Run Tests Env vars: DATABASE_URL API_KEY (required)
$dibbla run \ --env API_KEY=$STAGING_KEY \ --env-file ./.env.staging
# Pipeable into log parsers $dibbla run --format gh ::group::Build Backend ::debug::Running: go build -o ./bin/server ./cmd/server ::notice title=Step Succeeded::Step "Build Backend" completed in 2.1s ::endgroup::
When the argument is an HTTPS URL, dibbla run fetches the YAML and
executes its shell commands on your machine. Only run YAMLs from sources
you trust. Use --preview first to see what the pipeline will do.
Env precedence
--env-file is the base layer and --env KEY=value flags override individual keys. If a key appears in more than one --env flag, the last one wins.
The same rule applies to dibbla deploy --env-file, dibbla apps update --env-file, and dibbla secrets import, so the behaviour is identical wherever you can hand the CLI a file. The accepted file grammar is documented once, under .env file format.
Auto-injected environment
Every step receives these in addition to your shell env, --env, and --env-file:
| Variable | Purpose |
|---|---|
DIBBLA_API_TOKEN | Set when you’re logged in. Lets steps call other dibbla commands without a fresh login. |
DIBBLA_AUTH_SERVICE_URL | Mirror of DIBBLA_API_URL, set when logged in. |
DIBBLA_CMD | Path to the running dibbla binary. Bootstrap pipelines use this to recursively invoke the same binary, regardless of $PATH. |
Exit codes
| Code | Meaning |
|---|---|
0 | All steps succeeded (or non-blocking failures with continue_on_error: true). |
1 | A step failed, the YAML failed to parse, or setup (env resolution, network fetch) failed. |
dibbla-task.yaml at a glance
A dibbla-task.yaml file declares pipeline-level env vars, named tools, and a list of steps. The full schema is documented in the dibbla-tasks SPEC; the essentials below cover what you’ll write 90% of the time.
Top-level fields
| Field | Type | Required | Description |
|---|---|---|---|
version | string | yes | Format version. Currently only "1". |
env | map | no | Pipeline-level env var declarations (description, default, required). |
ports | map | no | Named ports allocated at run time; each name becomes an env var holding the chosen port. |
tools | map | no | Named tool definitions used by tool_check steps. |
steps | list | yes | Ordered list of steps. Must contain at least one. |
Step types
| Type | Purpose |
|---|---|
command | Run a shell command. Required field: run (string or platform map). Optional mode: foreground (default), background, terminal. |
tool_check | Verify a tool is installed; if missing, run the platform-appropriate install command from the matching tools entry. |
write_env | Write resolved pipeline-level env vars to a .env file (defaults to ./.env). |
Step fields
| Field | Purpose |
|---|---|
id (required) | Stable slug used for depends_on references. |
name (required) | Display label. |
type (required) | command, tool_check, or write_env. |
run | Shell command (string) or per-platform map keyed by darwin, linux, windows. |
mode | command only. foreground (default), background, or terminal. |
tool | tool_check only. References a key in the top-level tools map. |
env | Step-level env vars merged with the runner-level env. |
env_file | write_env only. Output filename. Default .env. |
working_dir | Override the working directory for this step. |
platforms | Restrict to listed platforms. Filtered-out steps are removed from the plan; downstream depends_on references to them are pruned automatically. |
depends_on | Step IDs that must complete successfully first. |
continue_on_error | If true, downstream steps run even if this step fails. |
retry | max_attempts, delay (e.g. 3s), and on_output to retry only when the failure output contains a given substring. |
Example
version: "1"
env:
DATABASE_URL:
description: "PostgreSQL connection string"
default: "postgres://localhost:5432/app"
API_KEY:
description: "Third-party API key"
required: true
tools:
go:
check: "go version"
install:
darwin: "brew install go"
linux: "sudo apt-get install -y golang"
steps:
- id: write-env
name: "Write .env File"
type: write_env
- id: verify-go
name: "Verify Go"
type: tool_check
tool: go
- id: build
name: "Build Backend"
type: command
run: "go build -o ./bin/server ./cmd/server"
env:
CGO_ENABLED: "0"
depends_on: ["verify-go", "write-env"]
- id: test
name: "Run Tests"
type: command
run: "go test ./..."
depends_on: ["build"]
- id: dev-server
name: "Start Dev Server"
type: command
mode: terminal
run: "npm run dev"
working_dir: "./frontend"
depends_on: ["build"] Execution order
Steps run in dependency order (topological sort). Rules:
- A step waits for every entry in its
depends_onlist to succeed. - If a dependency fails without
continue_on_error: true, downstream steps are skipped. - Circular dependencies fail before any step executes.
- Platform-filtered steps are removed before sorting;
depends_onreferences to them are pruned.
See also
dibbla template— bootstrap pipelines are the engine behinddibbla template install.dibbla-tasksSPEC — the canonical schema and output-format reference.