pnx

별칭: pnpm dlx, pnpx

의존성으로 설치하지 않고 레지스트리에서 패키지를 가져와 핫로드하고 노출하는 기본 명령 바이너리를 실행합니다.

예를 들어, 다른 프로젝트에 설치하지 않고 어디서든 create-vue를 사용하여 Vue 프로젝트를 부트스트랩하려면 다음을 실행하면 됩니다:

pnx create-vue my-app

이 명령은 레지스트리에서 create-vue를 가져와 주어진 인수로 실행합니다.

사용하려는 패키지의 정확한 버전을 지정할 수도 있습니다.

pnx create-vue@next my-app

catalog: 프로토콜도 지원되므로 워크스페이스 카탈로그에 정의된 버전을 사용할 수 있습니다:

pnx shx@catalog:

패키지 관리자 또는 런타임 실행#

추가된 버전: v12.0.0-rc.6 (pnpm v12 전용)

Naming one of the package managers pnpm provisions (pnpm, npm, yarn, bun), or a runtime (node, deno, bun), provisions the real thing instead of installing the npm package that shares its name:

pnx yarn@4 install
pnx npm@11 ci
pnx bun@1.3.0 install
pnx node@22 --version

The npm packages with those names are either a different line of the tool or a wrapper that downloads it. For example, Yarn 4 is published as @yarnpkg/cli-dist, so pnx yarn@4 runs Yarn 4 itself, and pnx node@22 runs that Node.js release.

릴리스된 버전을 요청하는 대신 패키지의 위치를 지정하는 지정자는 해당 대상을 변경 없이 그대로 설치합니다:

pnx yarn@npm:yarn@1.22.22
pnx yarn@yarnpkg/berry

패키지 관리자를 지정하는 --package는 해당 관리자의 어떤 명령을 실행할지 선택합니다:

pnx --package npm@11 npx create-something

Running a Rust release#

Added in: v12.11.1

--package=rust@<channel> runs a tool of that Rust toolchain release, such as cargo or rustc. pnpm installs the release into the store first. The channel is written the way rust-toolchain.toml writes it, and a bare rust means stable.

pnx --package=rust@nightly-2026-01-01 cargo build --target wasm32-unknown-unknown

The release gets the profile, components, and targets of the rust-toolchain.toml that governs the current directory, plus the target of each --target argument.

옵션#

--package <name>#

명령을 실행하기 전에 설치할 패키지를 입력합니다.

예시:

pnx --package=@pnpm/meta-updater meta-updater --help
pnx --package=@pnpm/meta-updater@0 meta-updater --help

설치를 위해 여러 패키지를 제공할 수 있습니다:

pnx --package=yo --package=generator-webapp yo webapp --skip-install

--allow-build#

A list of package names that are allowed to run build scripts during installation. Repeat the option or, since v12.23.0, separate names with commas.

예시:

pnx --allow-build=esbuild my-bundler bundle

The actual packages executed by pnx are allowed to run build scripts by default. 따라서 위 예시에서 my-bundler를 실행 전에 빌드해야 하는 경우 빌드됩니다.

Prefixing a name with ! denies its build scripts, including for the executed package itself:

pnx --allow-build=!my-bundler my-bundler bundle

When a dependency's build scripts are skipped, pnx prompts you to approve them in an interactive terminal. This also applies when reusing a cached install that still has builds awaiting approval. Approved scripts run before the requested command.

Approval decisions are saved in the isolated pnx cache. They do not change the calling project's build settings.

Without an interactive terminal, unapproved build scripts remain skipped. Use --allow-build to allow the dependencies whose scripts the command needs.

--shell-mode, -c#

쉘 내부에서 명령을 실행합니다. Uses /bin/sh on UNIX and cmd.exe on Windows.

예시:

pnx --package cowsay --package lolcatjs -c 'echo "hi pnpm" | cowsay | lolcatjs'

--minimum-release-age <minutes>, --minimum-release-age-exclude <package-spec>#

Added in: v12.23.0

Set minimumReleaseAge and minimumReleaseAgeExclude for this run, as they do for pnpm install.

--cpu, --os, --libc#

Choose which platform-tagged optional dependencies the pnx install keeps, by CPU architecture, operating system, and C library (glibc or musl). Repeat an option or separate values with commas:

pnx --cpu arm64,x64 --os linux some-cli

--silent, -s#

실행된 명령의 결과만 출력됩니다.

보안 및 신뢰 정책#

pnx (and its pnpm dlx / pnpx aliases) honors the project-level security and trust policy settings when resolving and fetching the requested package:

즉, pnx는 일반 pnpm install과 마찬가지로 새로 게시되었거나 신뢰가 부족한 패키지의 실행을 거부합니다.

pnx ignores other project-local execution, hook, and directory settings in the current directory (pnpmfile, globalPnpmfile, configDependencies, scriptShell, cacheDir, storeDir, ignoreScripts, overrides, packageExtensions, and patchedDependencies), while keeping user-level global configuration active.