Installing yargs
Now, let's view the documents page for yargs. It's always a good idea to know what you're getting yourself into. If you search for yargs on Google, you should find the GitHub page as your first search result. As shown in the following screenshot, we have the GitHub page for the yargs library:
Now, yargs is a very complex library. It has a ton of features for validating all sorts of input, and it has different ways in which you can format that input. We will start with a very basic example, although we will be introducing more complex examples throughout this chapter.
We'll now move into Terminal to install this module inside of our application. To do this, we'll use npm install followed by the module name, yargs, and in this case, I'll use the @ sign to specify the specific version of the module I want to use, 11.0.0, which is the most recent version at the time of writing. Next, I'll add the save flag, which, as we know, updates the package.json file:
npm install yargs@11.0.0 --save