docs: function command(base, actions, opts) {
  
    actions = actions || {};
    opts = opts || {};
  
    var commands = JSON.parse(fs.readFileSync(p.join(base, opts.commandFile || '../conf/commands.json'))),
      pkg = JSON.parse(fs.readFileSync(p.join(base, '../package.json')));
  
    if (actions.commands && commands.commands) {
      _.each(actions.commands, function (command, name) {
        if (commands.commands[name]) {
          commands.commands[name].action = command.action;
        }
      });
    }
  
    commander.version(pkg.version);
  
    if (commands.options) {
      _.each(commands.options, function (option) {
        commander.option(option.arg, option.desc, option.action);
      });
    }
  
    _.each(commands.commands, function (command, name) {
      var program = commander
        .command(name)
        .description(command.desc);
  
      _.each(command.options, function (option) {
        program.option(option.arg, option.desc, option.action);
      });
  
      program.action(command.action);
    });
  
    _preCommand(commands.commands);
  
    commander.parse(process.argv);
  
    // NOTE: commander.args is populated by commander#parse,
    // hence _postCommand relies on commander#parse finishing without exiting or throwing error,
    // otherwise _postCommand won't be executed
    _postCommand(commander.args, commands.commands, commands.options);
  }