Use the `generate` extension with typed variables
mainThe generate extension allows you to create project templates using .generate.yml files. It uses a unified variables: list where each entry defines a type: (string, boolean, or choice).
Resolved variables are placed at the top level of the template context. This allows you to use them directly in Jinja2 or Mustache templates using standard conditional logic (e.g., {% if docker %} or {% if web_framework == 'flask' %}).
Note on Boolean Interpolation: When interpolating a boolean as text (e.g., {{ docker }}), it renders as the capitalized Python representation (True or False), not true/false. Use conditionals for logic instead of text interpolation.
variables:
- name: project_name
type: string
prompt: "Project Name"
default: "myproject"