Nub — The All-in-One JavaScript Toolkit for Node.js
Technical Deep-Dive · June 23, 2026

Nub — The All-in-One
JavaScript Toolkit for Node.js

A Rust-powered toolkit from Zod's creator Colin McDonnell that augments Node.js instead of replacing it. TypeScript runner, 24x faster scripts, built-in package manager, and Node version management — all in a single binary.

Oleg Maximov June 23, 2026 14 min read

Introduction

The JavaScript toolkit landscape just got a major new player. Nub — an all-in-one Rust-powered toolkit created by Colin McDonnell (the creator of Zod and former Bun employee) — launched on June 15, 2026, and it takes a fundamentally different approach to the developer experience problem.

While Bun and Deno try to replace Node.js with from-scratch alternative runtimes, Nub does something smarter: it augments Node.js. It's a single Rust binary that transpiles TypeScript via the oxc native addon, runs scripts 24x faster than pnpm run, installs dependencies 2.5x faster, manages Node versions, and handles .env loading — all on top of the stock node binary you already have.

In this deep-dive, I'll walk through what Nub does, how it works under the hood, how it compares to existing tools like tsx, ts-node, and npx, and whether it's ready for your development workflow.

What Is Nub?

Nub is a single Rust CLI binary that combines six major developer experience tools into one command:

The tagline sums it up well: "augments the Node you already have." No new runtime, no lock-in, no migration required.

Why Nub Exists: The Problem It Solves

Node.js is the gold standard for server-side JavaScript. It defines the standard library the entire ecosystem depends on and sets the bar for stability and trust. But that stability comes with a cost: Node ships new developer experience features slowly.

Over the years, the community bolted on a fragmented toolchain of separate tools:

Bun and Deno proved there's enormous demand for an all-in-one experience. But six years after Deno 1.0 and two and a half years after Bun 1.0, neither has made a serious dent in Node's production dominance. Neither is a first-class target on AWS, GCP, or Azure, and their Node.js compatibility still trails significantly — Nub passes 98.8% of Deno's own Node-compatibility corpus, versus 77.4% for Deno and 40.5% for Bun.

Nub takes the insight that augmentation beats replacement. Your production infrastructure runs on Node.js, and that's not changing anytime soon. Why fight it?

Installation

Installing Nub is straightforward. On macOS and Linux:

curl -fsSL https://nubjs.com/install.sh | bash

On Windows or via npm:

npm install -g --ignore-scripts=false @nubjs/nub

Once installed, you can verify it with:

nub --version

Deep Dive: Every Nub Command

nub <file> — TypeScript-First File Runner

The top-level command runs files. It's a drop-in replacement for node with the same flags, same argv, and same runtime behavior — plus full TypeScript support:

# Run a TypeScript file
nub index.ts

# With tsconfig path resolution
nub src/server.ts

# Restart on file changes
nub watch src/server.ts

# With common Node flags
nub --inspect src/server.ts

Under the hood, Nub transpiles each file through oxc — the Rust-native JavaScript/TypeScript toolchain — compiled into a Node native addon. The transpiled output runs on the stock node binary. This means:

nub run <script> — 24x Faster Script Runner

Running npm run dev or pnpm run dev involves spinning up Node.js to parse the package manager's CLI, which then spawns another process. Nub skips the overhead entirely by reading package.json directly in its Rust core:

# Instead of: pnpm run dev
nub run dev

# Instead of: yarn build
nub run build

# Pass arguments to the underlying script
nub run test -- --coverage

The benchmark: 24x faster than pnpm run in cold-start scenarios. The gains come from eliminating the Node.js interpreter startup time for the tooling layer.

nubx <bin> — 19x Faster Package Runner

npx is famously slow — it checks for updates, downloads packages, and spins up Node for every invocation. nubx does the same job without the overhead:

# Instead of: npx prisma generate
nubx prisma generate

# Instead of: pnpm exec eslint
nubx eslint src/

# Multiple CLIs
nubx jest,typescript tsc --noEmit

Nubx is approximately 19x faster than npx for running local CLIs from node_modules/.bin.

nub install — pnpm-Compatible Package Manager

Nub also handles dependency installation. It's pnpm-compatible and respects your existing lockfile format:

# Install dependencies
nub install

# Add a dependency
nub install add zod

# Add a dev dependency
nub install add -D typescript

# Remove a dependency
nub install remove lodash

Published benchmarks show nub install is ~2.5x faster than pnpm install.

nub watch — Dependency-Graph-Driven File Watching

Unlike nodemon which restarts on any file change, Nub's watch mode tracks the actual dependency graph of your application:

# Watch and restart on dependency changes
nub watch src/server.ts

# Multiple entry points
nub watch src/api.ts src/worker.ts

Only changes to imported files trigger a restart, avoiding unnecessary restarts when you edit unrelated files.

nub node — Built-in Node Version Manager

No more juggling nvm, fnm, or volta:

# Install a specific Node version
nub node install 26

# List installed versions
nub node list

# Set default version
nub node use 26.3.1

Nub also supports Corepack-style package-manager shims via nub pm shim, automatically switching between pnpm, yarn, and npm based on your project's lockfile.

Architecture: How Nub Works Under the Hood

Nub's architecture is the key differentiator. Unlike Bun and Deno, which implement Node.js API surfaces from scratch (and inevitably get some of them wrong), Nub takes a simpler approach:

