Skip to content

Running Targets

Leonard Ramminger edited this page Aug 9, 2026 · 1 revision

Running Targets

A target is the positional argument after options: a task or workflow name registered in build.lua.

beez build
beez ci
beez format

Task vs workflow

Beez looks up the name in this order:

  1. Task - if a task with that name exists, run it
  2. Workflow - otherwise, if a workflow exists, run it
  3. Not found - exit with an error

If a task and workflow share the same name, the task wins.

What each type does

Type Behavior
Task Runs shell commands and/or step references sequentially
Workflow Runs an ordered sequence of phase+scope pairs (with optional parallel groups)

See Core Concepts for how tasks and workflows are defined.

Unknown targets

If the name is not found:

Error: name not found in registry

When a similar task or workflow name exists (edit distance within a small threshold), Beez suggests:

Did you mean 'build'?

Suggestions only consider task and workflow names, not step names.

Combining with flags

Flags apply to the whole run:

beez build --verbose
beez ci --no-cache -j 4
beez deploy --dry-run

Flag order relative to the target does not matter:

beez --verbose build
beez build --verbose

Target vs -p / -s

Form Runs
beez build Named task or workflow
beez -p compile:code All steps for that phase+scope
beez -s compile One step by name

If you pass -s or -p, the positional target is ignored for execution (list/step/phase modes take priority). See CLI Overview.

Examples

Task (shell only):

task("hello", "echo hello")
beez hello

Workflow:

workflow("ci", {
    { phase = "test", scope = "unit" },
    { phase = "lint", scope = "default" },
})
beez ci

Next steps

Clone this wiki locally