Introduction
Nub is a Rust CLI that augments the Node you already have — TypeScript-first execution, a faster script runner, and a fast bin runner. Zero lock-in.
Nub is an all-in-one toolkit powered by Node.js that modernizes the developer experience in the Node.js ecosystem. Use it to run files, package.json scripts, and locally installed CLIs — instead of node, npm run, and npx (or the equivalents in your preferred package manager).
npm i -g @nubjs/nub
nub index.ts # run a TypeScript file
nub run dev # run a package.json script
nub watch src/server.ts # restart on file changes
nubx prisma generate # run a CLI from node_modules/.binIt's written in Rust, powered by Node.js, and provides a Bun-like modern DX on top of the node you already have installed. There is no new runtime to adopt and no lock-in: every augmentation rides on Node's own public extension surfaces.
What it combines
- A file runner (
nub index.ts) — execute.{js,cjs,mjs,jsx,ts,cts,mts,tsx}files with complete TypeScript support and perfect Node compatibility. - A script runner (
nub run) — runpackage.jsonscripts an order of magnitude faster thanpnpm run, with the full workspace and lifecycle-hook surface preserved. - A bin runner (
nubx) — run local CLIs installed in your project an order of magnitude faster thannpx. - A watcher (
nub watch) — restarts on changes to your source, your.env*files, and yourtsconfig.json. The dependency graph drives the watch set; no glob hygiene required.
Install
npm install -g @nubjs/nubBoth pnpm add -g @nubjs/nub and yarn global add @nubjs/nub work equivalently. That installs the Rust binary plus the platform-specific N-API addons, and puts nub and nubx on your PATH.
Requirements
- Node 18.19+ (Node 18 LTS) for augmented modes.
- macOS (arm64, x64), Linux (x64, arm64), Windows (x64).
Where to next
- Quick answers: the FAQ.