masterzydra / magento2-gen-cli
Module that adds CLI commands to create modules, controllers, etc.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento2-module
Requires
- php: ^8.1
- magento/framework: *
README
Content
Creating a new module for Magento2, adding a controller, etc. is not intuitive.
You have to look into the official documentation of Magento2 or use a third party tool like Mage2Gen.com.
This extension adds Laravel-like CLI commands to simplify these steps.
Commands
Usage
> php bin/magento make:module <vendor name> <module name>
> php bin/magento make:module
Vendor name (e.g. 'Magento'): Magento
Module name (e.g. 'Sales'): Sales
Generating files...
Module 'Magento/Sales' was created.
Custom templates
Don't like the files the commands create?
With custom templates you can create a folder structure like the Template
directory of this module.
You can just place the custom templates for the files you want to change.
Otherwise the default templates from this module will be used.
The module will take the path from the environment variable GEN_CLI_TEMPLATE
.
$ export GEN_CLI_TEMPLATE="/var/www/html/app/code/My/Templates"
Installation
This Magento2 module can be installed using composer:
> composer require masterzydra/magento2-gen-cli
To remove it from the list of required packages use the following command:
> composer remove masterzydra/magento2-gen-cli
Updating to latest version
With the following command composer checks all packages in the composer.json for the latest version:
> composer update
If you only want to check this package for newer versions, you can use
> composer update masterzydra/magento2-gen-cli