# zkat/npx

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/zkat-npx).**

2,623 stars · 105 forks · JavaScript · other · archived

## Links

- GitHub: https://github.com/zkat/npx
- Homepage: https://github.com/npm/npx
- awesome-repositories: https://awesome-repositories.com/repository/zkat-npx.md

## Topics

`cli` `npm` `package-manager`

## Description

npx is a tool that combines Node version management, on-demand package running, caching installation, remote execution, and shell command fallback into a single interface. It functions as an npm package runner that executes binaries on demand without requiring a global or local install, while also serving as an on-demand package installer that downloads and caches packages automatically before running their commands.

The tool distinguishes itself through its ability to install and use specific Node.js versions on the fly for executing commands or scripts, and by replacing the shell's default handler for missing commands with automatic npm package lookup. It can fetch and run commands directly from Git repositories or remote tarballs, and supports running shell commands with access to specified npm packages without needing a separate project or global install.

npx handles package execution with version selection, custom arguments, remote sources, multiple packages, inline scripts, and temporary contexts. It can execute a command using one or more specified packages as the context, pass extra Node.js flags to the executed binary, and run a specific package version by fetching that version on demand. The shell integration allows overriding the command-not-found handler and setting up automatic fallback so packages run without explicit npx invocation.

## Tags

### Development Tools & Productivity

- [Temporary Binary Execution](https://awesome-repositories.com/f/development-tools-productivity/binary-packaging-tools/temporary-binary-execution.md) — Creates a transient environment where specified packages are available for a single command execution.
- [Package Caches](https://awesome-repositories.com/f/development-tools-productivity/package-caches.md) — Stores downloaded packages in a local cache to avoid redundant network fetches for repeated commands.
- [Install-Free Package Runners](https://awesome-repositories.com/f/development-tools-productivity/package-installers/install-free-package-runners.md) — Executes any npm package directly from the registry without requiring a global or local install. ([source](https://github.com/zkat/npx/blob/latest/.gitignore))
- [On-Demand](https://awesome-repositories.com/f/development-tools-productivity/package-installers/on-demand.md) — Downloads and caches npm packages automatically before running their commands without permanent installation.
- [On-Demand Package Runners](https://awesome-repositories.com/f/development-tools-productivity/package-installers/on-device-package-installations/on-demand-package-runners.md) — Downloads and caches npm packages on demand to run their binaries without permanent installation.
- [Pathless Package Execution](https://awesome-repositories.com/f/development-tools-productivity/package-linking-tools/pathless-package-execution.md) — Executes a command from an npm package without installing it globally, downloading the package temporarily if needed. ([source](https://github.com/zkat/npx#readme))
- [Auto-Fallback Shell Configurations](https://awesome-repositories.com/f/development-tools-productivity/automatic-shell-integrations/auto-fallback-shell-configurations.md) — Configures the shell to automatically use npx when a command is not found, so packages run without explicit npx invocation. ([source](https://github.com/zkat/npx#readme))
- [Custom Argument Binary Executions](https://awesome-repositories.com/f/development-tools-productivity/binary-packaging-tools/temporary-binary-execution/custom-argument-binary-executions.md) — Passes extra Node.js flags, like --inspect, to the executed binary. ([source](https://github.com/zkat/npx#readme))
- [Command Not Found Fallbacks](https://awesome-repositories.com/f/development-tools-productivity/cli-command-frameworks/default-command-fallbacks/command-not-found-fallbacks.md) — Replaces the shell's default handler for missing commands with automatic npm package lookup and execution.
- [Custom Package Context Executions](https://awesome-repositories.com/f/development-tools-productivity/custom-package-context-executions.md) — Executes a command using one or more specified packages as the context, without requiring a global install. ([source](https://github.com/zkat/npx#readme))
- [Remote Package Executors](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/package-metadata-querying/remote-repository-querying/remote-package-executors.md) — Fetches and runs commands directly from Git repositories or remote tarballs without prior installation.
- [Remote Source Executions](https://awesome-repositories.com/f/development-tools-productivity/package-installers/repository-based-package-installations/remote-source-executions.md) — Fetches and runs a package directly from a Git repository or tarball URL without prior installation.
- [Dependency-Inlined Scripts](https://awesome-repositories.com/f/development-tools-productivity/package-script-execution/dependency-inlined-scripts.md) — Running shell commands with access to specified npm packages without needing a separate project or global install.
- [Inline Script Runners](https://awesome-repositories.com/f/development-tools-productivity/package-script-execution/inline-script-runners.md) — Runs a shell command with access to specified npm packages, without needing a separate project or global install. ([source](https://github.com/zkat/npx#readme))
- [Remote Package Executors](https://awesome-repositories.com/f/development-tools-productivity/remote-package-executors.md) — Fetches and executes a package directly from a Git repository or remote tarball. ([source](https://github.com/zkat/npx#readme))
- [Command Not Found Fallbacks](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution/command-not-found-fallbacks.md) — Replaces the shell's command-not-found handler to automatically resolve missing commands via npm package lookup.
- [Command-Not-Found Handlers](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution/command-not-found-handlers.md) — Replaces the shell's default handler for missing commands, enabling automatic package lookup and execution. ([source](https://github.com/zkat/npx#readme))
- [Multi-Package Shell Commands](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution/multi-package-shell-commands.md) — Installs several packages and runs a shell command that uses all of them in one invocation. ([source](https://github.com/zkat/npx#readme))
- [Command Interception Hooks](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/terminal-cli-enhancements/shell-terminal-utilities/automation-integration-tools/shell-integration/command-interception-hooks.md) — Hooks into the shell's command-not-found handler to automatically resolve and run missing commands via package lookup.
- [On-Demand Version Runners](https://awesome-repositories.com/f/development-tools-productivity/versioned-package-managers/on-demand-version-runners.md) — Runs a command from a particular version of an npm package, fetching that version on demand. ([source](https://github.com/zkat/npx#readme))

### Programming Languages & Runtimes

- [On-Demand Version Installers](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-version-managers/on-demand-version-installers.md) — Installs a specific Node.js version on the fly and uses it to execute a command or script.
- [Per-Command Version Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-version-managers/per-command-version-runtimes.md) — Installs a particular Node.js version and uses it to execute a command or script. ([source](https://github.com/zkat/npx#readme))
- [Node.js Version Managers](https://awesome-repositories.com/f/programming-languages-runtimes/node-js-version-managers.md) — Installs and uses specific Node.js versions on the fly to execute commands or scripts.

### System Administration & Monitoring

- [Binary Path Resolution](https://awesome-repositories.com/f/system-administration-monitoring/tool-binary-inventories/binary-path-resolution.md) — Resolves the binary entry point of a package from the npm registry and executes it with provided arguments.

### Web Development

- [Package On-Demand Fetching](https://awesome-repositories.com/f/web-development/data-fetching-caching/on-demand-loaders/package-on-demand-fetching.md) — Downloads and caches npm packages from the registry only when a command is invoked, avoiding permanent installation.
- [On-Demand Package Runners](https://awesome-repositories.com/f/web-development/editor-templates/cli-installers/npm-global-installers/on-demand-package-runners.md) — Executes npm package binaries on demand without requiring a global or local install.

### DevOps & Infrastructure

- [Remote Package Command Executions](https://awesome-repositories.com/f/devops-infrastructure/remote-command-execution/remote-package-command-executions.md) — Fetches and runs commands directly from Git repositories or remote tarballs without prior installation.
