LinuxCommandLibrary

npx

TLDR

Run package command

$ npx [package-name]
copy
Run specific version
$ npx [package]@[version]
copy
Run without installing
$ npx --no-install [package]
copy
Run with arguments
$ npx [create-react-app] [my-app]
copy
Run from GitHub
$ npx github:[user]/[repo]
copy
Run local binary
$ npx [./node_modules/.bin/command]
copy
Execute package command
$ npx -p [package] -c "[command]"
copy

SYNOPSIS

npx [options] package [args]

DESCRIPTION

npx executes npm packages. Runs packages without global installation.
The tool fetches and runs commands. Ideal for one-off tool usage.
npx runs npm packages.

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.
--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.

SEE ALSO

npm(1), npm-exec(1), yarn(1)

Copied to clipboard