Auto discovery of global commands in Drush

Matt Glaman
3 min readJan 23, 2022

This blog post is about the auto-discovery of global Drush commands. To be honest, I have no idea what a global command is or means and how it differentiates between a site command. However, I find the global-command discovery feature fascinating and a streamlined developer experience when writing commands for your Drupal site. Note: this feature is available in Drush 10.5+ or 11.0+.

Some Drush commands can already be auto-discovered. Those are site-wide commands. Site-wide Drush commands exist in your Drupal codebase’s drush/Commands directory and use the…

--

--

Matt Glaman

PHP software engineer, open source contributor, and speaker