Repository navigation
Selecting with Phases and Scopes
This page covers how workflows and the CLI select phase+scope pairs and what syntax is supported.
A workflow is a list of phase+scope invocations. Each entry must include both fields:
workflow("build", {
{ phase = "configure", scope = "default" },
{ phase = "build", scope = "default" },
{ phase = "test", scope = "unit" },
})beez buildEntries run in list order. Each entry waits for the previous one to finish.
workflow("pipeline", {
{ phase = "generate", scope = "code" },
{ phase = "compile", scope = "code" },
})Run several pairs at the same time:
workflow("ci", {
{ parallel = {
{ phase = "generate", scope = "docs" },
{ phase = "generate", scope = "code" },
}},
{ phase = "compile", scope = "code" },
})Timeline:
generate:docs -----|
generate:code -----| parallel
v
compile:code -----
Each table inside parallel needs phase and scope. An empty parallel table is a load error.
Run steps by phase without defining a workflow:
beez -p build:default
beez -p test:unit,integration
beez -p generate| Form | Example | Behavior |
|---|---|---|
phase |
beez -p build |
All scopes for build, sorted alphabetically, run one after another |
phase:scope |
beez -p build:default |
One scope |
phase:s1,s2 |
beez -p test:unit,integration |
Listed scopes, in order |
phase["s1","s2"] |
beez -p generate["code","docs"] |
Same as comma form; quotes required |
These fail at CLI parse time:
| Input | Problem |
|---|---|
| (empty) | No phase |
:code |
Missing phase |
build: |
Missing scope after colon |
build:unit, |
Trailing comma |
beez -p build discovers scopes from registered steps and sorts them alphabetically. You do not control order except by naming scopes or listing them explicitly:
beez -p build:zebra,alpha # runs zebra, then alpha (your order)
beez -p build # runs alpha, then zebra (alphabetical)beez --list phasesExample output:
phases:
| Phase | Scopes |
|----------|---------------------|
| build | [debug, default] |
| test | [integration, unit] |
beez --list stepsShows each step's name, phase, scope, and description.
| Workflow | -p |
Task / -s
|
|
|---|---|---|---|
| Defined in | build.lua |
CLI only |
build.lua + CLI |
| Selects by | phase+scope pairs | phase+scope pairs | step name or shell |
| Parallel scopes |
parallel in workflow |
No (scopes sequential) | No |
| Reusable name | beez ci |
Repeat full -p arg |
beez my-task |
If you pass multiple run modes, Beez uses this priority:
--list-
-s/--step -
-p/--phase - Positional workflow/task target
See CLI Overview.
Run one toolchain variant:
beez -p configure:debug
beez -p build:debugRun all tests:
beez -p testCI workflow with parallel codegen:
workflow("ci", {
{ parallel = {
{ phase = "generate", scope = "api" },
{ phase = "generate", scope = "client" },
}},
{ phase = "build", scope = "default" },
{ phase = "test", scope = "unit" },
})beez ci- How Phases and Scopes Work - matching and execution model
- Workflow Declaration - full workflow DSL
- Filtering by Phase - CLI flag details
-
Running a Single Step -
-sbypasses phase selection
Quick Reference · Glossary · FAQ
- Fundamentals
- Core Concepts
- Project Layout
- First Pipeline
- Phases and Scopes
- How Phases and Scopes Work
- Selecting with Phases and Scopes
- Designing Phases and Scopes
- Parallel Execution and Dependencies
- Configuration
- Configuration Overview
- Global User Config
- Project Config
- Environment Variables
- Performance Settings
- Cache Settings
- Config Reference
- CLI
- CLI Overview
- Running Targets
- Filtering by Phase
- Running a Single Step
- Listing Entities
- Output and Logging Flags
- Cache and Maintenance Flags
- Meta and Utility Commands
-
Project Scaffolding —
beez --init(embedded Tempify) - CLI Flag Reference
- Lua DSL
- DSL Overview
- Plugin System — Plugins, Config DSL, Standard-Workflows
- Step Declaration
- Task Declaration
- Workflow Declaration
- Order Declaration
- Configure Step
- ReqPack Declaration
- Beez API
- Step Context
- DSL Patterns
- Caching
- Caching Overview
- Step Cache
- Success Cache
- Glob Metadata Cache
- Artifact Patterns
- Cache Keys and Invalidation
- Cache Storage and Maintenance
- Caching Troubleshooting
- UI and Output
- Output Modes
- Progress and Animation
- Colors and Themes
- Run Summaries
- Logging and Log Files
- Development and Contribution
- Building and Setup
- Repository Layout
- Testing
- Code Quality
- Feature Development Workflow
- Submitting Changes