CrustJS v0.2 ยท Alpha

Build CLIs
with types.

A TypeScript-first, Bun-native CLI framework with composable modules, full type inference, and zero runtime dependencies.

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

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

await cli.execute();
Why Crust

Everything you need to build CLIs.

Designed from the ground up for TypeScript developers who want type-safe, composable command-line tools without the bloat.

Type-Safe

Full type inference from argument and flag definitions. Zero casts, complete editor support.

Zero Deps

No runtime dependencies. Just TypeScript and Bun. Lightweight and fast to install.

Composable

Modular packages that you can use independently. Pick what you need, leave the rest.

Plugins

Middleware-based hook system. Extend the CLI lifecycle with reusable plugins.

Chainable

Fluent builder API. Configure arguments, flags, and handlers in a clean, readable chain.

Bun Native

Built for Bun runtime. Fast startup, Bun APIs, and native TypeScript execution.

Ecosystem

Modular by design.

Pick the packages you need. Each module is independently versioned and composable.

Get Started

One command to scaffold.

Create a new CLI project with full TypeScript support and the complete Crust toolchain configured out of the box.

Terminal
$ bun create crust my-cli
$ cd my-cli
$ bun run dev
src/greet.tsExample CLI
import { Crust } from "@crustjs/core";
import { helpPlugin } from "@crustjs/plugins";

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

await cli.execute();

Start building with Crust.

Join the community, contribute on GitHub, or dive straight into the docs.