terminal-help

2.0.0 • Public • Published

Terminal Help

General purpose package to create a pretty help screen for your commands using an object. Terminal help does not gives you functionality to capture commands or flags from command line. It is low-level library to create a help screen from an object.

Basic Usage

const Help = require('terminal-help')
const packageFile = require('./package.json')
const options = {
  package: packageFile,
  commands: [
    {
      name: 'make:controller',
      description: 'Make a new controller file using it\'s name'
    },
    {
      name: 'make:model',
      description: 'Make a new model file using it\'s name'
    }
  ]
}
Help.menu(options)

Now above will output as

Help Screen

Grouped Commands

All commands are grouped with their namespace :, above example shows all make: commands are grouped under make.

Examples

Checkout examples directory to look at different examples.

complete.js file shows a complete example with yargs

Package Sidebar

Install

npm i terminal-help

Weekly Downloads

4

Version

2.0.0

License

MIT

Last publish

Collaborators

  • amanvirk