Run it
bin/magento mageforge:theme:watch <theme-code>
bin/magento frontend:watch Magento/lumaWatches theme files for changes and automatically rebuilds when modifications are detected.
Arguments:
themeCode— Optional. Theme to watch in formatVendor/theme. If omitted, an interactive prompt appears.
Options:
-t, --theme=VALUE— Alternative way to specify the theme code.--with-parents— Build all parent themes once before watching, without asking.--no-parents— Never build parent themes (default in non-interactive environments).
Behavior:
- For child themes, you are asked whether to build the parent themes once before the watcher starts. Only the selected theme is watched.
- Runs indefinitely until interrupted (Ctrl+C).
- Monitors source files (SCSS, JS, etc.) and triggers rebuilds on change.
- Useful for active theme development.