About a year ago, we introduced our Joomla console. It can turn tedious tasks like creating new sites and installing new extensions into short one-liners on the command line.
This week marks an important milestone for the project with the release of version 1.3, introducing a brand new plugin system for console commands.
We have had various feature requests for different tasks and implemented some of them, but many still remain on the table. Instead of consolidating all tasks into the core we have made the commands extensible.
You can now easily create and distribute your own Joomla console plugins using Composer and Packagist.
All you have to do is publish your plugin through Packagist to allow it to be installed into the Joomla console.
To see how easy it is, take a look at our example plugin on GitHub. This plugin adds a backup command to the console. To install it, just run this command:
$ joomla plugin:install joomlatools/console-backup
Creating your own
Creating your own plugins is very easy. The console is build using Symfony’s Console package. You can find complete instructions on how to build a Symfony console command with extra arguments and options on their documentation pages.
Instructions how to create a console plugin, package and publish it are available on our developer site including examples to get started.