Charm Bracelet

Introduction

The fun, functional, and stateful way to build terminal apps.

Bubble Tea Logo
Latest ReleaseGoDocBuild Status

Why Bubble Tea?

Bubble Tea is a Go framework for building terminal user interfaces (TUIs) that are fun, functional, and stateful. Inspired by the Elm architecture, it simplifies creating interactive CLI tools, dashboards, games, and more. Whether you’re crafting a simple script or a complex TUI, Bubble Tea handles terminal rendering, events, and state management, making development intuitive and enjoyable.

Bubble Tea’s Elm-like architecture ensures predictable, testable code, letting you focus on building great user experiences.

Bubble Tea Example

Key Concepts

Bubble Tea’s power lies in its simple, Elm-inspired architecture:

A struct holding your app’s state—everything needed to render the UI. Think of it as the single source of truth for your application’s data.

A function that processes messages (e.g., key presses, window resizes) and updates the model. This is where your app’s logic lives, responding to user or system events.

A pure function that takes the model and returns a string to display on the terminal. It reflects the current state without modifying it.

Key Features

Simple API

Easy to learn, quick to build with.

Cross-Platform

Runs seamlessly on Linux, macOS, and Windows.

Functional & Predictable

Elm-like structure for clean, testable code.

Built-in Components

Leverage Bubbles for pre-built UI components like text inputs and lists.

Bubbles BadgeText Input Example from Bubbles

Explore Bubbles for reusable components to speed up your development!

Get Started

Ready to build your first TUI? Follow these steps:

Install Bubble Tea

Ensure Go is installed. See the installation guide for details.

Build a Simple App

Try the tutorial or explore official examples to get hands-on.

Join the Community

Join our discord or join discussions on GitHub to dive deeper.

What’s Next?

Dive into Bubble Tea with these resources:

How is this guide?