gentleman-bubbletea

Standardize Bubbletea TUI screens with Screen constants, centralized Model state, and Update type-switch routing.

2|Updated Jul 29, 2025
One-click install
npx skills add https://github.com/kurojs/EnderDots --skill gentleman-bubbletea-kurojs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gentleman-bubbletea
Source: https://github.com/kurojs/EnderDots/tree/main/.config/opencode/skills/gentleman-bubbletea
Command: npx skills add https://github.com/kurojs/EnderDots --skill gentleman-bubbletea-kurojs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves inconsistent, hard-to-maintain TUI behavior by standardizing how Bubbletea screens handle state, navigation, and input for the Gentleman.Dots installer.

Core Features & Use Cases

  • Screen-driven TUI architecture: Define screens as Screen constants in model.go and render them via view.go cases, making it straightforward to expand the installer UI.
  • Single source of truth state management: Keep all application state inside the Model struct so screen logic stays predictable and debuggable.
  • Deterministic input handling: Route keyboard and window-size messages through Update() using a type switch, then delegate to per-screen handlers that return (tea.Model, tea.Cmd).

Quick Start

When adding a new installer TUI screen, tell an AI to follow the gentleman-bubbletea patterns to implement the required Screen constant, state fields in Model, per-screen key handler, and view.go rendering case.

Frequently Asked Questions about gentleman-bubbletea

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

FAQPage Schema
How do I manage state consistently across multiple Bubbletea TUI screens in Go?

To manage state consistently across Bubbletea TUI screens, keep all application state inside a centralized Model struct so screen logic stays predictable and debuggable. This prevents fragile state handling when extending installer interfaces.

What is the best way to handle keyboard input and window-size messages in a Bubbletea application?

The best way to handle keyboard input in Bubbletea is routing messages through Update() using a type switch, then delegating to per-screen handlers that return (tea.Model, tea.Cmd) for deterministic input processing.

How do I structure screen transitions and navigation in a Go-based installer UI?

Structure screen transitions in a Go installer UI by defining screens as Screen constants in model.go and rendering them via view.go cases, making it straightforward to expand the TUI with predictable navigation.

Can I use Lipgloss-based UI components with a centralized Bubbletea Model state?

Yes, you can use Lipgloss-based UI components alongside centralized Bubbletea Model state. Defining Screen constants and rendering cases in view.go ensures Lipgloss components integrate smoothly with predictable state management.

Why does my Bubbletea TUI screen break when adding new navigation states?

Bubbletea TUI screens break when adding navigation states if state and input handling are inconsistent. Standardizing Screen constants, centralized Model state, and Update() type-switch routing prevents fragile, hard-to-maintain TUI behavior.