← Blog
The Nub Team

Nub 0.5.0

A TypeScript-first project scaffold, create templates that answer with Nub commands, and a batch of package manager fixes.

Nub 0.5.0 ships nub init — one command scaffolds a TypeScript project that runs and typechecks immediately:

$ nub init -y
created my-app
├── package.json
├── tsconfig.json
├── index.ts
├── .gitignore
├── README.md
└── .git/

devDependencies:
+ @nubjs/types@0.4.13
+ @types/node@26.1.1
+ typescript@7.0.2

Your project is ready!
Try running `nub index.ts`

nub init

  • TypeScript 7 by default. The scaffold pins typescript@^7 — the native compiler — alongside @types/node@^26 and @nubjs/types. Nub transpiles at run time, so tsc exists purely to typecheck (noEmit) and the project has zero runtime dependencies.
  • Node types without "dom". lib stays ["es2024"]; the globals Nub polyfills (Worker, …) are typed by @nubjs/types, so window and document never leak into a Node project.
  • Real .ts imports. verbatimModuleSyntax and allowImportingTsExtensions: import specifiers say ./thing.ts and resolve exactly as Node and Nub do.
  • Strict from the first file. strict plus noUncheckedIndexedAccess and exactOptionalPropertyTypes, nodenext resolution, es2024 target.
The generated tsconfig.json
{
  "compilerOptions": {
    "module": "nodenext",
    "moduleResolution": "nodenext",
    "target": "es2024",
    "lib": ["es2024"],
    "types": ["node", "@nubjs/types"],
    "moduleDetection": "force",
    "allowImportingTsExtensions": true,
    "verbatimModuleSyntax": true,
    "isolatedModules": true,
    "noUncheckedSideEffectImports": true,
    "resolveJsonModule": true,
    "esModuleInterop": true,
    "skipLibCheck": true,
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true,
    "noEmit": true
  }
}

In a terminal, init asks three questions — name, TypeScript or JavaScript, git — each with a sensible default; -y skips them, non-interactive environments auto-default, and existing files are never overwritten without --force. The init docs have the full surface.

nub create

nub create <template> resolves the ecosystem's create-* convention (vuecreate-vue) and runs the scaffolder. As of this release the scaffolder can tell Nub is calling — #529 exports the npm_config_user_agent these tools read — so scaffolders with Nub detection respond with Nub commands. Working today:

nub create vue my-app
nub create vite my-app
nub create nuxt my-app
$ nub create vue my-app --default

└  Done. Now run:

   cd my-app
   nub install
   nub run dev

Detection PRs are open across the ecosystem — track them to see your framework land: create-next-app, create-hono, create-t3-app, create-payload-app, create-strapi-app, create-medusa-app, create-qwik, and std-env. Already merged upstream: create-vue, Nuxt, solid-cli, react-router, create-cloudflare, and package-manager-detector. create-vite needs no patch — it reads the user agent directly.

nubx returns to npx parity

nubx <name> no longer tries file and script resolution first — it resolves the node_modules/.bin chain and falls back to the registry on a miss, exactly as npx does. Files are nub <file>, scripts are nub run <script>. (#525)

Package manager

Top-level packageExtensions in the root manifest is now honored in Nub-native projects — it was already supported in pnpm- and npm-compatibility mode (#507, #509). Alongside it, a batch of correctness fixes:

AreaWhat changedPR
nub updateAccepts dist-tag specs (nub update pkg@beta)#516
Hoisted linkerWorkspace-spanning hoisted planning for nodeLinker=hoisted#511
approve-buildsRuns the approved build scripts instead of only recording approval#503
dedupeWorkspace link packages no longer appear in the dedupe diff#502
publishScope is preserved in the publish attachment key and tarball URI#478
Registry trafficDist-tag resolution is cached and metadata fetches slimmed#505

Fixes and platforms

  • nub watch forwards an explicit --env-file to the watched Node so restarts re-read it (#510).
  • A macOS group-reaper watcher prevents SIGKILL of Nub's process group from orphaning the workload (#504).
  • nub upgrade supports the self-owned channel on Windows (#506).
  • Node installs stream extraction during download and overlap the checksum fetch (#508).
  • Source builds work on Android/Termux without a JVM (#501).

The full release notes list every change in this release.

Get started

Or paste this "Get Started" prompt into an agent. It will install Nub and explain how it can be used in your project. (It won't make any changes without permission.)