Skip to content

ReqPack Declaration

Leonard Ramminger edited this page Aug 14, 2026 · 2 revisions

ReqPack Declaration

Declare external tool and library dependencies in build.lua with a top-level reqpack { ... } block. Beez installs them through ReqPack (rqp) before running your target.

Syntax

reqpack {
    <plugin> = { <packages> },
}
Part Meaning
<plugin> ReqPack plugin name (sys, npm, beez, …)
<packages> Array of package entries for that plugin

Each package entry is either:

  • a string — package name without version ("make", "eslint")
  • a table — { name = "eslint", version = "9.0.0" } (version is optional)

Example

reqpack {
    sys = { "make", "cmake" },
    npm = {
        "typescript",
        { name = "eslint", version = "9.0.0" },
    },
}

Beez translates this into ReqPack install arguments:

rqp install sys:make sys:cmake npm:typescript npm:eslint@9.0.0 --json

When dependencies are installed

Situation Behavior
Normal run (beez build, -p, -s, …) After build.lua loads, Beez installs only plugins whose declaration changed (incremental cache). Then the target runs.
beez --install Install all declared dependencies, then exit. Does not run a workflow or task.
beez --install --dry-run Print the rqp command that would run; do not install.

If there is nothing to install, Beez prints reqpack dependencies are up to date and continues.

Incremental cache

Per-plugin fingerprints are stored under:

.cache/reqpack/<plugin>.fp

When the package list for a plugin is unchanged, Beez skips calling rqp for that plugin on the next run. Use beez --install to force a full reinstall of every declared package.

Beez plugins (reqpack.beez)

The beez ReqPack plugin loads Beez DSL plugins (Lua extensions with steps, workflows, and tasks):

reqpack {
    beez = {
        {
            name = "coditary/cppcheck",
            path = "./plugins/coditary/cppcheck",
            version = "1.0.0",
        },
        {
            name = "coditary/pipeline",
            path = "./plugins/coditary/pipeline",
            version = "1.0.0",
        },
    },
    sys = { "cmake", "ninja" },
}
Field Required Meaning
name yes Qualified name organization/plugin
path yes Directory relative to project root (without version suffix)
version recommended Subdirectory path/<version>/beez_plugin.lua

Plugins are loaded when build.lua is parsed — before targets run. See Plugin System.

ReqPack CLI (rqp)

Beez does not bundle ReqPack. The rqp executable must be on PATH.

Install ReqPack:

curl -fsSL https://raw.githubusercontent.com/Coditary/ReqPack/main/install.sh | sh

If rqp is missing, Beez prints the hint above and exits with code 1.

Errors

On failure, Beez reports the rqp install exit code and captured output. When ReqPack returns structured JSON (rqp install ... --json), Beez also prints per-package errors, for example:

reqpack install failed:
  npm:vitest: plugin action failed

Common load-time errors:

Error Cause
reqpack keys must be plugin names (strings) Non-string key in the reqpack table
reqpack.<plugin> must be an array of packages Value is not a Lua array
reqpack.<plugin> entries must be strings or tables with name/version Invalid package entry type
reqpack.<plugin> package table requires string name Table entry missing name

Related CLI flag

See CLI Flag Reference for --install.

Next steps

Clone this wiki locally