Read Drush config file I am creting a module with Drush integration. My challenge now is how to read the Drush config file in ~/.drush/myconfig.drushrc.php. 

I tried drush_load_config_file but it is not working. 

drush_load_config_file($context, _drush_config_file($context, 'deployment'));
Sounds as if you are looking in the wrong place to integrate your module with Drush.

You need to create a drush folder within your custom module and create a YOURMODULE.drush.inc file inside with appropriate Drush hooks.

Here's an example code:

/**
 * Implements hook_drush_command().
 */
function boilerplate_drush_command() {
  $items['boilerplate-hello'] = array(
    'callback' =&gt; 'boilerplate_hello_command',
    'description' =&gt; dt('Sample Drush command for boilerplate module.'),
    'bootstrap' =&gt; DRUSH_BOOTSTRAP_DRUSH,
    'arguments' =&gt; array(
      'name' =&gt; dt('Optional. A name which will be greeted upon running the command.'),
    ),
    'aliases' =&gt; array('boilerplate-hi'),
  );

  return $items;
}

/**
 * Implements hook_drush_help().
 */
function boilerplate_drush_help($section) {
  switch ($section) {
    case 'drush:boilerplate-hello':
      return dt('Sample Drush command for boilerplate module. It will just greet you, optionally with a name you provided.');
  }
}

/**
 * Command to download the Chosen plugin.
 */
function boilerplate_hello_command() {
  $args = func_get_args();
  $name = (!empty($args[0])) ? $args[0] : FALSE;

  if ($name) {
    drush_log(dt('Hello @name!', array('@name' =&gt; $name)), 'success');
  }
  else {
    drush_log(dt('Hello there!'), 'success');
  }
}


This will allow you to run the command using drush boilerplate-hello or drush boilerplate-hi (alias). If you pass an argument, for example drush boilerplate-hello ninjascorner it will take it as an argument, which is the functionality you need.

This is taken from my Drupal module boilerplate. The Drush integration from there is working, so you can install the module and play around with it to see how it works.