Skip to content

Lantern

Shared banners, prompts and progress messages for Node command-line tools, so every Fungi CLI looks and feels the same without hand-rolling terminal presentation.

  • @fungi.computer/lantern
  • v0.3.1
  • MIT

Fastest path

  1. Install

    Add it to your project with npm, pnpm, Yarn or Bun. Needs Node.js >=24.0.0.

    TERMINAL
    npm install @fungi.computer/lantern
  2. Run a task and print its result

    A noninteractive Cli runs a task and a checklist; prints the task's result to stdout.

    home.ts
    import { Cli } from "@fungi.computer/lantern";
    const cli = new Cli({ brand: "vishnu", interactive: false });
    cli.welcome("Build a game");
    const status = await cli.task("Building", async () => "ready");
    console.log(status); // "ready"
    cli.checklist()("project", status === "ready", status);