-
Notifications
You must be signed in to change notification settings - Fork 0
Step Declaration
step({
name = "compile",
phase = "build",
scope = "default",
description = "Build the project",
input = { "src/**/*.cpp" },
output = { "build/app" },
mutate = { "src/**/*.cpp" },
config = { optimize = true },
run = "cmake --build build",
})| Field | Type | Description |
|---|---|---|
name |
string | Unique step name (used by -s, order(), tasks) |
phase |
string | Phase label (you choose the name) |
scope |
string | Scope label within the phase |
run |
string or function | Shell command or Lua callback |
| Field | Type | Description |
|---|---|---|
description |
string | Shown in progress UI when set |
input |
string array | Glob patterns of files the step reads |
output |
string array | Glob patterns of files the step creates |
mutate |
string array | Glob patterns of files the step changes in place |
config |
table | Step-specific config (see Configure Step) |
Array fields use Lua list syntax with integer keys:
input = { "src/**/*.cpp", "include/**/*.hpp" }Only string entries are allowed.
run = "ninja -C build"Beez runs the command in the project root via the shell executor (cd <root> && <command>).
Exit code 0 means success. Any other code fails the step.
run = function(ctx)
local files = ctx.glob({ "src/**/*.cpp" })
if #files == 0 then
return 0
end
-- custom logic
return 0
endThe callback receives a step context table (ctx). See Step Context.
| Return | Meaning |
|---|---|
0 or nothing |
Success |
| Non-zero integer | Failure (step fails) |
Non-integer return values are treated as success (0).
On Lua error, Beez prints Lua step error: and the step fails with exit code 1.
Steps with at least one of input, output, or mutate are step-cacheable.
| Pattern | Typical use |
|---|---|
input |
Files whose content is read (hashed for cache key) |
output |
Files created or replaced |
mutate |
Files changed in place (also affects ordering; see Order Declaration) |
Steps without artifact patterns always run (no step cache skip).
Details: Step Cache and Artifact Patterns.
phase and scope group steps for workflows and beez -p. They are free-form strings. See Phases and Scopes.
Simple shell step:
step({
name = "test",
phase = "test",
scope = "unit",
run = "ctest --test-dir build",
})Step with description and artifacts:
step({
name = "link",
phase = "build",
scope = "default",
description = "Link the application",
input = { "build/**/*.o" },
output = { "build/app" },
run = "cmake --build build --target app",
})Lua callback with glob:
step({
name = "lint",
phase = "qa",
scope = "default",
mutate = { "src/**/*.cpp" },
run = function(ctx)
local config = ctx.get_config()
local files = ctx.glob(config.patterns)
-- per-file lint logic
return 0
end,
})-
Step Context -
ctxAPI - Configure Step - external config tables
- Order Declaration - dependencies between steps
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