bubbletea

hmans's avatarfrom hmans

Browse Bubbletea TUI framework documentation and examples. Use when working with Bubbletea components, models, commands, or building terminal user interfaces in Go.

⭐127stars🔀7forks📁View on GitHub🕐Updated Dec 28, 2025⬇️1downloads

When & Why to Use This Skill

This Claude skill streamlines the development of Terminal User Interfaces (TUI) in Go by providing instant access to Bubbletea framework documentation and real-world code examples. It helps developers master The Elm Architecture (Model-Update-View) and implement complex interactive components like lists, tables, and paginators efficiently.

Use Cases

  • 1. TUI Component Integration: Quickly find and adapt source code for UI elements such as progress bars, spinners, and filtered lists into your Go projects.
  • 2. Architectural Reference: Understand how to structure Go applications using the Model-Update-View pattern to handle state and side effects (Cmd/Msg) correctly.
  • 3. Interactive CLI Design: Access best practices for handling user input, viewport scrolling, and keyboard shortcuts within a terminal environment.
  • 4. Ecosystem Exploration: Discover and integrate related Charm libraries like Lipgloss for styling, Glamour for Markdown, and Bubbles for pre-built components.
namebubbletea
descriptionBrowse Bubbletea TUI framework documentation and examples. Use when working with Bubbletea components, models, commands, or building terminal user interfaces in Go.

Bubbletea Documentation

Bubbletea is a Go framework for building terminal user interfaces based on The Elm Architecture.

Key Resources

When you need to understand Bubbletea patterns or find examples:

  1. Examples README - Overview of all available examples: https://github.com/charmbracelet/bubbletea/blob/main/examples/README.md

  2. Examples Directory - Full source code for all examples: https://github.com/charmbracelet/bubbletea/tree/main/examples

How to Use

  1. First, fetch the examples README to get an overview of available examples:

    WebFetch https://github.com/charmbracelet/bubbletea/blob/main/examples/README.md
    
  2. Once you identify a relevant example, fetch its source code from the examples directory.

Common Examples to Reference

  • list - List component with filtering
  • table - Table component
  • textinput - Text input handling
  • textarea - Multi-line text input
  • viewport - Scrollable content
  • paginator - Pagination
  • spinner - Loading spinners
  • progress - Progress bars
  • tabs - Tab navigation
  • help - Help text/keybindings display

Core Concepts

  • Model: Application state
  • Update: Handles messages and returns updated model + commands
  • View: Renders the model to a string
  • Cmd: Side effects that produce messages
  • Msg: Events that trigger updates
  • Bubbles: Pre-built components (github.com/charmbracelet/bubbles)
  • Lipgloss: Styling and layout (github.com/charmbracelet/lipgloss)
  • Glamour: Markdown rendering (github.com/charmbracelet/glamour)