moon templates command will list all templates available for code generation.
This list will include the template title, description, default destination, where its source files
are located, and more.
Options
--filter <pattern>
Filter templates based on a search pattern. Uses case-insensitive regex matching against template IDs.
--json
Print templates in JSON format instead of a table. Useful for programmatic access.
No Templates Configured
If no templates are configured, you’ll see:.moon/workspace.yml:
Table Columns
The templates table displays:- Template: The template ID used with
moon generate - Title: Human-readable template title
- Location: Filesystem path relative to workspace root
- Variables: List of variable names the template accepts
- Description: Brief description of what the template generates
Examples
List all templates
Find React templates
Export templates as JSON
Configuration
generatorin.moon/workspace.*