npx
executes npm packages
TLDR
Run package command
$ npx [package-name]
Run specific versioncopy
$ npx [package]@[version]
Run without installingcopy
$ npx --no-install [package]
Run with argumentscopy
$ npx [create-react-app] [my-app]
Run from GitHubcopy
$ npx github:[user]/[repo]
Run local binarycopy
$ npx [./node_modules/.bin/command]
Execute package commandcopy
$ npx -p [package] -c "[command]"
copy
SYNOPSIS
npx [options] package [args]
DESCRIPTION
npx executes npm package binaries. It first checks local node_modules/.bin, then globally installed packages, and finally downloads the package temporarily if not found.Common uses include running project scaffolding tools (create-react-app, create-next-app), one-off utilities, and testing different package versions without installing them globally.
PARAMETERS
PACKAGE
Package to execute.ARGS
Arguments to pass.--no-install
Don't install missing.-p PKG
Package to install.-c CMD
Command to run.-y, --yes
Automatically confirm prompts.--help
Display help information.
CAVEATS
Downloads on first run. Caches packages. Part of npm 5.2+.
HISTORY
npx was introduced with npm 5.2 to simplify running npm packages without installation.