Hyvä CMS Component Dump
Lists the Hyvä CMS components available in a Magento 2 project, merged across active modules.
Command execution: Use the hyva-exec-shell-cmd skill to detect the environment
and determine the command wrapper. Run all commands below from the Magento project
root.
Step 1: Prefer the bin/magento CLI commands
Modern Hyvä CMS ships console commands that report the live, project-accurate set of components (reflecting enabled state, plugins, and overrides). Prefer these.
Check availability once, then use what exists:
# via the detected wrapper, e.g. warden env exec -T php-fpm bash -c "bin/magento list hyva:cms"
bin/magento list hyva:cms
bin/magento hyva:cms:describe-components— describe enabled CMS componentsbin/magento hyva:cms:list-disabled-components— list disabled CMS components
These run through the standard bin/magento wrapper (in the project's dev container);
no bundled script and no host PHP are involved.
Step 2: Fallback — bundled dump script
If the hyva:cms:* commands are not available (older Hyvä CMS), fall back to the
bundled scripts/dump_cms_components.php. It requires app/etc/config.php, so it
needs a PHP interpreter — run it via the pattern documented in the
hyva-exec-shell-cmd skill ("Running a Bundled Skill Script Inside the
Environment"): stream the script into the interpreter over stdin, e.g.
# via the detected wrapper, working directory = project root
cat <skill_path>/scripts/dump_cms_components.php | warden env exec -T php-fpm bash -c "php /dev/stdin"
and capture stdout. The script locates the Magento root via getcwd(), so no temp
file, mount, or cleanup is involved.
Output format: A single JSON object containing all merged CMS component definitions.
How the fallback script works
- Reads module configuration from
app/etc/config.phpto get the ordered list of modules - Filters active modules - only modules with value
1are included (disabled modules are skipped) - Locates components.json files in:
app/code/{Vendor}/{Module}/etc/hyva_cms/components.jsonvendor/{vendor-name}/{package-name}/*/etc/hyva_cms/components.json
- Maps paths to module names by reading each module's
etc/module.xml - Merges JSON objects in module load order as declared in
config.php - Outputs the result as formatted JSON
Module Load Order
Components are merged in the exact order modules appear in app/etc/config.php. Later modules can override components from earlier modules by using the same component key.
Example Output
{
"text_block": {
"label": "Text Block",
"category": "Content",
"template": "Hyva_CmsBase::elements/text-block.phtml",
...
},
"feature_card": {
"label": "Feature Card",
"category": "Elements",
"template": "Custom_Module::elements/feature-card.phtml",
...
}
}
Integration with Other Skills
This skill can be used to:
- Debug which components are available in the CMS editor
- Verify component registration after creating new components
- Check for component name conflicts between modules
- Export component definitions for documentation