dashdash

Parse command-line options and arguments in Node.js programs.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

A light, featureful and explicit option parsing library.

Examples

parse command line arguments in a Node.js script$ node script.js --verbose --output file.txt
handle boolean flags and options with values$ node app.js --debug --config=config.json --port 3000
parse short and long option formats together$ node tool.js -v -o output.txt --format json
validate required arguments and show help messages$ node cli.js --help
parse positional arguments after options$ node deploy.js --env production server1 server2 server3