Creating CLI Tools with Node.js
Packages
When creating your own cli tool based on node.js you should really not implement everything yourself, because this wheel is already implemented and more stable than your own one will ever be.
In the following list I put some packages which might be useful in order to built CLI tools on top:
commander
The classic library for reading command line parameters, arguments, flags and so forth. It should be a suitable choice in general, although this library is already a dinosaur with the first versions being released 10 years ago.
promptly
Promptly is a simple tool to get user input. Multiple dialog types are possible this includes:
- confirm
- prompt: Classic text input
- choose: select from a list of options
inquirer
Extensible CLI prompt framework, a lot more powerful than promptly.
enquirer
Similar to inquirer but with fancier look.