We can install Vue CLI 3 with either npm or yarn. Since npm comes bundled with the Node.js installation, we'll use npm:
npm install -g @vue/cli --loglevel verbose
The preceding command installs Vue CLI 3 globally. That's what the -g flag is for. The @vue/cli syntax is what we use in Vue CLI 3, and --loglevel verbose will log out the details of our installation, which is very useful, especially on slower connections and slower machines, where sometimes we could start wondering whether our console froze. With --loglevel verbose, there's more clarity, which is always good.
Once done, let's double-check the Vue CLI version installed by running this command:
vue --version
Here are a few other useful commands that you should try in your console:
vue -h
Note that vue -h is an alias for vue --help. I'm using the former as it's easier to type.
Also, note that you can run the -h flag on each individual vue command, for example:
vue create -h
vue add -h
vue invoke -h
vue inspect -h
vue serve -h
vue build -h
vue ui -h
vue init -h
vue config -h
vue upgrade -h
vue info -h
Running any of the preceding lines will return the usage instructions for the specific command, a description of what it does, and the options (the flags) to append to each individual command. Obviously, the -h flag is a great way to explore the capabilities of Vue CLI, and to refresh your memory on the fly, if need be.
Next, we'll install our code editor of choice, VS Code.