I originally wrote about how to write a command-line utility in Node.js back in 2013, and at the time, I was writing the blog post as I learnt how to build a CLI in Node.js myself.
Now it’s 2020, and since that original post, I have written quite a few CLI tools so I felt it would be worthwhile to write a fresh post about how I would approach writing a CLI tool with Node.js in 2020.
Before we get started, this tutorial has a pre-requisite that you have Node.js installed. Rather than write how to do that here I have linked to tutorials on how to do this that can be found on treehouse’s blog.
Mac: https://blog.teamtreehouse.com/install-node-js-npm-mac
Windows: https://blog.teamtreehouse.com/install-node-js-npm-windows
#nodejs #javascript