Search

Tip: type a command such as theme build. Press Esc to close.

mageforge:theme:watch

Watch theme files and auto-rebuild

Since v0.0.3Themealias: frontend:watch

Run it

bin/magento mageforge:theme:watch <theme-code>
bin/magento frontend:watch Magento/luma

Watches theme files for changes and automatically rebuilds when modifications are detected.

Arguments:

  • themeCode — Optional. Theme to watch in format Vendor/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.

Version history

  • v0.3.0 – Add verbose output support for watch task with `-v` flag
  • v0.2.0 – Fixed issue where watch output was not displayed correctly