var command = {
  command: "help",
  description:
    "List all commands or provide information about a specific command",
  help: {
    usage: "truffle help [<command>]",
    options: [
      {
        option: "<command>",
        description: "Name of the command to display information for."
      }
    ]
  },
  builder: {},
  run: function(options, callback) {
    var commands = require("./index");
    if (options._.length === 0) {
      this.displayCommandHelp("help");
      return callback();
    }
    var selectedCommand = options._[0];

    if (commands[selectedCommand]) {
      this.displayCommandHelp(selectedCommand);
      return callback();
    } else {
      console.log(`\n  Cannot find the given command '${selectedCommand}'`);
      console.log("  Please ensure your command is one of the following: ");
      Object.keys(commands)
        .sort()
        .forEach(command => console.log(`      ${command}`));
      console.log("");
      return callback();
    }
  },
  displayCommandHelp: function(selectedCommand) {
    var commands = require("./index");
    var commandHelp = commands[selectedCommand].help;
    console.log(`\n  Usage:        ${commandHelp.usage}`);
    console.log(`  Description:  ${commands[selectedCommand].description}`);

    if (commandHelp.options.length > 0) {
      console.log(`  Options: `);
      commandHelp.options.forEach(option => {
        console.log(`                ${option.option}`);
        console.log(`                    ${option.description}`);
      });
    }
    console.log("");
  }
};

module.exports = command;

var command = {
  command: "help",
  description:
    "List all commands or provide information about a specific command",
  help: {
    usage: "truffle help [<command>]",
    options: [
      {
        option: "<command>",
        description: "Name of the command to display information for."
      }
    ]
  },
  builder: {},
  run: function (options, callback) {
    var commands = require("./index");
    if (options._.length === 0) {
      this.displayCommandHelp("help");
      return callback();
    }
    var selectedCommand = options._[0];

    if (commands[selectedCommand]) {
      this.displayCommandHelp(selectedCommand);
      return callback();
    } else {
      console.log(`\n  Cannot find the given command '${selectedCommand}'`);
      console.log("  Please ensure your command is one of the following: ");
      Object.keys(commands)
        .sort()
        .forEach(command => console.log(`      ${command}`));
      console.log("");
      return callback();
    }
  },
  displayCommandHelp: function (selectedCommand) {
    var commands = require("./index");
    var commandHelp = commands[selectedCommand].help;
    console.log(`\n  Usage:        ${commandHelp.usage}`);
    console.log(`  Description:  ${commands[selectedCommand].description}`);

    if (commandHelp.options.length > 0) {
      console.log(`  Options: `);
      for (const option of commandHelp.options) {
        if (option.internal) {
          continue;
        }

        console.log(`                ${option.option}`);
        console.log(`                    ${option.description}`);
      }
    }
    console.log("");
  }
};

module.exports = command;

Allow commands to define internal options
Allow commands to define internal options

So those options don't appear in the help output