Aspect Nub Bun / Deno
Runtime Stock Node.js Node Custom runtime (Zig / Rust+V8)
TypeScript oxc native addon → transpiled in memory Built-in transpiler (Stripped types or SWC)
Node compat 98.8% (stock Node) 77.4% (Deno) / 40.5% (Bun)
Cloud support Every provider (it's Node) AWS, GCP, Azure (limited)
Lock-in None — files run on plain Node too High — runtime-specific APIs
Startup overhead Zero for tooling (Rust CLI) Low (custom runtime startup)

This design means the runtime underneath IS Node. Your TypeScript code is transpiled by oxc (Rust → native addon), loaded via module.registerHooks(), and executed by the exact same node binary your production environment runs. No surprises, no compatibility gaps, no deployment issues.

For project type-checking, Nub defers to tsc — it doesn't replace the type checker. It only handles transpilation for execution.

Comparison: Nub vs the Existing Toolchain

vs tsx (TypeScript Execute)

Both Nub and tsx let you run TypeScript files with nub index.ts or tsx index.ts. The difference: Nub is built on oxc (Rust), while tsx uses esbuild (Go-based). Both are fast, but Nub adds .env loading, tsconfig path resolution, YAML/TOML imports, and decorator support out of the box — tsx handles only transpilation.

vs dotenv

dotenv requires you to add import 'dotenv/config' at the top of your entry file. Nub loads .env files automatically before Node starts, with variable expansion support (${VAR} syntax like Vite and Next.js).

vs nvm / fnm (Node Version Managers)

Nub includes nub node install so you don't need a separate version manager. It won't replace nvm for power users with complex version-switching workflows, but for most projects, having Node management baked into the toolkit simplifies setup.

Is Nub Production-Ready?

Nub launched on June 15, 2026. Like any v1.0 project, it has some caveats:

For local development, CI script execution, and monorepo tooling — Nub is already a compelling alternative to the fragmented toolchain it replaces.

FAQ

What is Nub?
Nub is an all-in-one JavaScript toolkit that augments Node.js instead of replacing it. It's a single Rust binary that provides TypeScript file running, a faster script runner, a package/bin runner, a pnpm-compatible package manager, automatic .env loading, tsconfig path resolution, Node version management, and built-in watch mode.
Who created Nub?
Nub was created by Colin McDonnell, the creator of Zod — the most popular TypeScript-first schema validation library. Colin previously worked at Bun as a developer relations engineer, giving him deep insight into both the TypeScript ecosystem and the limitations of alternative runtimes. For more on Zod's own recent developments, see my Zod Compiler build-time schema validation guide.
How is Nub different from Bun or Deno?
Bun and Deno are from-scratch runtimes that try to replace Node.js entirely. Nub takes the opposite approach — it augments Node.js by transpiling TypeScript on stock Node via a Rust-powered oxc native addon. On Deno's own Node-compatibility corpus, Nub clears 98.8% of what real Node passes, versus 77.4% for Deno and 40.5% for Bun. Nub runs on every cloud that supports Node.js because it IS Node.js underneath.
How fast is Nub compared to npm scripts and npx?
According to published benchmarks, nub run is approximately 24x faster than pnpm run, nubx (the bin runner) is about 19x faster than npx, and nub install is roughly 2.5x faster than pnpm install. These gains come from Nub's Rust core which eliminates Node interpreter startup overhead for tooling commands.
Does Nub replace tsx, ts-node, dotenv, nodemon, and tsconfig-paths?
Yes — that's exactly the point. Nub replaces all of these with a single binary. The nub index.ts command handles TypeScript transpilation via oxc (replacing tsx/ts-node), automatically loads .env files (replacing dotenv), resolves tsconfig paths (replacing tsconfig-paths), and the nub watch command handles file watching (replacing nodemon).
Can I use Nub alongside my existing package manager?
Yes. Nub is fully compatible with existing pnpm, yarn, and npm lockfiles. The nub install command is pnpm-compatible and respects your existing lockfile. You can also use nub run to run scripts from any package manager's package.json. Nub doesn't require you to migrate your project — it layers on top of your existing setup.
What Node.js versions does Nub support?
Nub runs on Node.js 18 LTS and newer. It transpiles TypeScript through its native oxc addon and executes the output on the stock node binary your project already pins. For more on the latest Node.js 26 features like native TypeScript and SQLite, see my Node.js 26 complete guide.

Should You Try Nub?

If your daily Node.js workflow involves juggling tsx, dotenv, tsconfig-paths, nodemon, npx, pnpm run, and nvm — Nub is worth a serious look. It eliminates five separate dependencies from your setup and delivers meaningful performance improvements for common operations.

The key metric: Nub doesn't lock you in. Every file you run with Nub can also run with plain node after compilation. Every package.json script works with or without Nub. There's no new runtime, no new API surface, no migration cost. You can try it today in a single project and walk away any time.

As a full-stack developer who works extensively with the Node.js ecosystem — including React, Vue, Angular, and modern backend tooling — I've been watching the "Node.js vs alternative runtimes" debate for years. Nub is the first approach that makes me feel optimistic about a better developer experience without sacrificing everything that makes Node.js reliable in production.

Contact

Let's discuss your project

Need a web application built on Node.js? I build production-ready applications with the right tools for your specific needs — no lock-in, no hype.