Module YAML Reference
Complete reference for module.yaml configuration files.
Module File Location
Section titled âModule File LocationâThe module.yaml file is located at:
your-module/src/module.yamlBasic Structure
Section titled âBasic Structureâname: "Module Name"code: "module-code"version: "0.1.0"description: "What this module does"Required Fields
Section titled âRequired Fieldsâ| Field | Type | Description |
|---|---|---|
name | string | Display name of the module |
code | string | Unique module identifier (kebab-case) |
version | string | Semantic version (e.g., 0.1.0) |
description | string | Short description of module purpose |
Install Configuration
Section titled âInstall ConfigurationâInstall Questions
Section titled âInstall QuestionsâQuestions asked during module installation:
install: - question: "What's your experience level?" config_key: "experience_level" options: - "beginner" - "intermediate" - "advanced"| Field | Type | Description |
|---|---|---|
question | string | Question text |
config_key | string | Config key to store answer |
options | array | Available options (optional) |
Configuration Values
Section titled âConfiguration ValuesâDefault configuration for the module:
config: output_folder: "_module-output" enabled_features: - feature1 - feature2 user_name: "{user_name}"Complete Example
Section titled âComplete Exampleâname: "My Custom Module"code: "my-custom-module"version: "0.1.0"description: "A module that does useful things"
# Install questionsinstall: - question: "What's your primary use case?" config_key: "use_case" options: - "development" - "documentation" - "testing"
- question: "Enable advanced features?" config_key: "advanced_enabled" options: - "yes" - "no"
# Configurationconfig: output_folder: "_my-module-output" max_iterations: 10 default_language: "english"
# Optional: Module dependenciesrequires: - "bmm"Validation Rules
Section titled âValidation RulesâWhen validating modules, Morgan checks:
- â Required fields present
- â
codeis valid kebab-case - â
versionfollows semantic versioning - â
config_keyvalues are unique - â Options arrays are valid (if provided)
Resources
Section titled âResourcesâ| Resource | Description |
|---|---|
| Builder Commands | Module commands |
| Create Your First Module | Module creation tutorial |
| What Are Modules | Module concepts |