Skip to content

clipseCLI parsing so easy

A tiny, type-safe CLI builder for Bun & Node. Declare options and arguments, get a fully typed action callback.

Quick look

ts
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();
sh
$ greet Alice --loud
HELLO, ALICE!

Documentation, the Diátaxis way

This documentation follows the Diátaxis framework:

  • Tutorials — learning-oriented lessons that take you by the hand.
  • How-to guides — recipes for solving specific problems.
  • Reference — the precise, exhaustive description of the API.
  • Explanation — the background and design decisions.

Released under the MIT License.