Yet another command line parser. This one supports subcommands though.
Usage
const parseCommandLine = ; const subcommands = name: 'subcommand' alias: "s" type: String multiple: false const commands = name: 'command' alias: "c" type: String multiple: false subcommands name: 'other' alias: "0" type: String multiple: false; const arguments = ;console;
node example.js \ --command "This is the command" \ --subcommand "this goes in the subsection of command" \ --other "this is parsed nicely"
It has limitations, I built it for bounce.
Dash optionality
If you prefer your commands without dashes, specify option dashesAreOptional
to true
when instantiating the parser:
const arguments = ;console;
node example.js \ command "This is the command" \ --subcommand "this goes in the subsection of command" \ other "this is parsed nicely"