Socket
Socket
Sign inDemoInstall

npx

Package Overview
Dependencies
Maintainers
7
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npx

execute npm package binaries


Version published
Weekly downloads
125K
increased by4.4%
Maintainers
7
Weekly downloads
 
Created

What is npx?

npx is a package runner tool that comes with npm (since version 5.2.0). It allows you to execute binaries from npm packages without globally installing them. This is particularly useful for running one-off commands or scripts from npm packages.

What are npx's main functionalities?

Running Local Binaries

You can use npx to run binaries that are installed locally in your project. For example, if you have eslint installed locally, you can run it using npx without needing to reference the full path to the binary.

npx eslint .

Running Remote Binaries

npx allows you to run binaries from npm packages that are not installed locally or globally. For example, you can use npx to run create-react-app to scaffold a new React application without installing create-react-app globally.

npx create-react-app my-app

Running Specific Package Versions

You can specify a particular version of a package to run using npx. This is useful if you need to use a specific version of a tool for compatibility reasons.

npx [email protected] my-app

Running Gists

npx can run code directly from GitHub Gists. This is useful for quickly running scripts shared via Gists without needing to clone the repository.

npx gist:username/gist-id

Interactive Mode

npx can be run in interactive mode, which will prompt you to choose which version of a package to run if multiple versions are available.

npx --interactive

Other packages similar to npx

Keywords

FAQs

Package last updated on 28 Jan 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc