Skip to content

Configuration Overview

Leonard Ramminger edited this page Aug 9, 2026 · 1 revision

Configuration Overview

Beez builds one active configuration for each run by merging several sources. Later sources override earlier ones for the same key.

Merge order

From lowest to highest priority:

PrioritySourceWhere
1Global user config~/.config/beez/config.lua (or $XDG_CONFIG_HOME/beez/config.lua)
2Project configbeez.config({ ... }) in build.lua (often via require("config"))
3Environment.env files and env.vars from config
4CLI flags--verbose, --no-cache, -j, etc.

Startup flow

When you run a target (workflow, task, phase, or step), Beez roughly does this:

  1. Load global config.lua if it exists
  2. Apply environment settings once (dotenv + env.vars)
  3. Load build.lua and merge project beez.config(...)
  4. Apply environment settings again (project may have changed env options)
  5. Apply CLI overrides
  6. Run the requested target

Environment is applied twice so project-level env settings take effect before the final merge with CLI flags.

Config file format

All config files are Lua modules that return a table:

return {
performance= { ... },
cache= { ... },
ui= { ... },
env= { ... },
}

Top-level keys:

KeyPurpose
performanceThreads, cache write timing, hashing behavior
cacheCache directory, enable/disable, hash and compression
uiTerminal output, colors, progress, summaries, logging
envDotenv loading, default vars, cache fingerprint vars

You only need to include the sections you want to override.

Inspecting configuration

Show merged settings

beez --show-config

Prints the active values and shows which layer set each one (global, project, CLI, or default). You must run this from a directory that contains a build.lua, because project config is loaded from there.

Discover keys and enum values

beez --config-options
beez --config-options performance
beez --config-options cache.compress.mode

Without a path, lists child keys. At a leaf enum key, lists allowed values.

CLI overrides

These flags change behavior for a single run (most map to a config key):

FlagEffect
--verboseui.output_mode = verbose
--errorui.output_mode = errors
--silentui.output_mode = silent
--dry-runRun-only: load build.lua, build graph, show progress; skip shell commands and Lua callbacks (not a config file key)
--no-cachecache.enabled = false
-j, --threads Nperformance.max_threads = N
--log-file PATHEnable run log at PATH
--no-log-fileDisable run log

See CLI Flag Reference for the full list of flags. Output and cache flags are described in Output and Logging Flags and Cache and Maintenance Flags.

What is not in config files

Some things are defined only in build.lua, not in Beez settings:

  • Steps, tasks, workflows
  • order() dependencies
  • configure_step() data

Shell steps and Lua callbacks read the environment via beez.env("KEY") after env settings are applied.

Next steps

Clone this wiki locally