HeadlinesBriefing favicon HeadlinesBriefing.com

Crust CLI Framework: TypeScript-First Bun-Native Tool with Zero Dependencies

Hacker News •
×

Crust is a new TypeScript-first CLI framework built natively for Bun that aims to fill a gap in the JavaScript ecosystem. The open-source tool, created by chenxin-yan, offers a middle ground between minimal arg parsers and heavyweight frameworks with massive dependency trees. After powering internal products, the team is now releasing Crust publicly.

What sets Crust apart is its zero runtime dependencies approach. The core package weighs just 3.6kB gzipped compared to alternatives like yargs at 509kB or oclif at 411kB. Features include full type inference from definitions, compile-time validation that catches errors before runtime, and a modular architecture where developers install only what they need. The framework also includes a plugin system with lifecycle hooks and official plugins for help, version, and shell autocompletion.

Built specifically for Bun without Node compatibility layers, Crust represents a fresh approach to CLI development in the TypeScript ecosystem. The project is currently in beta with a v1.0 release planned, though the team notes the core API should be stable after 0.1. Developers can scaffold new projects using `bun create crust my-cli` and explore the framework at crustjs.com.