Skip to content

Create Command ​

Create a new console command. Lives in Console/Make/ (class: MakeConsoleCommand).

Signature ​

modularous:make:command {name} {signature} {--d|description=}

Aliases: mod:c:cmd, modularous:create:command (deprecated)

Arguments ​

ArgumentRequiredDescription
nameYesCommand name (e.g. MyAction)
signatureYesFull signature (e.g. my:action {arg})

Options ​

OptionDescription
--description, -dCommand description

Examples ​

bash
php artisan modularous:make:command MyAction "my:action {arg}"
php artisan modularous:make:command CacheWarm "cache:warm" -d "Warm the cache"

Output ​

Creates src/Console/{StudlyName}Command.php in the package root. The generated command extends BaseCommand and is placed in Console/ (root), not in a subfolder.

Folder Reference ​

Command typeFolderClass pattern
ScaffoldingConsole/Make/Make*Command
Root commandsConsole/*Command

See Console Conventions for full folder structure.