Skip to content

Project Scaffolding

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

Project Scaffolding (beez --init)

Status: beta. Beez embeds Tempify so you can scaffold new projects from templates without installing Tempify separately.

Tempify is linked into the beez binary. At CMake configure time, Beez fetches Tempify tag v0.1.2 from GitHub (requires git). Override with -DTEMPIFY_SOURCE_DIR=/abs/path/to/Tempify when configuring Beez to use a local checkout.

For full Tempify documentation (templates, hooks, layers, questions.lua, reapply, and so on), see the Tempify repository.

Syntax

beez --init <tempify-args...>

Everything after --init is passed to Tempify unchanged. Beez does not parse Tempify flags.

beez --init list
beez --init info basic_cpp
beez --init basic_cpp ./my-app
beez --init basic_cpp ./my-app --set project_name="My App" --set include_ci=false
beez --init --help          # Tempify help (not Beez help)
beez --init --version       # Tempify version

Does not need build.lua

beez --init runs before Beez loads build.lua. You can scaffold into an empty directory or outside an existing Beez project.

Normal Beez commands (-p, --list, <target>, …) still require build.lua in the current directory.

Beez flags vs Tempify flags

Invocation What runs
beez --init list Tempify list
beez --init -p --help Tempify with Prebyte passthrough (-p is a Tempify flag here)
beez -p generate:code Beez phase run (needs build.lua)
beez --list tasks Beez list (needs build.lua)

Rule: when --init is the first argument, Beez delegates entirely to Tempify. Beez flags such as -p, --list, --verbose are not interpreted unless you place them after --init as Tempify arguments.

Typical workflow

  1. List templates: beez --init list
  2. Inspect a template: beez --init info <template>
  3. Render into a target directory: beez --init <template> <output-dir> [options]
  4. Add a build.lua (manually or from the generated project) and use Beez as usual

Build-time configuration

CMake option Purpose
(default) Fetch Tempify v0.1.2 via FetchContent
-DTEMPIFY_SOURCE_DIR= Use a local Tempify tree instead of fetching

Example with a local Tempify checkout:

cmake -B build -DTEMPIFY_SOURCE_DIR=/path/to/Tempify ...

Testing and stability

Beez integration tests cover CLI routing (help, version, Prebyte passthrough, and that normal Beez commands still work without --init). See tests/integration/app/test_cli_init.cpp.

Template rendering correctness (file contents, layers, hooks, snapshots) is tested in the Tempify repository, not yet end-to-end through beez --init in Beez.

Related pages

Clone this wiki locally