frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Crust – A CLI framework for TypeScript and Bun

https://github.com/chenxin-yan/crust
27•jellyotsiro•14h ago
We've been building Crust (https://crustjs.com/), a TypeScript-first, Bun-native CLI framework with zero dependencies. It's been powering our core product internally for a while, and we're now open-sourcing it.

The problem we kept running into: existing CLI frameworks in the JS ecosystem are either minimal arg parsers where you wire everything yourself, or heavyweight frameworks with large dependency trees and Node-era assumptions. We wanted something in between.

What Crust does differently:

- Full type inference from definitions — args and flags are inferred automatically. No manual type annotations, no generics to wrangle. You define a flag as type: "string" and it flows through to your handler.

- Compile-time validation — catches flag alias collisions and variadic arg mistakes before your code runs, not at runtime.

- Zero runtime dependencies — @crustjs/core is ~3.6kB gzipped (21kB install). For comparison: yargs is 509kB, oclif is 411kB.

- Composable modules — core, plugins, prompts, styling, validation, and build tooling are all separate packages. Install only what you need.

- Plugin system — middleware-based with lifecycle hooks (preRun/postRun). Official plugins for help, version, and shell autocompletion.

- Built for Bun — no Node compatibility layers, no legacy baggage.

Quick example:

  import { Crust } from "@crustjs/core";
  import { helpPlugin, versionPlugin } from "@crustjs/plugins";

  const main = new Crust("greet")
    .args([{ name: "name", type: "string", default: "world" }])
    .flags({ shout: { type: "boolean", short: "s" } })
    .use(helpPlugin())
    .use(versionPlugin("1.0.0"))
    .run(({ args, flags }) => {
      const msg = `Hello, ${args.name}!`;
      console.log(flags.shout ? msg.toUpperCase() : msg);
    });

  await main.execute();
Scaffold a new project:

  bun create crust my-cli
Site: https://crustjs.com GitHub: https://github.com/chenxin-yan/crustjs

Happy to answer any questions about the design decisions or internals.

Comments

landl0rd•1h ago
Is there an examples section? Would be helpful to see a demo
jellyotsiro•1h ago
one of the examples would be trynia.ai (search and index api for ai agents)

here is github: github.com/nozomio-labs/nia-cli

matt_kantor•1h ago
> Versions before 1.0 do not strictly follow semantic versioning.

Sorry for being nitpicky, but yes they do. Semantic versioning[0] allows arbitrary changes while the major version is 0:

> Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.

[0]: https://semver.org/

