-
Notifications
You must be signed in to change notification settings - Fork 0
Beez API
The beez table exposes project settings and environment access from build.lua.
Merge project Beez settings (cache, UI, performance, env).
beez.config(require("config"))
beez.config({
cache = { enabled = true },
ui = { output_mode = "clean" },
})- Multiple calls merge; later calls override the same keys
- Same shape as
~/.config/beez/config.lua(see Configuration) - Applied when the script loads, before any step runs
Typical pattern at the top of build.lua:
beez.config(require("config"))Read an environment variable by name.
local buildType = beez.env("BUILD_TYPE")
local cc = beez.env("CC") or "gcc"- Process environment (
getenv), including values fromenv.varsand env files already loaded byapplyEnvironment() - Project root
.envfile (lazy-loaded on firstbeez.env()call) -
nilif unset (Luanil, not empty string)
See Environment Variables for env.files, env.vars, and related config.
Read an environment variable, or return a default string if unset.
local buildType = beez.env_or("BUILD_TYPE", "Release")
local scanner = beez.env_or("OSV_SCANNER", beez.env_or("HOME", "") .. "/.local/bin/osv-scanner")With multiple keys before the default, each key is tried in order (first hit wins).
Run a shell command synchronously inside a step callback (uses ctx:spawn + ctx:wait internally).
local code = beez.shell.run(ctx, "[mytool]", "make -j8")| Option | Meaning |
|---|---|
return_output = true |
Return exit code and output as a pair (result.first, result.second) |
Escape a string for safe use inside shell single-quoted arguments.
task("demo", "echo " .. beez.char.quote("it's fine"))Incremental multi-file tool runner (parallel workers, success cache). See Plugin System.
This page covers configuration, environment, and plugin helper APIs on the root beez table.
For filesystem, crypto, HTTP, archives, data serialization, text templates, and more, see Lua API Overview.
| Module | Page |
|---|---|
beez.fs |
Lua API Filesystem |
beez.crypto |
Lua API Crypto |
beez.sys |
Lua API System |
beez.time / beez.date
|
Lua API Time and Date |
beez.data |
Lua API Data (includes schema validation) |
beez.net |
Lua API Network |
beez.archive |
Lua API Archive |
beez.text |
Lua API Text |
beez.shell / beez.char / beez.increment
|
Plugin System |
ctx:spawn / wait
|
Lua API Workers |
| Feature | Where |
|---|---|
| Register steps | Global step()
|
| Run commands | CLI (beez ...) |
| Read cache | Step context in callbacks |
-
Lua API Overview - full
beez.*reference - Configuration - full config reference
-
Project Config -
config.luapattern - DSL Overview - other globals
-
Plugin System - plugins,
configure(), standard workflows
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