This article goes through discussing using tjs commander library for building node cli’s. I’m not a big fan of the library.
A recent approach I’ve been taking is just parsing args with something like minimist or zeit/arg and then handling the commands passed in.
It leads to a lot simpler code especially for small tasks like what is described in the parent article.
Another tip, you could also use pkg to create binaries for your new cli application so people don’t need node installed on their machine to run them.