This library builds on Commander.js and adds logging, prompting, busy indicators, and other I/O goodies.
npm install @libreworks/cliThis library conforms to ECMAScript Modules (ESM). You can import this module using ESM or TypeScript syntax.
import { Output, Program } from "@libreworks/cli";If you're using CommonJS, you must use dynamic imports instead.
const output = Output.create({});
const program = new Program(output, "Sample Program")
.description("A test of @libreworks/cli")
.version("0.0.1");
.action(function () {
output.write("You called the handler!");
});
await program.parseAsync();