Repository navigation
questions lua Reference
Leonard Ramminger edited this page Aug 22, 2026
·
1 revision
Interactive and CLI-answerable questions.
return {
order = { "Project", "CI" },
groups = {
Project = {
{ key = "project_name", type = "string", prompt = "Project name" },
{ key = "project_slug", type = "string" },
},
CI = {
{ key = "include_ci", type = "bool", prompt = "Include CI?" },
},
},
}-
orderdefines group order - Questions live in
groups.<Name>- nogroupfield per question - Every group in
ordermust have questions (no empty groups) - Group names appear in TUI and
--questions
| Field | Description |
|---|---|
key |
Variable name for Prebyte/{{ key }}
|
type |
string, bool, choice, … |
prompt |
Display text |
default |
Value or function(ctx) … end
|
alias |
Alternative keys (e.g. name_slug for project_slug) |
optional |
true if empty is allowed |
choices |
For type = "choice"
|
condition |
function(ctx) return bool end - question only when true |
validate |
function(ctx) return true | "error message" end |
sensitive |
true - masked input (API tokens) |
help |
Additional help text |
In default, condition, validate:
-
ctx.values- answers set so far (strings) -
ctx.value- current input value (for validate)
Available in Lua hooks and questions.lua:
default = function(ctx)
return slugify(ctx.values.project_name or "my-app")
endtempify my_app --questions --json --fullQuestions & Answers · Reference: tests/test_templates/basic_cpp/questions.lua
Tempify · Repository · Issues · Releases
Documentation lives in this wiki. For a build quickstart, see the README in the repository.
Prebyte (template engine) is a separate project bundled by Tempify.
- CLI Reference
- Questions & Answers
- Configuration
- Render Options
- Hooks (Users)
- Reapply & Diff
- Shared Template Store
- Prebyte Passthrough
- Shell Completion