Any package manager or system tool can be difficult to use. We’ve looked at and used Drush a bit in the past. Here are some more tips to help better use Drush.
drush help, or drush help [command]
The help command in Drush by default gives a good overview of available Drush commands. If you’re clueless how to use Drush, or want to check if a 3rd party module has added commands to Drush. Then this command is your friend.
If you want to check what commands a particular package provides you can provide a –filter argument to Drush:
$ drush help --filter=migrate All commands in migrate: (migrate) migrate-analyze Analyze the source fields for a migration. (maz) migrate-audit (ma) View information on problems in a migration. migrate-deregister Remove all tracking of a migration migrate-fields-desti List the fields available for mapping in a destination. nation (mfd) migrate-fields-sourc List the fields available for mapping from a source. e (mfs) migrate-import (mi) Perform one or more migration processes migrate-mappings View information on all field mappings in a migration. (mm) migrate-messages View any messages associated with a migration. (mmsg) migrate-reset-status Reset a active migration's status to idle (mrs) migrate-rollback Roll back the destination objects from a given migration (mr) migrate-status (ms) List all migrations with current status. migrate-stop (mst) Stop an active migration operation migrate-wipe (mw) Delete all nodes from specified content types.
Once you know what commands are available it’s useful to know what Options are available to most commands, drush core-topic, is a command reference that lists a lot of additional examples in using Drush.
$ drush topic Choose a topic  : Cancel  : All global options (core-global-options)  : Bashrc customization examples for Drush. (docs-bashrc)  : Bastion server configuration: remotely operate on a Drupal sites behind a firewall. (docs-bastion)  : Bootstrap explanation: how Drush starts up and prepared the Drupal envionment for use with the command. (docs-bootstrap)  : Configuration overview with examples from example.drushrc.php. (docs-configuration)  : Contexts overview explaining how Drush manages command line options and configuration file settings. (docs-context)  : Crontab instructions for running your Drupal cron tasks via `drush cron`. (docs-cron)  : Drush API (docs-api)  : Drush command instructions on creating your own Drush commands. (docs-commands)  : Drush Make example makefile (docs-make-example)  : Drush Make overview with examples (docs-make)  : Error code list containing all identifiers used with drush_set_error. (docs-errorcodes)  : Example Drush command file. (docs-examplecommand)  : Example Drush commandfile that extends sql-sync to allow transfer of the sql dump file via http rather than ssh and rsync. (docs-example-sync-via-http)  : Example Drush commandfile that extends sql-sync to enable development modules in the post-sync hook. (docs-example-sync-extension)  : Example Drush script. (docs-examplescript)  : Example policy file. (docs-policy)  : php.ini or drush.ini configuration to set PHP values for use with Drush. (docs-ini-files)  : README.txt (docs-readme)  : Shell alias overview on creating your own aliases for commonly used Drush commands. (docs-shell-aliases)  : Shell script overview on writing simple sequences of Drush statements. (docs-scripts)  : Site aliases overview on creating your own aliases for commonly used Drupal sites with examples from example.aliases.drushrc.php. (docs-aliases)  : Strict option handling, and how commands that use it differ from regular Drush commands. (docs-strict-options)
If you want to check the status of Drush and your website, you can issue drush core-requirements and Drush will output status information of Drupal and its dependencies for both the site, and the configured server.
I often write and test simple PHP scripts using the core Drupal API. You can test such scripts by invoking them from Drush via drush php-script FILENAME.php to debug my own scripts or 3rd party Drush commands it can be helpful to pass a verbose flag to Drush or a debug flag. This is simply drush command -v or drush command –debug.
Many of these settings can be configured globally using a drushrc.php file. This file is a configuration file for Drush and it may be system-wide, user-wide or Drupal site wide. Drush scans various locations for it. In order to make Drush always output commands verbosely you could add the following line to your drushrc file:
// Always supply the following option to all Drush commands. $options['v'] = TRUE;
Typically the drushrc file is used to store aliases to remote, development and staging sites so that Drush commands that accept sitenames can perform tasks either locally or remotely (or both) using a convenient shorthand notation.
Lastly, you can create your own Drush commands to perform tasks. To make a command you simply create a file named as MYMODULE.drush.inc within a custom module. You then must/should implement the following Drush hooks:
provide help text from the command line about your commands when drush help COMMANDNAME is called.
Provide an $items array keyed on COMMANDNAME that describes the command and valid options to be passed to the command.
This function you implement actually performs your command business logic. It is called by Drush after the command invocation is validated (see below).
This function allows you to validate if options passed to commands are valid. This lets you avoid having an erroneous process start.
For more detailed directions on creating a custom Drush Command see the official Drush website documentation.