subcmd
Create CLI tools with subcommands.
Hugely inspired by subcommand, but with a nested structure and support for usage information.
Based on minimist and cliclopts.
subcmd has a single nested structure of commands
name : "" usage : "" options : {} commands :
It can be a single command or nested as deep as you want.
Install
npm install --save subcmd
Use
name : 'ls' usage : 'Usage: ls [OPTIONS]' options : /* cliclopts options */ { /* do the ls thing */ } commands : name : 'foo' usage : 'Usage: ls foo [OPTIONS]' options : { /* do the ls foo thing */ } commands : autoHelp : trueprocessargv
Options
autoHelp : <bool> // Print usage info and quit if -h or --help (default false)
Changelog
1.0.1
- Added missing deps 🙈
1.0.0
- Initial release 🎉