Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Lua API Overview
Leonard Ramminger edited this page Aug 10, 2026
·
1 revision
Beez scripts (build.lua) and Lua step callbacks have access to a global beez table. Use it to read configuration, touch the filesystem, fetch URLs, hash artifacts, and more — without shelling out for every task.
All file paths in the Lua API are relative to the project root (the directory that contains build.lua).
| Module | Example | What it does |
|---|---|---|
beez.env | beez.env("TOKEN") | Environment variables and .env |
beez.config | beez.config({ cache = { ... } }) | Project settings |
beez.fs | beez.fs.glob("src/**/*.cpp") | Files and directories |
beez.crypto | beez.crypto.hash_file("app.zip") | Hashes and encodings |
beez.sys | beez.sys.cpu_threads() | Host information |
beez.time | beez.time.now() | Clock and sleep |
beez.date | beez.date.format("%Y-%m-%d") | Calendar formatting |
beez.data | beez.data.deserialize_file("cfg.json") | JSON/YAML/XML/CSV/TOML |
beez.net | beez.net.get(url, headers) | HTTP and downloads |
beez.archive | beez.archive.compress("dist", "out.zip") | zip/tar archives |
beez.text | beez.text.template("Hello {{name}}", vars) | Strings and templates |
| Workers | ctx:spawn({ cmd = "make" }) | Background shell in a step |
Developer reference (same content, in-repo): docs/lua-api-overview.md
| Context | beez.* | ctx:spawn / wait |
|---|---|---|
Top-level build.lua | yes | no |
step({ run = function(ctx) ... }) | yes | yes |
- Invalid arguments and I/O errors usually throw a Lua error.
beez.net.*REST helpers return{ ok = false }for HTTP 4xx/5xx; network failures throw.beez.data.validatethrows when data does not match the schema.
beez.config({
cache= { enabled=true },
})
localversion=beez.env("RELEASE_VERSION") or"dev"localartifacts=beez.fs.glob("dist/**/*")
step({
name="upload",
phase="publish",
scope="release",
run=function(ctx)
beez.archive.compress("dist", "bundle-" ..version..".zip")
localhash=beez.crypto.hash_file("bundle-" ..version..".zip", "sha256")
print("uploading", hash)
return0end,
})- DSL Overview — tasks, steps, workflows
- Lua API Workers — parallel shell inside a step
- CHANGELOG
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
- Development and Contribution
- Building and Setup
- Repository Layout
- Testing
- Code Quality
- Feature Development Workflow
- Submitting Changes