nub
The fast all-in-one Node.js toolkit
What is it?
What it is
A fast all-in-one toolkit that augments Node.js instead of replacing it, written in Rust.
Why it exists
To provide a Bun-like developer experience on top of stock Node.js without replacing it, by using Node's extension surfaces to add modern features and tooling.
Who should use it
Teams building with Rust who want an open-source, self-hosted option.
Who should avoid it
Teams that need a fully managed SaaS with enterprise SLAs out of the box.
How it works
A quick walkthrough in plain English
How nub works
Step 1 of 3
You interact with it
Open nub, send a request, or connect it to your stack.
Features
Advantages
- Open source (MIT)
- Active Rust ecosystem
- Self-hosted deployment options
Disadvantages
- Requires operational ownership for self-hosted setups
- Community support varies by project maturity
Installation
native
# macOS / Linux curl -fsSL https://nubjs.com/install.sh | bash # Windows (PowerShell) irm https://nubjs.com/install.ps1 | iex # Homebrew (macOS / Linux) brew install nubjs/tap/nub # Nix (flakes) nix run github:nubjs/nub # mise mise use -g nub # Or via npm (pnpm / yarn global add work too) npm install -g --ignore-scripts=false @nubjs/nub
FAQ
What is Nub and how does it differ from tools like Bun or Deno?
Nub is a fast all-in-one toolkit that augments Node.js instead of replacing it, providing a Bun-like developer experience on top of stock Node.js. Written in Rust, it serves as a file runner, script runner, package runner, package manager, and Node version manager without introducing a new runtime, vendor-specific API surface, or lock-in.
How do I install Nub on my system?
You can install Nub via: the install script (curl -fsSL https://nubjs.com/install.sh | bash for macOS/Linux or PowerShell for Windows), Homebrew (brew install nubjs/tap/nub), Nix (nix run github:nubjs/nub), mise (mise use -g nub), or npm (npm install -g --ignore-scripts=false @nubjs/nub).
How does Nub run TypeScript files without a separate build step?
Nub runs TypeScript files by leveraging Node.js extension surfaces like --import/--require preloads and module.registerHooks() for transpilation and resolution, using the oxc Rust-based transpiler. It supports .ts, .tsx, and other extensions with full TypeScript support (including enum and namespace), extensionless imports via tsconfig.json#paths, JSX/TSX, decorators, and more, all without a build step.
How does Nub's watch mode (nub watch) work?
Nub's watch mode automatically tracks the resolved dependency graph and off-graph invalidators (like .env* files, tsconfig.json extends chain, and package.json) to restart-on-change. It uses Node's own --watch engine under the hood, preserving output by default, and requires no glob list maintenance.
How does Nub manage Node.js versions when running files?
When running a file, Nub infers the expected Node.js version from sources in this order: NODE_EXECUTABLE, package.json#devEngines, .node-version, .nvmrc, package.json#engines. It auto-installs the resolved version if needed and executes the file with that version augmented by Nub's features. You can also manage versions directly with nub node install <version>.
How does Nub's package manager performance compare to npm and pnpm?
According to benchmarks in the README, Nub's install command is approximately 2.5× faster than pnpm and 3.7× faster than npm for a warm frozen install (create-t3-app with 222 dependencies on macOS). It avoids the per-command Node.js bootstrap lag of JavaScript-based package managers by being a Rust binary powered by the Aube engine.
Featured in Videos
YouTube tutorials and walkthroughs for nub
Alternatives
Similar projects ranked by category, topics, and text overlap.