Included with npm@5.2.0
is an extra binary named npx
:
npx
is a tool intended to help round out the experience of using packages from the NPM registry — the same waynpm
makes it super easy to install and manage dependencies hosted on the registry,npx
makes it easy to use CLI tools and other executables hosted on the registry.
Above that it’s smart too:
Calling
npx <command>
when<command>
isn’t already in your$PATH
will automatically install a package with that name from the NPM registry for you, and invoke it. When it’s done, the installed package won’t be anywhere in your globals, so you won’t have to worry about pollution in the long-term.
Leave a comment