pi-tui

Build interactive terminal UI components for pi extensions with render, handleInput, and invalidate.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/dotBeeps/hoard --skill pi-tui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pi-tui
Source: https://github.com/dotBeeps/hoard/tree/main/morsels/skills/pi-tui
Command: npx skills add https://github.com/dotBeeps/hoard --skill pi-tui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enables developers to build consistent, interactive terminal UI components for pi extensions so tools behave reliably across overlays, widgets, editors, and footers, removing ad-hoc mistakes like overflowing lines, broken theming, and improper focus/IME handling.

Core Features & Use Cases

  • Component contract: Defines render(width) returning lines under width, optional handleInput, and invalidate lifecycle to support caching and theme rebuilds.
  • Built-in primitives & rendering: Text, Box, Container, SelectList, Input, Editor, Image, and custom borders for assembling complex layouts and tool result renderers.
  • Overlays, persistent UI, and custom editors: Anchorable overlays, persistent widgets/status/footer APIs, and a CustomEditor base for integrating editors with app keybindings and IME support.
  • Use Case: Create an overlay file picker that appears centered on large terminals, uses theming for success/error states, preserves IME cursor positioning, and returns structured selection to a calling tool.

Quick Start

Implement a Component with render, handleInput, and invalidate, then register it via ctx.ui.custom to display as an overlay or persistent widget.

Frequently Asked Questions about pi-tui

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build interactive terminal UI components for pi extensions?

You build terminal UI components for pi extensions by implementing a contract requiring render(width) to return lines within width, optional handleInput, and an invalidate lifecycle for theme rebuilds. Register components via ctx.ui.custom to display overlays or persistent widgets.

What is the component contract for rendering terminal UIs in pi overlays?

The component contract for terminal UIs in pi overlays requires render(width) returning lines under the specified width, optional handleInput for input processing, and an invalidate lifecycle to support caching and theme rebuilds. This ensures tools behave reliably across overlays, widgets, and footers.

Can I create anchorable overlay dialogs and persistent footers for terminal UIs?

Yes, you can create anchorable overlay dialogs and persistent footers for terminal UIs. The framework provides anchorable overlays, persistent widgets, status APIs, and a CustomEditor base for integrating editors with app keybindings and IME support.

Does terminal UI development for pi support IME and theming?

Terminal UI development for pi supports IME and theming. Components use an invalidate lifecycle for theme rebuilds and preserve IME cursor positioning, ensuring consistent rendering for success and error states across overlays and custom editors.

What built-in primitives are available for assembling terminal UI layouts?

Built-in primitives for assembling terminal UI layouts include Text, Box, Container, SelectList, Input, Editor, Image, and custom borders. These primitives allow developers to construct complex layouts and tool result renderers for pi extensions.