tui-dev

Guide MVU-based TUI app development with the Charm Bracelet ecosystem.

11|2|Updated Jan 3, 2022
One-click install
npx skills add https://github.com/hay-kot/dotfiles --skill tui-dev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tui-dev
Source: https://github.com/hay-kot/dotfiles/tree/main/.ai/skills/tui-dev
Command: npx skills add https://github.com/hay-kot/dotfiles --skill tui-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds robust terminal user interfaces by providing a comprehensive architecture and best-practice guidelines for MVU-based applications using Bubble Tea, Lipgloss, and Bubbles.

Core Features & Use Cases

  • Clear MVU patterns for Model, Init, Update, and View to keep UI logic pure and testable.
  • Component-driven design with guidance on focus management, layout, and theming.
  • Dialogs, overlays, and input handling patterns for resilient terminal apps.
  • Styling guidance with Lipgloss for consistent theming across light/dark backgrounds.
  • Testing strategies, including golden rendering tests and unit tests for Update logic.

Quick Start

Create a minimal MVU-based TUI app by defining a pure Model, an Init command, an Update handler, and a View that returns a tea.View with a rendered Content.

Frequently Asked Questions about tui-dev

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

FAQPage Schema
How do I structure a terminal UI application using the Bubbletea MVU pattern?

To build a terminal UI with Bubbletea, structure your application using the Model-View-Update (MVU) pattern by defining a pure Model, an Init command, an Update handler, and a View that renders content. This keeps UI logic testable.

What is the best way to style terminal interfaces with Lipgloss for light and dark backgrounds?

Styling terminal interfaces with Lipgloss involves applying consistent theming guidelines that support both light and dark backgrounds. This ensures your terminal UI components maintain visual coherence across different user environments.

Can I use Bubbles components for dialogs and overlays in my terminal app?

Yes, you can use Bubbles components to implement dialogs, overlays, and input handling patterns. This approach provides resilient terminal apps by leveraging component-driven design with guidance on focus management and layout.

How do you test terminal UI Update logic and View rendering?

Testing terminal UI Update logic involves unit testing pure models and commands. You can also validate View rendering using golden rendering tests to ensure your terminal interfaces behave correctly across component updates.

Does building terminal interfaces with Bubbletea require a specific component architecture?

Building terminal interfaces with Bubbletea requires a clean, component-driven architecture. This includes specific patterns for focus management, layout composition, and theming to ensure your MVU-based TUI application remains robust and maintainable.