Search by

yireo / magento2-theme-commands

yireo

CLI commands to manipulate themes

Package info

github.com/yireo/Yireo_ThemeCommands

Type:magento2-module

pkg:composer/yireo/magento2-theme-commands

Fund package maintenance!

yireo

www.paypal.me/yireo

Statistics

Installs: 49 720

Dependents: 1

Suggesters: 0

Stars: 13

Open Issues: 0

1.4.0 2026-11-26 01:39 UTC

This package is auto-updated.

Last update: 2026-11-29 20:56:59 UTC


README

Magento version PHP version License Latest Version

Magento 2 module to add CLI commands to manage themes from the command-line

Installation

composer require yireo/magento2-theme-commands
bin/magento module:enable Yireo_ThemeCommands

Usage

List all themes:

bin/magento theme:list

List all assigned themes (aka design configurations):

bin/magento theme:design_config

The theme:design_config output also shows an Override column, which identifies whether a specific value (like, a theme ID for a specific Store View) is indeed overriding the default or not.

Change the current theme to Magento/luma for all scopes:

bin/magento theme:change Magento/luma

Note that the theme:change command also includes a flag --reset (valid only for the default scope) which removes the theme setting of all websites and store views, so that only 1 theme is active. You are asked for confirmation, unless you add --no-interaction:

bin/magento theme:change --reset Magento/luma
bin/magento theme:change --reset --no-interaction Vendor/theme

Change the current theme to Hyva/default for the StoreView with ID 1:

bin/magento theme:change Hyva/default stores 1

Create a new theme:

bin/magento theme:create --theme Yireo/example --parent Magento/luma --application frontend
bin/magento theme:change Yireo/example

The theme name needs to be formatted like Vendor/theme_name (a vendor name starting with an uppercase letter, a theme name in lowercase letters, digits, - and _). The --application can only be frontend (default) or adminhtml. The parent theme needs to exist already. Existing theme files are not overwritten, unless you add --force.

Caveats

When a new theme has been created, it might have not been discovered by Magento. For instance, the output of the theme:list command is not showing this new theme. Run bin/magento setup:upgrade first.

Current status

Static Tests Unit Tests Integration Tests Playwright DI Compilation