Yireo_ThemeCommands

PHP 8.1 - 8.4
Magento 2.4.7 | 2.4.8
CSP Yes
Latest Release 1.3.4

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 without additional parameters) which resets all stores to the default, so that only 1 theme is active:

bin/magento theme:change --reset -- Magento/luma

When you reset to a custom theme, and recepeive an error like:

bin/magento theme:change --reset <vendor/<theme>                                
                                                 
  Not enough arguments (missing: "theme_name").  
                                                 
theme:change [--reset [RESET]] [--] <theme_name> [<scope> [<scope_id>]]

you'll need to use the following command;

bin/magento theme:change --reset Magento/luma <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

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

Support

For getting support, create an Issue under the following project URL:

https://github.com/yireo/Yireo_ThemeCommands

Composer details
Magento module name
Yireo_ThemeCommands
Composer name
yireo/magento2-theme-commands
Composer version
1.3.4
Default branch
master
Requirements
magento/framework: ^103.0
php: >=8.2 <8.6
Releases
1.3.4 23 October 2026
1.3.3 23 October 2026
1.3.2 23 October 2026
1.3.1 23 October 2026
1.3.0 23 October 2026
1.2.1 23 October 2026
1.2.0 23 October 2026
1.1.0 23 October 2026
1.0.3 23 October 2026
1.0.2 23 October 2026
1.0.1 23 October 2026
Changelog

[1.3.4] - 22 October 2025

Fixed

  • Wrong imported namespace of Composer, should be Symfony Console

[1.3.3] - 08 October 2025

Fixed

  • Add new command "theme:path" to return full path for given theme

[1.3.2] - 23 April 2025

Fixed

  • Fix PHP 8.4 deprecation

[1.3.1] - 10 March 2025

Fix

  • Wrong regex when creating theme

[1.3.0] - 1 July 2024

Added

  • Add --reset flag to theme:change command
  • Add new command theme:design_config

[1.2.1] - 6 February 2024

Fixed

  • namespace correction for InputOption #3 @meminuygur

[1.2.0] - 3 February 2024

Added

  • New command to create a new theme

[1.1.0] - 5 November 2023

Added

  • New command to list all themes

Fixed

  • Cleanup deps in change command

[1.0.3] - 30 August 2023

Fixed

  • Fix issue with grid not being updated for global scope

[1.0.2] - 20 June 2023

Fixed

  • Fix scope_id validation when using default scope #2 @lbanka

[1.0.1] - 17 June 2023

Added

  • Allow to use scope codes #1 @lbanka

[1.0.0] - 16 June 2023

  • Initial release

Last modified: October 17, 2026