Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework

49 TonyPeakman 32 9/15/2025, 1:28:52 AM daggerjs.org ↗
TL;DR: dagger.js is a buildless, runtime-only micro-framework that plays nicely with native Web Components. It uses HTML-first directives (e.g. +click, +load) so you can ship a page by dropping a single <script> from a CDN—no bundlers, no compile step.

Why I built it Modern stacks are powerful but often heavy: bundlers, compile steps, framework DSLs, local CLIs. For internal tools, small apps, and edge/serverless deployments, I wanted something you can view-source, paste into a page, and ship.

What it is:

Runtime-only: no build or VDOM compile; hydrate behaviors directly on HTML. HTML directives: e.g. +click, lifecycle +load / +loaded / +unload / +unloaded. Zero APIs: dagger.js works in pure declarative mode, modules and directives provide everything you need to build your application. Web-Components-first: works alongside Custom Elements; keep concerns local. Distributed modules: load small, focused script modules via CDN. Progressive enhancement: the page renders without a build step.

Use cases:

Admin panels & dashboards that don’t warrant a full toolchain Embed widgets, docs-sites with interactive bits Edge/serverless apps where cold start and simplicity matter

Links

GitHub: https://github.com/dagger8224/dagger.js Docs/Guide: https://daggerjs.org Examples: https://codepen.io/dagger8224/pens

I’d love feedback on edge-cases, and where it breaks. Happy to answer tough questions here.

Comments (32)

copypaper · 1h ago
> daggerjs.org is parked free, courtesy of GoDaddy.com

I think your site broke? Also, I'd scoop up daggerjs.com while you're at it.

malfist · 4h ago
Dagger is also a compile time java dependency injection framework
throwaway290 · 49s ago
Dagger is also a well known framework/runtime for pipelines
mdaniel · 4h ago
And a very cool CI toolkit https://github.com/dagger/dagger (Apache 2)

Link to the DI mentioned by the parent comment https://github.com/google/dagger (also Apache 2)

patates · 1h ago
Was about to say that it's also a lightweight orm for .net, but apparently that's called dapper and I could swear it was dagger.
taosx · 4h ago
I’d actually love to see something that goes in the opposite direction, highly optimized and compiled, where the result is as small, fast, and efficient as possible. I get that a lot of people dislike compilation, but once I have the CI set upI never found build steps to be a problem for me.

Some time ago while I was experimenting with writing Debian benchmarks[0], I found that by completely avoiding strings, using Uint8Arrays, and manually managing bounds/memory, I could squeeze out performance that almost made you forget you were writing JavaScript. I never ended up submitting a PR, but it was pretty eye-opening.

At one point I went into a rabbit hole and tried to build something similar on my own, but it got complicated very quickly given my limited compiler knowledge. That’s why I always thought Prepack[1] was such a cool idea.

[0] https://benchmarksgame-team.pages.debian.net/benchmarksgame/... [1] https://github.com/facebookarchive/prepack

fergie · 28m ago
> I’d actually love to see something that goes in the opposite direction, highly optimized and compiled, where the result is as small, fast, and efficient as possible

Right, but that is what basically every JS framework is going for these days. Its refreshing to see somebody trying to go back to old school non-compiled js/html where every front-end is open-source(ish)

Scaevolus · 3h ago
Isn't that what Svelte was aiming to do? It's moved on a ways since then, but you can still see the fundamentals in its demos: https://svelte.dev/playground/hello-world
harrygeez · 3h ago
I’m in a similar boat like you. I would love for a React-like library that compiles down to direct JavaScript DOM transforms. Of course Svelte exists but I don’t want to mark what is reactive or not and I can’t go back to html templates after using typed JSX. Also I don’t really like the “island” like template syntax of Vue, Svelte, etc
taosx · 5m ago
I also meant more advanced optimizations beyond what svelte does, like: inlining, loop unrolling, partial evaluation that would trickle down to the frameworks as well. I am aware that some of these and others are very hard to do on javascript as prepack shows.
bytehowl · 41m ago
Isn't that actually SolidJS?

https://solidjs.com

jeswin · 2h ago
If what you're looking for is JSX and TypeScript (but without magic or reactivity), there's something I wrote here: https://webjsx.org
omtinez · 1h ago
Nice work! I'm also a fan of the runtime only frameworks. They might not be as efficient as the compiled counterparts on paper, but in my experience the performance loss is almost negligible compared to the rest of the stack.

