drush

Write drush integration for your module

Everyone loves Drush

Wouldn't it be cool if more modules would have a drush integration?
Here is one short introduction how to do it.

  • Create a modulename.drush.inc in your modules dir
  • Implement hook_drush_command:
    <?php
    /**
    • Implementation of hook_drush_command().
      */
      function mongodb_drush_command() {

    $items['mongodb-connect'] = array(
    'description' => 'A string for connecting to the mongodb.',
    // alternatives
    /**

  • DRUSH_BOOTSTRAP_DRUSH
  • DRUSH_BOOTSTRAP_DRUPAL_ROOT
Subscribe to RSS - drush