Skip to content

Bubble Tea

A Go framework for building interactive terminal apps using the Elm Architecture.

Stars
45.6k
Forks
2.6k
Licence
MIT
Language
Go
Last update
4 days ago
Type
Library

What it is

Bubble Tea is a Go framework for building terminal applications, the text-based programs you run in a command line window. It uses The Elm Architecture, a pattern where the app keeps a model of its state, updates that state when events like key presses arrive, and renders a view from that state. The README says it supports inline, full-window, or mixed terminal UIs and includes features such as keyboard and mouse handling and native clipboard support.

  • Build a shopping-list style app that moves a cursor with arrow keys and toggles items, as in the README tutorial
  • Create a full-window terminal dashboard or an inline prompt tool
  • Add keyboard and mouse handling to a command-line program
  • Combine with the separate Bubbles library for common UI components like text inputs

Great for

  • Go developers who want to build interactive command-line tools with a visual interface
  • Developers who prefer a functional, state-driven way to structure UI code
  • Teams building simple or complex terminal apps that need keyboard and mouse input
  • People who want to follow the official tutorial to learn terminal UI basics in Go

Not ideal for

  • People who do not write Go, since the framework is only for Go code
  • Anyone who needs a ready-made finished app rather than a library to build one, because it is a framework for developers
  • Projects that need a graphical desktop or web interface, since it targets terminals
Step-by-step guide: how to use Bubble TeaInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    Install with a package manager

    You'll need: Go

    Fetch the library into a Go module

    go mod tidy
  2. 2

    Run it

    • Create a Go program that imports charm.land/bubbletea/v2 as tea
    • Define a model struct to hold your app state
    • Implement Init, Update, and View methods on the model
    • Call tea.NewProgram with your initial model and run it
  3. 3

    Get the most out of it

    • Read the upgrade guide if you are moving from v1 to v2
    • Use the Bubbles library for ready-made UI components
    • Explore the examples directory linked from the README to see working programs
    • Use the Command Tutorial linked in the README to learn how to perform I/O

Downloads

Strengths

  • Simple, clear structure based on Init, Update, and View methods that the README explains step by step
  • Includes a tutorial, examples, and Go docs to help you get started
  • Used in production according to the README, with an MIT license

Trade-offs

  • Requires working knowledge of Go, as the README's tutorial states
  • The README mentions an upgrade guide from v1, so older code may need changes to work with v2
  • No binaries are provided with the latest release, so you must build from source using Go

How it compares

ProjectStarsTypeLevelUpdatedBest for
bubbletea (this)45.6kLibraryintermediate4 days agoGo developers who want to build interactive command-line tools with a visual interface
tview14.1kLibraryintermediate3 months agoGo developers building interactive command-line tools with menus, forms, or tables
termui13.6kLibraryintermediate1.3 years agoGo developers who want to build a terminal monitoring dashboard
lipgloss12kLibraryintermediate4 days agoGo developers building terminal user interfaces
kratos26kLibraryintermediate4 days agoGo developers building a set of backend services that talk over HTTP or gRPC
superfile24kAppbeginner7 days agoPeople who spend a lot of time in the terminal and want a visual file browser there

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.