gentleman-bubbletea

Implement Bubble Tea UI patterns for screen management and input handling.

1.9k|282|Updated Nov 19, 2023
One-click install
npx skills add https://github.com/Gentleman-Programming/Gentleman.Dots --skill gentleman-bubbletea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gentleman-bubbletea
Source: https://github.com/Gentleman-Programming/Gentleman.Dots/tree/main/skills/gentleman-bubbletea
Command: npx skills add https://github.com/Gentleman-Programming/Gentleman.Dots --skill gentleman-bubbletea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides Bubble Tea UI patterns and best practices to guide the development of the Gentleman.Dots installer’s terminal UI. It codifies a consistent approach to screen management, input handling, and transitions.

Core Features & Use Cases

  • Screen constants and a centralized Screen enum defined in model.go.
  • A single Model struct that holds all UI state and screen transitions.
  • Update logic that uses a type switch to route input events to per-screen handlers.
  • Per-screen key handlers and view integration to keep UI consistent as features evolve.

Quick Start

  • Ensure Go is installed.
  • In installer/internal/tui, review the existing Screen, Model, Update, and view patterns and adapt them for a new screen.
  • Build and run: go build ./... from the repository root and run the installer to verify UI behavior.

Frequently Asked Questions about gentleman-bubbletea

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

FAQPage Schema
How do I manage multiple screens in a Bubble Tea TUI application?

To manage multiple screens in a Bubble Tea TUI, define a centralized Screen enum in model.go and use a single Model struct to hold all UI state. Route input events through a type switch in the Update logic to dedicated per-screen handlers for consistent transitions.

What is the best way to structure a Go terminal UI installer using model-view-update?

The best way to structure a Go terminal UI installer is to implement the model-view-update pattern by consolidating state in one Model struct, using a type switch for Update logic, and applying per-screen key handlers to maintain consistent UI behavior as features evolve.

How do I handle input events for different screens in a Golang TUI?

Handle input events for different screens in a Golang TUI by implementing Update logic with a type switch. This routes incoming events to dedicated per-screen key handlers, ensuring centralized input handling and consistent UI behavior across transitions.

Do I need Go installed to use Bubble Tea patterns for an installer UI?

Yes, you need Go installed to use Bubble Tea patterns for an installer UI. After reviewing the Screen, Model, and Update patterns, you can build and verify the UI behavior by running go build ./... from the repository root.

Why use a centralized Screen enum for terminal UI state management?

Use a centralized Screen enum for terminal UI state management to codify a consistent approach to screen transitions. Combined with a comprehensive Model state, it ensures UI behavior remains consistent and maintainable as new screens and features are added.

Can I use Lipgloss styling alongside per-screen handlers in a Bubble Tea application?

Yes, Lipgloss styling can be integrated with per-screen view handlers in a Bubble Tea application. By routing updates through a type switch and managing state centrally, view integration remains consistent while applying Lipgloss styles to individual screens.