5.2.0
Execute npm package binaries without installing them locally
> npx create-react-app my-app
> cd my-app
> npm start
github.com/facebook/create-react-app
> npx @angular/cli new my-angular-project
cli.angular.io
> npx -p node-bin@0.12.7 -c 'node -v'
> npx -p node-bin@6 -c 'node server.js'
> npx -p mocha -p node@8.9.4 npm it
Should work better from v5.2.0
Some v4+ work too
-p option is for adding dependencies
> npx eslint --init
> npx -p eslint-config-airbnb-base -p eslint-plugin-import -p eslint -c 'eslint --ext .js test'
> npx github:piuccio/cowsay hi Ozz
> npx -p node@6 -c 'node -v && echo "<$npm_package_name>" | lolcat'
> npm run env | grep npm_
> npm run env | grep npm_package
Directly from a Gist
> npx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32
> source <(npx --shell-auto-fallback zsh)
> eslint@latest ./src
> ls `npm config get cache`/_npx
> npx okimdone ls
> npx http-server
> npx json-server https://raw.githubusercontent.com/typicode/jsonplaceholder/master/data.json