Skip to content

Filtering by Phase

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

Filtering by Phase

Use -p or --phase to run steps by phase and optional scope, without defining a workflow for that combination.

beez -p compile
beez -p compile:code
beez -p test:unit,integration
beez -p generate["code","docs"]

Syntax forms

Phase only

beez -p compile

Runs all scopes that exist for phase compile. Beez discovers scopes from registered steps.

If no steps use that phase, the run succeeds with nothing to do.

Colon form

beez -p phase:scope
beez -p phase:scope1,scope2

Runs the listed scopes in order, one after another. Each scope runs all matching steps (with parallelism and order() inside that phase+scope).

Examples:

beez -p generate:code
beez -p test:unit,integration

Bracket form

beez -p phase["scope1","scope2"]

Same as colon form for multiple scopes. Useful when scope names contain special characters.

Example:

beez -p generate["code","docs"]

Invalid syntax

These fail at parse time (exit code 1):

Input Problem
(empty) No phase
:code Missing phase name
generate: Missing scope after colon
generate:code, Trailing comma
Malformed brackets Unclosed [ or invalid quotes

What gets executed

For each selected phase+scope pair, Beez:

  1. Collects all steps where step.phase and step.scope match
  2. Orders them with order() and mutate rules
  3. Runs each level (parallel steps within a level)

See Parallel Execution and Dependencies.

Scopes run sequentially

When you pass multiple scopes (test:unit,integration or bracket form), Beez runs unit completely, then integration. It does not run those scopes in parallel. Use a workflow with { parallel = { ... } } for that.

Examples

Single scope:

beez -p generate:code

All scopes for a phase:

beez -p generate

Multiple scopes in sequence:

beez -p test:unit,integration

With flags:

beez -p compile:code --verbose --no-cache

Discover phases and scopes

beez --list phases
beez --list steps

The phases table shows each phase and its scopes as registered by your steps.

Next steps

Clone this wiki locally