npm 5.2 npx — it’s coolest feature

Npm 5.2 is out and that comes with some cool features and gives me enough to switch back to npm from yarn.

When you update to the latest version of npm, it will install one more binary with the usual npm, that is npx. I really like the idea, what npx can do. Seeing updates like these, I am very eager to see future updates on what more npx and newer version of npm will allow us to do.

In the gif below, you can see when I run cowsay "Hello this is cool" it says command not found: cowsay. It’s no brainer, it simply means that the package “cowsay” is not installed on my system. Before npx I would have installed it using, npm install -g cowsay , but with npx I can directly use the package without even installing it.

— — — — — — — — — — — —

If you want to read more about npx checkout Introducing npx: an npm package runner by Kat Marchán.