Shameless plug to my own runtime (and compile) micro framework: https://github.com/fresho-dev/mancha

mkoryak · 4h ago
Seems neat. I wouldn't use it for personal stuff because I'd be afraid of getting locked into a framework that might not exist next year.

Once this project is about a year old, if it still has any commits, then I'd consider it.

TonyPeakman · 5h ago
thanks for taking a look!

Positioning: Think Alpine/Vue-like ergonomics but no build and WC-first.

Size & perf: Focus is on simplicity and startup latency over framework features. I’m not posting synthetic benchmarks; if you have a real page you want me to try, I’ll profile it and share results.

Interop: Works with native Custom Elements. I’m preparing examples with Shoelace/FAST.

Security: Directives are sandboxed; no eval. If you spot an injection risk, please open an issue and I’ll patch quickly.

Limitations: Complex state management, SSR/streaming, and huge SPA routing aren’t first goals.

License: MIT.

Contrib: Issues and small PRs welcome (docs, examples, tests especially).

I’ll stay in the thread to answer questions and incorporate feedback into the docs.

xupybd · 4h ago
Website looks dead. I get Godaddy domain parking.
TonyPeakman · 3h ago
Hey xupybd,thanks for reporting the issue,you may refer to the alternative site: https://000712133.deployed.codepen.website/#overview/introdu...

Thanks

xupybd · 3h ago
Hi Tony, Looks like it's up and running now. Propagation delay probably got me in New Zealand. Cool project BTW.
pylotlight · 4h ago
mdaniel · 4h ago
xupybd · 4h ago
It's working now
chrismorgan · 2h ago
No, it’s still broken. DNS is offering six choices, two of which are broken.
jodacola · 4h ago
FYI: daggerjs.org is resolving to a GoDaddy domain parked page right now.

Will check out the repo linked at the end of your message.

TonyPeakman · 4h ago
Thanks for reporting this, jodacola, it seems there is domain parsing issue sometimes, you may refer to the alternative site: https://000712133.deployed.codepen.website/#overview/introdu...
pyrolistical · 1h ago
I don’t get it. The native js Dom api has a lot of sharp edges but do people hate it that much abstract away from it?

Personally I rather have zero runtime code along side zero build by learning truly native js dom

wffurr · 4h ago
Seems like it’s been a while since a new JS framework landed on the front page.
ivape · 3h ago
The last decade gave us enough JavaScript for a lifetime.
Nickersf · 1h ago
Exactly, we also have to think about support and maintenance when building and shipping products. It's always nice to play with new things to keep the learning fresh and see what people are up to. I started with php and .NET Framework ASP and in the early-mid 2010's when the reactive JS frameworks started coming around I just never found my jive with them and just started working at C#/.NET shops and am using Blazor Server now. For my domain of web application development the .NET web application ecosystem works great. Looking at the dagger.js docs and examples found myself thinking, this is more Java(SCRIPT) development. It's going to inherit the same issues as JavaScript (weak typing, no runtime reflection, no binary build output, locked into vendor interpreters with mixed feature support), and that's not mentioning all the oddities with the way object prototypes are implemented and interact with each other. I think the ambition and result of the project are amiable. The author did good work, but it's good work on a thing we need less of in my opinion.
nivethan · 4h ago
Is this aimed at being in the same role as petite-vue and alpinejs? They also don't have a build step.

I've started to think something like petite-vue and twind would let you build small internal tools quickly, there are some major downsides to it which is why I haven't committed yet.

mythz · 3h ago
Using the full vue.js doesn't have a build step either.

I started out developing UIs using petite-vue, unfortunately ended up rewriting it to use full Vue.js after running into too many of its limitations and issues, which given that it's abandon-ware wont ever be resolved. As such I'd strongly recommend against starting projects with PetiteVue and just use the ESM build of Vue.js which also doesn't require a build step, has the full feature-set, is actively used and maintained, etc.

Either way developing Web Apps (using Vue) without a build step using JS Modules is now my preference which I've written about in my Simple, Modern JavaScript post [1]

[1] https://servicestack.net/posts/javascript

mdaniel · 4h ago
What are the criteria for $ interpolation? Is it everywhere?

  <div class="text">
        ${ winner ? 'Wins' : 'Draw' }!
  </div>
jerawaj740 · 1h ago
i don't know why i read it as DangerJs hahhahahhahahah