Live data from Hacker News

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

github.com

11–20 of 48 posts

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

#12
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.

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

#14
post #12

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.

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.

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

#17
post #13

nice, congrats on launch. To get an idea... what's the size of a standalone hello world cli binary?

tens of KBs (v small)

Isn't a standalone Bun binary like 50MB because it has to bundle the runtime? How could this get smaller?

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

#19
post #12

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.

Both in the frontend and the backend, I've usually used "If it calls your code, it's a framework, if you call its code, it's a library", and would seem to fit here too. An argument parser you'd call from your main method, then do stuff with what it returns. In Crust, it seems you instead setup the command + what will happen when it's called, then let the framework call your code.
Post reply on HN