@cmdforge/pnpm-dlx
v0.0.3
Published
Run 'pnpm dlx <target> [options]' over npx, removing the pnpm dependency.
Readme
pnpm-dlx
Run pnpm dlx over npx, without requiring pnpm to already be installed.
Usage
npx @cmdforge/pnpm-dlx <target> [--path <package.json path>] [--registry <url>] [--] [...args]
npx @cmdforge/pnpm-dlx --from-cwd [--path <package.json path>] [--] <pnpm args...>Example:
npx @cmdforge/pnpm-dlx github:cmdforge/tip --path package.json -- ui open https://mcp.dev.azure.com
npx @cmdforge/pnpm-dlx --from-cwd -- dlx -y tip ui open https://mcp.dev.azure.comThe CLI:
- Treats
github:<owner>/<repo>and bare<owner>/<repo>targets as GitHub. - Fetches
--pathdirectly from GitHub raw content for GitHub targets. - Resolves a registry tarball URL with
npm viewfor registry packages, using--registryorhttps://registry.npmjs.orgby default. - In
--from-cwdmode, reads the requestedpackage.jsonfrom the current working directory and runsnpx pnpm@<version> <pnpm args...>. - Otherwise, reads the requested remote
package.json, extracts thepnpmversion, then runsnpx pnpm@<version> dlx -y <target> [...args].
This avoids npm pack for GitHub targets, so package lifecycle scripts do not run before the pnpm version is known.
If the requested manifest does not exist, or its packageManager is not pnpm@..., the command fails with:
pnpm not found at package/<resolved path>