Socket
Book a DemoInstallSign in
Socket

generate-help

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generate-help

Generate help output for CLI programs

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
3
-25%
Maintainers
1
Weekly downloads
 
Created
Source

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);

Tests

Circle CI

$ make test

License

MIT © Vadym Demedes

Keywords

help

FAQs

Package last updated on 26 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts