-
Notifications
You must be signed in to change notification settings - Fork 0
Lua API Workers
Leonard Ramminger edited this page Aug 10, 2026
·
1 revision
Run shell commands in the background inside a Lua step callback.
Only available in step({ run = function(ctx) ... end }).
| Field | Required | Type |
|---|---|---|
cmd |
yes |
string or { string, ... }
|
inputs |
no | glob list for cache inputs |
outputs |
no | glob list for cache outputs |
name |
no | override auto name {step}-{n}
|
Returns: worker handle (number).
Wait for one worker. Pass an options table to select return fields:
| Option | Return field |
|---|---|
exitCode |
result.exitCode |
output |
result.output (captured stdout/stderr) |
duration |
result.duration |
cached |
result.cached |
name |
result.name |
id |
result.id |
dryRun |
result.dryRun |
Same options for every handle. Returns 1-based array of result tables in handle order.
step({
name = "compile",
phase = "build",
scope = "cpp",
run = function(ctx)
local jobs = {}
for _, src in ipairs(beez.fs.glob("src/**/*.cpp")) do
jobs[#jobs + 1] = ctx:spawn({ cmd = "g++ -c " .. src })
end
for _, result in ipairs(ctx:wait_all(jobs, { exitCode = true })) do
if result.exitCode ~= 0 then error("compile failed") end
end
return 0
end,
})Full reference: docs/worker-api.md
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