You should see your commands when using the Craft CLI.
First thing to check would be that the module is registered in app.php
, both in the modules
and bootstrap
arrays. Craft's documentation on that is here.
I find the best way to quickly validate that your module is registered, is by dumping something out from the module init()
function. Craft::dd('Registered')
does the trick. If you don't see anything on the frontend, your module isn't getting loaded into Craft.
Secondly, I would check that you are correctly setting the controllerNamespace
, so that Craft knows where to look for controllers, depending on your request. Their documentation on that is here.
Finally, check that you have some valid functions setup in your controllers. Each function name should be prefixed with action
. For example: actionRun()
in a JobController.php
file will be run with php craft mymodule/job/run
.