Run a CLI that's already installed in the project, by name:

nub exec eslint . --fix
nub exec tsc --noEmit
nub exec vitest run --coverage

The 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, so the wrapper overhead that npx and pnpm exec pay on every call — a full Node bootstrap — approximately disappears.

dispatch a locally-installed CLI · 50 runs

nub exec11.6 ms · tie with bun x
bun x10.6 ms
pnpm exec175 ms · 15× slower
npm exec201 ms · 17× slower

View benchmark →

Yarn Plug'n'Play projects work too: nub exec finds PnP-registered bins that tools walking only node_modules/.bin miss. See module resolution.

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 --noEmit
  • Runnernubx, the unified runner that resolves a name across every tier.
  • Script runnernub run, the package.json script runner.
  • Remote bin runnernub dlx, for a tool that isn't installed.