moon template [id] command will display information about a template, its files, and
variables. This is useful for understanding what a template will generate before running it.
Arguments
[id]
The template ID to inspect. If not provided, you will be prompted to select from available templates.
Options
--json
Print the template information as JSON instead of formatted output. Useful for programmatic access to template metadata.
Template Information
The command displays the following information:About Section
- Template: The template ID
- Location: Filesystem path where the template files are located
- Destination: Default destination path (may include variable interpolation)
- Extends: Other templates this template extends from
- Assets: Binary/static assets that are copied as-is
- Files: Template files that are processed for variable substitution
Variables Section
For each variable, displays:- Name: The variable identifier
- Type: Data type (string, number, bool, array, object, enum)
- Flags: Additional properties like
required,internal,multiple - Prompt: The question shown to users during generation
Variable Types
Templates support various variable types:string- Text valuesnumber- Numeric valuesbool- Boolean true/false[bool | number | string]- Arrays of mixed types{string: bool | number | string}- Objects with string keysstring | [string]- Enums (single or multiple selection)
Configuration
generatorin.moon/workspace.*