Repository navigation
Your First Template
Leonard Ramminger edited this page Aug 22, 2026
·
1 revision
Tutorial: minimal template in ~10 minutes.
Template hello_app with a rendered README.md.
mkdir -p templates/hello_app/filestemplates/hello_app/template.lua:
return {
id = "hello_app",
name = "Hello App",
version = "0.1.0",
description = "Minimal starter template",
source_dir = "files",
output = {
path = "{{ project_slug }}",
overwrite = false,
},
}templates/hello_app/questions.lua:
return {
order = { "Project" },
groups = {
Project = {
{
key = "project_name",
type = "string",
prompt = "Project name",
default = "Hello App",
},
{
key = "project_slug",
type = "string",
prompt = "Project slug",
default = function(ctx)
return slugify(ctx.values.project_name or "hello-app")
end,
},
},
},
}templates/hello_app/files/README.md.pbt:
# {{ project_name }}
Generated by Tempify.cd /path/to/workspace # contains templates/
tempify validate hello_app
tempify hello_app /tmp/hello-out --set project_name="Demo"
cat /tmp/hello-out/README.mdExpected: # Demo
mkdir -p templates/hello_app/tests/default/snapshot
# After first render, copy snapshot:
cp -r /tmp/hello-out/* templates/hello_app/tests/default/snapshot/
echo '{"project_name":"Demo","project_slug":"demo"}' > templates/hello_app/tests/default/answers.json
tempify test hello_appDetails: Template Tests
- template.lua Reference
- questions.lua Reference
- layout.lua for renames
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