frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

https://github.com/nubjs/nub
103•colinmcd•2h ago

Comments

colinmcd•2h ago
Colin here, creator of Nub. I’ve had the general shape of this in mind for years. Nub runs your code with stock `node`, augmented with a `--require` preload hook[0] that adds a transpiler (oxc-powered, packaged as a Node-API add-on), registers a module resolution hook[1], and injects polyfills as needed for APIs like `Worker`, `Temporal`, etc. All purely additive, your code ultimately runs using Node’s actual engine & stdlib implementations.

[0] https://nodejs.org/api/cli.html#-require-module

[1] https://nodejs.org/api/module.html#moduleregisterhooksoption...

awaseem•1h ago
I saw this on twitter and loved it, such a good move on your part Colin. Hope the project picks up tons of steam!
eyelidlessness•25m ago
I’m surprised to see this using a `--require` hook (rather than `--import`). Maybe something’s changed significantly since I was looking into building some similar functionality… but it makes me wonder about nuances in nub’s ESM support.

(When I was investigating this it was very early in Node’s `--import` story, but there were several edge cases with the more common ESM-to-CJS approaches that I wanted to address. Most were probably exceedingly niche concerns, but I’d expect top-level await to affect a meaningful subset of users.)

ssalbdivad•2h ago
Just merged a PR migrating our entire monorepo to nub.

0 issues, ridiculously fast.

daavin•1h ago
You merged a PR migrating a shared monorepo using this within an hour of it being posted?
colinmcd•31m ago
It entered public beta last week, but just getting on HN now.
bookernath•2h ago
Nice, I think this fills a niche. Does it work on cloudflare workers?
colinmcd•1h ago
Cloudflare Workers is a different runtime and has its own toolchain around it. Nub could theoretically support it when executing files (spawn `wrangler dev` instead of `node` if wrangler.toml is detected or something) but really I'm focused on making the Node.js experience as good as possible.

The other pieces of the toolkit could absolutely be used: package manager, script runner, package runner. Works with anything that implements the Node module resolution algorithm (actually Yarn PnP also works out of the box...).

