Skip to content

libreworks/cli

Repository files navigation

@libreworks/cli

MIT npm GitHub Workflow Status (branch) GitHub release (latest SemVer) codecov

This library builds on Commander.js and adds logging, prompting, busy indicators, and other I/O goodies.

Installation

npm install @libreworks/cli

This 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.

Usage

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();

Documentation

About

Node.js command-line program helpers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published