npx
executes npm packages
TLDR
Run package command
$ npx [package-name]
Run specific version$ npx [package]@[version]
Run without installing$ npx --no-install [package]
Run with arguments$ npx [create-react-app] [my-app]
Run from GitHub$ npx github:[user]/[repo]
Run local binary$ npx [./node_modules/.bin/command]
Execute package command$ npx -p [package] -c "[command]"
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.