GL26•1h ago
nice ! does this work on docker containers ?
colinmcd•1h ago
Yep, full support on macOS, Linux, Windows. No official image yet (I'll start on this now) but you can get started with something like this.

  FROM node:26-slim
  RUN npm i -g @nubjs/nub
Works with any Node version down to 18.19 but recommend 22.15+ for best performance (that's when synchronous registerHooks was introduced[0])

[0] https://nodejs.org/api/module.html#moduleregisterhooksoption...

sgarrity•1h ago
I didn't even click on the link. I just came to give the author a hat-tip on the project name. Well played.
colinmcd•1h ago
Thanks :) Highly recommend clicking the link too!
gorjusborg•1h ago
Very smart. You can't lose all your customers for vibe-coding a migration to Rust if you are already written in Rust ;)
Zambyte•1h ago
They'll get bought out by OpenAI and convert the project to Zig
lacoolj•11m ago
It also helps if you're already vibe-coded and don't have customers to begin with
ivanjermakov•1h ago
Respect for embracing existing tech instead of rewriting a worse version of it. Wonder where we would be today if all alternative-building effort went to Node instead (with proper leadership).
hungryhobbit•26m ago
Fundamentally you can't fix a lot of things with this approach.

Simple example: Node is the only serious OSS software I know of that has no way to document its config (in the config file itself). It's moronic! The Node people just adopted JSON without a thought, and then refused to consider any alternatives (even "JSON with comments").

When an organization digs into bad decisions, the only way to fix them is to start something new. The entire JS ecosystem will never have documentation on its config as long as everyone keeps building on top of Node.

(And there are many other issues like this in the Node ecosystem; the utter absurdity of not being able to document config is just my personal pet peeve.)

johnfn•7m ago
> Simple example: Node is the only serious OSS software I know of that has no way to document its config (in the config file itself). It's moronic! The Node people just adopted JSON without a thought, and then refused to consider any alternatives (even "JSON with comments").

Tangential but this also drives me absolutely nuts. If I have to see `"//": "some comment"` one more time I'm gonna lose it.

johnfn•9m ago
You might remember the io.js fork of Node.js back in 2014. Node was stagnating, a bunch of people forked it into io.js, which eventually got merged back into Node and got it back on track. Or, going further back, CoffeeScript, a "fork" of JS that had its best ideas adopted back into ES5.

A small scrappy team can prove out a good idea because failure is not a catastrophic risk to them. In short, forks are part of a healthy ecosystem.

kandros•56m ago
Love the idea, learning a lot of interesting things about node hooks by reading docs and some code
montroser•36m ago
Nice. Can we get `nub --compile` up in there like Bun has?
colinmcd•32m ago
Coming very soon!
skybrian•25m ago
> TypeScript-friendly resolution: extensionless imports, tsconfig.json#paths

I’m wondering how that works. Deno has very complicated import resolution, so building my own import resolver to be compatible with it is a bit of a pain. (This is for a custom lint-like tool.)

Show HN: Nub – A Bun-like all-in-one toolkit for Node.js

https://github.com/nubjs/nub
107•colinmcd•2h ago•23 comments

Show HN: Pure Effect – Reproduce production bugs on your laptop without a DB

https://pure-effect.org
32•tie-in•2d ago•6 comments

Show HN: Monolisa v3 – a typeface for developers and creatives

https://www.monolisa.dev/
85•bebraw•2d ago•18 comments

Show HN: peerd – AI agent harness that runs entirely in your browser

https://github.com/NotASithLord/peerd
12•NotASithLord•1d ago•3 comments

Show HN: Metaspec: The DpANS3R Common Lisp Spec in S-Expr and HTML Format

https://metaspec.dev/#
4•dlowe-net•42m ago•0 comments

Show HN: Forte – Cloud infra to get startups to production faster

https://forteplatforms.com
5•mvand•1h ago•1 comments

Show HN: The most Y Combinator YC application: it applied itself

5•keepamovin•1h ago•2 comments

Show HN: eBook to audiobook narration with realistic AI voices

https://ebookaloud.com
5•flatline•2h ago•0 comments

Show HN: Graft – one golden VM image for your Mac dev box and CI runners

https://github.com/arborist-sh/graft
4•phtowel•2h ago•0 comments

Show HN: Orchid – Local-first record and replay for AI agent debugging

https://github.com/mario-guerra/orchid-trace
4•brightmonkey•2h ago•0 comments

Show HN: An ASCII 3D Rendering Engine

https://glyphcss.com
187•apresmoi•3d ago•48 comments

Show HN: L0/L1/L2 agents, leases, gates, audits, Git-worktree isolation

https://github.com/alex-reysa/glueRun-go
6•alexreysa•2h ago•0 comments

Show HN: Hacker News Job Salary Trends

https://hacker-job.com/trends
4•timqian•24m ago•0 comments

Show HN: Graphical SQL Builder and Debugger

https://github.com/webofmarius/SQLJoiner
16•matei88•2d ago•5 comments

Show HN: TikZ Editor – WYSIWYG editor for figures in LaTeX

https://tikz.dev/editor/
427•DominikPeters•1d ago•73 comments

Show HN: FastUbu – An Ultrafast Video Archive

https://fastubu.com/
42•lukeigel•2d ago•4 comments

Show HN: The Cascade Graph – An interactive map of AI and energy constraints

https://atomprophet.io/tools/cascade/
24•antisyzygy•1d ago•9 comments

Show HN: Y – A malleable coding-agent desktop app built with Electron

https://github.com/y-times-y/y
32•HetPatel106•16h ago•20 comments

Show HN: Bun-sqlgen – Type-safe raw SQL for Bun, no ORM

https://github.com/ilbertt/bun-sqlgen
55•ilbert•1d ago•37 comments

Show HN: RLM-based local debugger for AI agent traces

https://github.com/context-labs/halo
24•mikepollard_dev•22h ago•8 comments

Show HN: AI Manifesto

https://www.danstroot.com/posts/2026-06-23-ai-manifesto
4•dstroot•2h ago•0 comments

Show HN: Got sick of ads, so I made my own logic puzzle site

https://puzzlelair.com/
241•HaxleRose•2d ago•150 comments

Show HN: Neural Particle Automata

https://selforg-npa.github.io/
86•esychology•1d ago•19 comments

Show HN: Treedocs: Documentation that automatically checks for staleness

https://dandylyons.github.io/treedocs/
50•DandyLyons•1d ago•18 comments

Show HN: Shumai – open-source Frame.io alternative for creative work

https://github.com/shumaiOne/shumai
58•Yiling-J•1d ago•4 comments

Show HN: CleverCrow: give tokens to your favorite projects

https://clevercrow.io
59•zhubert•2d ago•79 comments

Show HN: Clippy for Vim

https://codeberg.org/borysj/vim-clippy
4•borysj•7h ago•0 comments

Show HN: Criterion Closet as a website – pull any of 1,247 films off the shelf

https://the-criterion-closet.vercel.app
190•olievans•4d ago•54 comments

Show HN: A pure ARM64 Assembly web server, now on Linux with CGI for no reason

https://github.com/imtomt/ymawky/tree/linux
48•imtomt•1d ago•23 comments

Show HN: Hikaru Labs – A browser-based image toolbox

https://hikarulabs.xyz
4•CFBL•9h ago•1 comments