- Run
composer require MrEssex/Cubex-Cli - Run
./vendor/mressex/cubex-cli/cubex init. This command creates a sample cubex file in your root directory.
- Run
cubex make:console command-nameto create a new command. - When you create a new command, it will have {PSR-4-Namespace}\Cli namespace. For example, if you
run
cubex make:console Example, you will get {PSR-4-Namespace}\Cli\Example as a fully qualified class name. - Run
cubex listto confirm.
or add CliWrapper::initialise($app);, where $app is an instance of cubex,
to your cubex file in the root directory
- Qdd
CliWrapper::initialiseAlternativeRoot($app, {path});, where$appis an instance of cubex, to your cubex file in the root directory and{path}is the namespace/path inside vendor of the package e.g.mressex/cubex-translate