Skip to content
Concepts

Concepts

Shared Fungi terminal wordmarks, Clack interaction and progress

Lantern provides terminal wordmarks, prompts and progress. Most people want Oyster to run Apps or Shiitake to run Agents.

Lantern gives Fungi command-line tools shared wordmarks, prompts, and progress messages, so every command looks and feels the same without rebuilding terminal presentation from scratch. It handles terminal presentation. Each command owns its own work, credentials, persistence, and conversation state.

Cli detects interactivity from TTY input and output unless the caller passes interactive. It accepts optional input, output, and terminal width so a host can control where prompts and messages go. welcome, info, step, outro, cancel, task, and checklist provide shared presentation. A task stops its spinner on success. A failed task rethrows the original error. When a spinner is active, it displays a generic failure message without error details.

In noninteractive mode, ordinary messages are written as text and confirm returns false. text, password, select, and search throw because they require an interactive terminal. task reports progress as plain lines instead of animating a spinner.

search accepts ordered choices with labels, descriptions and optional group names. It displays group headings and can collapse one group behind a counted disclosure row. Typing searches every choice, including collapsed choices. Enter expands the disclosure or selects a choice. Callers own the catalog and group membership. Clack owns input, navigation and cancellation.

renderBanner is the browser-safe rendering entrypoint. It chooses a brand’s wide or compact art for interactive terminals, and a plain brand label for piped or no-color output. Widths below 60 columns use compact art where available; Computer omits its art at narrow widths. Set rawPty: true when writing directly to a raw pseudo-terminal to receive CRLF line endings.