1.0.2 • Published 9 years ago

generate-help v1.0.2

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

generate-help Circle CI

Build a help output for CLI programs.

Installation

$ npm install generate-help --save

Usage

Note: options are compatible with minimist-options.

const help = require('generate-help');

let output = help({
  usage: 'hello [options] <command>',
  desc: 'Very cool description',
  options: {
    help: {
      alias: 'h',
      desc: 'Display help'
    },

    force: {
      aliases: ['f'],
      desc: 'Force something'
    }
  },
  commands: [{
    name: 'hi',
    desc: 'Say hi'
  }, {
    name: 'yo',
    desc: 'Say yo'
  }]
});

process.stdout.write(output);

npm.io

Tests

Circle CI

$ make test

License

MIT © Vadym Demedes