CLI parsing so easy — a tiny, type-safe CLI builder for Bun & Node.
Declare your options and arguments, and clipse infers their types into a fully
typed action callback. Subcommands, default commands, global options,
auto-generated help, and bash completion are all included.
📖 Documentation: https://gouz.github.io/clipse/
bun add clipse # or: npm install clipseimport { 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!opts.loud is a boolean, args.who is a string — inferred from what you
declared. Unknown keys and wrong value types fail to compile.
The docs follow the Diátaxis framework:
- Tutorial — build your first CLI step by step.
- How-to guides — options, arguments, subcommands, completion, and more.
- Reference — the full
ClipseAPI and types. - Explanation — design philosophy and how type inference works.
bun install
bun run docs:dev # local preview at http://localhost:5173
bun run docs:build # production buildMIT © gouz