dotfiles-bubbletea

Implements Bubbletea TUI patterns for adding screens and navigation to the dotfiles Go installer.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/albersg/dotfiles --skill dotfiles-bubbletea-albersg
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dotfiles-bubbletea
Source: https://github.com/albersg/dotfiles/tree/main/skills/dotfiles-bubbletea
Command: npx skills add https://github.com/albersg/dotfiles --skill dotfiles-bubbletea-albersg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding new screens, keyboard navigation, and scrollable content to a Bubbletea-based TUI installer requires following strict architectural conventions; this Skill codifies those patterns so changes stay consistent with the existing codebase. ## Core Features & Use Cases - Screen Architecture Patterns: Enforces Screen constants in model.go, centralized Model state, and type-switch Update handling for all TUI screens. - Navigation & Scrolling: Provides reusable patterns for cursor movement, separator skipping, back navigation via PrevScreen, and height-aware scrollable lists. - Async Message Handling: Shows how to define custom message types and tea.Cmd loaders for asynchronous data loading. - Use Case: When adding a new feature selection screen to the dotfiles installer, follow the decision tree to wire the screen constant, key handler, view case, and title in the correct files. ## Quick Start Add a new screen to the TUI installer following the Bubbletea patterns for model, update, and view files.

Frequently Asked Questions about dotfiles-bubbletea

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

FAQPage Schema
How do I add a new screen to a Bubbletea TUI application?▼

Define a Screen constant in model.go, add state fields to the Model struct, register a handler in the handleKeyPress switch, create a handle{Screen}Keys function in update.go, and add a view case plus title in view.go.

How to handle keyboard input in Bubbletea Update function?▼

Use a type switch on tea.Msg inside Update, matching tea.KeyMsg for keyboard input and tea.WindowSizeMsg for resize events. Delegate to per-screen handler functions that return (tea.Model, tea.Cmd).

How do I implement scrollable lists in Bubbletea?▼

Store a scroll offset integer in the Model, compute visible items from the window height, clamp scrolling between zero and the maximum offset, and reset the scroll position when leaving the screen.

How does back navigation work in a Bubbletea multi-screen app?▼

Keep a PrevScreen field in the Model to record the previous screen. On escape key presses, set Screen to PrevScreen and reset the cursor to zero for consistent navigation state.

How do I load data asynchronously in Bubbletea?▼

Define a custom message struct carrying data and error, return a tea.Cmd that performs the load and yields that message, then handle the message in the Update type switch to populate Model state.