Type-safe by design
Options and arguments you declare are inferred into the action callback — wrong keys and wrong value types fail to compile.
A tiny, type-safe CLI builder for Bun & Node. Declare options and arguments, get a fully typed action callback.
import { Clipse } from "clipse";
new Clipse("greet", "say hello", "1.0.0")
.addOptions({
loud: { short: "l", type: "boolean", description: "shout it" },
})
.addArguments([{ name: "who", description: "who to greet" }])
.action((args, opts) => {
const msg = `Hello, ${args.who ?? "world"}!`;
console.log(opts.loud ? msg.toUpperCase() : msg);
})
.ready();$ greet Alice --loud
HELLO, ALICE!This documentation follows the Diátaxis framework: