Local bin runner
Run a CLI installed in the project by name, straight from node_modules — an order of magnitude faster than npx, and never reaching the registry.
Run a CLI that's already installed in the project, by name:
nub exec eslint . --fix
nub exec tsc --noEmit
nub exec vitest run --coverageThe nub exec command resolves an executable on the node_modules/.bin chain — the nearest node_modules/.bin, then up through parent directories to the workspace root — and exec's it directly. It never reaches the registry: when nothing matches, it prints an install hint and exits 127. For a name that might need fetching, use nubx, which falls through to the registry instead.
The walk-up happens in Rust, with no Node bootstrap in front of the tool — the wrapper overhead npx and pnpm exec pay on every call.
dispatch a locally-installed CLI · 50 runs
Yarn Plug'n'Play projects work too: nub exec finds PnP-registered bins that tools walking only node_modules/.bin miss. See module resolution.
Read the full docs for pnpm exec on pnpm.io.
Pass arguments
Everything after the bin name is forwarded to it untouched — there's no -- separator to remember.
nub exec eslint . --fix --max-warnings 0--node
Pass --node to run the bin with runtime augmentation disabled — see the runtime overview for the full contract.
nub exec --node tsc --noEmitRelated
- Runner —
nubx, the same local resolution with a registry fallback. - Script runner —
nub run, thepackage.jsonscript runner. - Remote bin runner —
nub dlx, for a tool that isn't installed.
Script runnernub run
A drop-in for pnpm run and npm run — every flag carries over with the same spelling and semantics, 24× faster on the cold path, with the full workspace and lifecycle-hook surface preserved.
Remote bin runnernub dlx
Fetch a package from the registry and run its bin, explicitly — the deliberate download gesture, with consent by invocation.