Skip to content

Commands

Global commands list

Commands list

The commands page allows you to view all the commands in your project:

  • Module
  • Command name
  • Command class

Module commands list

In the module detail view, you can see the commands declared by this module.

Module command creation

You can create a new command by clicking Generate > Command button from the module detail view.

Command create

The module command creation wizard includes the following features:

  • Auto-generate the command name
  • Allow you to select which services should be injected into the command constructor (LoggerInterface and ScopeConfigInterface for now)

The following files are created/updated in app/code/Vendor/Module when you create a new command:

  • etc/di.xml: created if it does not exist, or updated with the new command declaration
  • Command/CommandName.php: created with the new command class

NOTE

The command class name is inferred from the command name you provide.

Released under the MIT License.
This project is not affiliated with, endorsed by, or sponsored by Adobe Inc. "Magento" and "Adobe Commerce" are trademarks of Adobe Inc.
All trademarks and registered trademarks are the property of their respective owners.