Class

BaseCLI

BaseCLI()

Constructor

# new BaseCLI()

This class provides a foundation for building CLIs in the Fabric Weaver project. It sets up a Commander program with basic configuration and logging.

Base class for creating command-line interfaces using Commander

View Source core/cli/base-cli.ts, line 11

Example
class MyCLI extends BaseCLI {
  constructor() {
    super("my-cli", "My CLI description");
    this.setupCommands();
  }

  private setupCommands() {
    this.program
      .command("hello")
      .description("Say hello")
      .action(() => console.log("Hello, world!"));
  }
}

const cli = new MyCLI();
cli.run();

Classes

BaseCLI
BaseCLI