jellyotsiro•1h ago
thanks for the catch, what we meant is that we’re not committing to strict stability guarantees yet, so APIs may still change as we iterate toward 1.0.
matt_kantor•1h ago
I understand, but that's already implied by a 0.y.z version number.
bennettpompi1•1h ago
this is cool! i'd recommend fleshing out the README. Clicked on the link before the discussion and was a tad confused.
jellyotsiro•1h ago
will fix in the next hour!
dnlzro•1h ago
Psst, the GitHub link in your post is broken (it should be https://github.com/chenxin-yan/crust).
jellyotsiro•58m ago
thanks for flagging! the post itself works, just the link at the bottom
camkego•50m ago
This looks useful. But, it's interesting how the backend-world and front-end world keep diverging. I must admit, I had no idea what this was from the title. "CLI framework"? But in backend-land, these would typically be called "argument parsers" or "command line argument parsers". But maybe I am missing some of the functionality.
jellyotsiro•34m ago
good point.

we’re using “framework” intentionally because it goes beyond argument parsing. crust handles parsing, but also:

type inference across args + flags end to end compile-time validation (so mistakes fail before runtime) plugin system with lifecycle hooks (help, version, autocomplete, etc.) composable modules (prompts, styling, validation, build tooling) auto-generates agent skills and modules from the CLI definitions

so it sits a layer above a traditional arg parser like yargs or commander, closer to something like oclif, but much lighter and bun-native.

rgbrgb•37m ago
nice, congrats on launch. To get an idea... what's the size of a standalone hello world cli binary?
jellyotsiro•2m ago
tens of KBs (v small)

If you thought the code writing speed was your problem; you have bigger problems

https://andrewmurphy.io/blog/if-you-thought-the-speed-of-writing-code-was-your-problem-you-have-b...
87•mooreds•1h ago•41 comments

Microsoft's 'unhackable' Xbox One has been hacked by 'Bliss'

https://www.tomshardware.com/video-games/console-gaming/microsofts-unhackable-xbox-one-has-been-h...
292•crtasm•3h ago•123 comments

Kagi Small Web

https://kagi.com/smallweb/
599•trueduke•9h ago•167 comments

Node.js needs a virtual file system

https://blog.platformatic.dev/why-nodejs-needs-a-virtual-file-system
131•voctor•4h ago•113 comments

'The Secret Agent': Exploring a Vibrant, yet Violent Brazil (2025)

https://theasc.com/articles/the-secret-agent-cinematography
46•tambourine_man•3h ago•6 comments

Illinois Introducing Operating System Account Age Bill

https://www.ilga.gov/Legislation/BillStatus?DocTypeID=HB&DocNum=5511
119•terminalbraid•1h ago•133 comments

Toward automated verification of unreviewed AI-generated code

https://peterlavigne.com/writing/verifying-ai-generated-code
32•peterlavigne•1d ago•27 comments

FFmpeg 8.1

https://ffmpeg.org/index.html#pr8.1
252•gyan•4h ago•37 comments

Finding a CPU Design Bug in the Xbox 360 (2018)

https://randomascii.wordpress.com/2018/01/07/finding-a-cpu-design-bug-in-the-xbox-360/
120•mariuz•4d ago•34 comments

Spice Data (YC S19) Is Hiring a Product Specialist

https://www.ycombinator.com/companies/spice-data/jobs/P0e9MKz-product-specialist-new-grad
1•richard_pepper•2h ago

Show HN: Antfly: Distributed, Multimodal Search and Memory and Graphs in Go

https://github.com/antflydb/antfly
50•kingcauchy•3h ago•22 comments

Show HN: March Madness Bracket Challenge for AI Agents Only

https://www.Bracketmadness.ai
48•bwade818•6h ago•20 comments

Java 26 is here, and with it a solid foundation for the future

https://hanno.codes/2026/03/17/java-26-is-here/
16•mfiguiere•30m ago•1 comments

Heart, head, life, fate

https://www.lrb.co.uk/the-paper/v48/n05/steven-shapin/heart-head-life-fate
11•Petiver•4d ago•1 comments

Show HN: Crust – A CLI framework for TypeScript and Bun

https://github.com/chenxin-yan/crust
28•jellyotsiro•14h ago•13 comments

GPT‑5.4 Mini and Nano

https://openai.com/index/introducing-gpt-5-4-mini-and-nano
97•meetpateltech•2h ago•50 comments

Leanstral: Open-source agent for trustworthy coding and formal proof engineering

https://mistral.ai/news/leanstral
712•Poudlardo•22h ago•172 comments

Give Django your time and money, not your tokens

https://www.better-simple.com/django/2026/03/16/give-django-your-time-and-money/
351•dcreager•1d ago•137 comments

Building a Shell

https://healeycodes.com/building-a-shell
133•ingve•9h ago•32 comments

Efficient sparse computations using linear algebra aware compilers (2025)

https://www.osti.gov/biblio/3013883
52•matt_d•4d ago•7 comments

The Plumbing of Everyday Magic

https://plumbing-of-everyday-magic.hyperclay.com/
7•hannahilea•4d ago•0 comments

Font Smuggler – Copy hidden brand fonts into Google Docs

https://brianmoore.com/fontsmuggler/
123•lanewinfield•4d ago•64 comments

The unlikely story of Teardown Multiplayer

https://blog.voxagon.se/2026/03/13/teardown-multiplayer.html
200•lairv•4d ago•54 comments

Reverse-engineering Viktor and making it Open Source

https://matijacniacki.com/blog/openviktor
116•zggf•10h ago•55 comments

OpenSUSE Kalpa

https://kalpadesktop.org/
84•ogogmad•5h ago•57 comments

Kagi Translate now supports LinkedIn Speak as an output language

https://translate.kagi.com/?from=en&to=LinkedIn+speak
1247•smitec•14h ago•290 comments

What I Learned When I Started a Design Studio (2011)

https://www.subtraction.com/2011/12/12/when-i-started-a-design-studio/
22•colinprince•3d ago•1 comments

Sci-Fi Short Film “There Is No Antimemetics Division” [video]

https://www.youtube.com/watch?v=3v8AsTHfAG0
265•Anon84•4d ago•82 comments

Meta’s renewed commitment to jemalloc

https://engineering.fb.com/2026/03/02/data-infrastructure/investing-in-infrastructure-metas-renew...
495•hahahacorn•1d ago•226 comments

The American Healthcare Conundrum

https://github.com/rexrodeo/american-healthcare-conundrum
493•rexroad•1d ago•561 comments