$ account charmbracelet
Bubble Tea is a Go framework for building rich terminal user interfaces based on The Elm Architecture (Model-View-Update). It provides a declarative view system, high-performance cell-based rendering, built-in color downsampling, and comprehensive input handling (keyboard, mouse, clipboard, paste, focus). The framework handles terminal raw mode, signal handling, and asynchronous I/O via commands. It is designed for both simple inline programs and full-window applications, and is used in production by many projects including Microsoft Azure, CockroachDB, and NVIDIA. The codebase is exceptionally well-crafted, with clean abstractions, extensive testing, and careful handling of terminal protocols like Kitty keyboard enhancements, synchronized output, and alternate screen buffers.
Glow is a terminal-based markdown reader written in Go. It provides both a CLI mode for rendering markdown files directly to the terminal and a TUI mode for browsing and reading local markdown files with a pager interface. The application supports reading from files, stdin, HTTP URLs, and GitHub/GitLab repositories via their APIs. It features syntax highlighting via Glamour, word wrapping, custom styles, and a configuration file. The architecture is modular: the main entry point parses commands and arguments, delegates to either the CLI renderer or the TUI program, which is built on the Bubble Tea framework. The UI is split into a stash view (file listing) and a pager view (document rendering), with models and views separated. A notable feature is support for Kitty terminal's text sizing protocol (OSC 66) to scale heading sizes, implemented in a self-contained utility module. The codebase demonstrates strong Go practices, clean abstractions, and thorough testing.
Gum is a command-line tool for creating glamorous shell scripts. It provides a collection of highly configurable, ready-to-use utilities for common interactive tasks such as choosing from a list, confirming actions, filtering items, prompting for input, writing multi-line text, displaying spinners, rendering tables, paging through content, styling text, joining text, formatting markdown/code/emoji, logging, and picking files. Each command is a standalone subcommand that reads from stdin and writes to stdout, making it composable in shell pipelines. The architecture is a monolithic Go application using the Kong argument parser to define subcommands. Each subcommand is implemented as a separate package with a model-view-update pattern using the Bubbles library for terminal UI components and Lip Gloss for styling. The main entry point (main.go) parses arguments and dispatches to the appropriate command. Configuration is done via command-line flags and environment variables, allowing deep customization of colors, borders, padding, and keybindings. Gum relies on several Charmbracelet libraries: Bubbles for interactive UI widgets (text input, textarea, spinner, table, viewport, file picker, paginator), Lip Gloss for text styling, Glamour for rendering markdown and code with syntax highlighting, and Log for structured logging. It also uses Kong for argument parsing, fuzzy matching library, and PTY handling for running commands with spinners. The codebase is well-structured, with clear separation of concerns and extensive use of Go's type system.
Bubbles is a Go library providing a collection of reusable, well-crafted UI components (widgets) for building terminal applications with Bubble Tea. Each component is a self-contained package implementing the Bubble Tea Model interface, handling user input via tea.Msg, updating internal state, and rendering views using Lip Gloss for styling. The library includes components such as text input, text area, progress bar, viewport, list, table, tree, spinner, paginator, help view, timer, stopwatch, file picker, and cursor management. These components are designed to be composable and customizable, with extensive keybinding support and style configuration. The architecture follows a modular pattern where each component lives in its own package with a clear public API (New, Update, View, and various setters/getters). Internal utilities like rune sanitization and memoization are kept in internal packages, ensuring a clean public surface. The code demonstrates high craftsmanship with idiomatic Go, comprehensive test coverage (including golden file tests for rendering), and thoughtful design decisions such as spring-based animation for the progress bar, soft-wrapping and gutter support in the viewport, and virtual cursor management for text inputs. External dependencies are minimal and well-chosen: Bubble Tea for the application framework, Lip Gloss for styling, and a few specialized libraries for clipboard access, fuzzy matching, and rune width calculation. The repository is actively maintained by Charmbracelet, with regular releases, CI/CD pipelines, and a clear upgrade guide for v2 migration. It is widely used in production applications like Glow and Charm.
Freeze is a CLI tool written in Go that generates high-quality images (PNG, SVG, WebP) of source code or terminal output. It uses syntax highlighting via Chroma, supports ANSI escape sequence rendering, and provides extensive customization options including themes, fonts, shadows, borders, and interactive configuration via a TUI. The architecture is a single binary with a well-structured codebase: main.go orchestrates parsing, lexing, and rendering; config.go handles configuration loading from JSON files or flags; ansi.go implements a custom ANSI dispatcher to build SVG text elements; svg/svg.go provides reusable SVG decoration helpers. The tool can execute shell commands and capture their output for screenshots. It follows modern Go practices, has comprehensive golden-file tests, and is actively maintained by Charmbracelet. The code is highly modular and contains several components that could be reused independently, such as the ANSI dispatcher and SVG manipulation utilities.
Mods is a CLI tool that pipes command output to large language models (LLMs) for AI-powered processing. It reads stdin, prepends a user prompt, sends the combined text to an LLM (OpenAI, Anthropic, Cohere, Google, Ollama, etc.), and streams the response to stdout. The architecture is a single Go binary using Bubble Tea for TUI (spinner, viewport) and a plugin-like provider system via the `internal/stream` interface. Key entry points are `main.go` (cobra CLI) and `mods.go` (Bubble Tea model). Data flows: stdin -> prompt assembly -> provider API call -> streaming output -> optional conversation caching (SQLite + gob files). External dependencies include multiple AI SDKs, Bubble Tea, Glamour for Markdown rendering, and SQLite for conversation storage. The repository is now archived as of March 2026, with the team focusing on a successor tool (Crush). Despite being archived, the codebase is well-structured, cleanly separated, and demonstrates strong Go engineering practices with a focus on testability and modularity.
Fang is a Go library that provides a batteries-included CLI starter kit built on top of the Cobra command-line framework. It extends Cobra with beautifully styled help output, error handling, and automatic versioning, completions, and manpage generation. The package offers a single high-level `Execute` function that wraps a Cobra root command and applies a rich set of default behaviors: full-color styled help and error pages with adaptive color schemes (including automatic terminal background detection), automatic `--version` derived from build info or explicitly set, hidden `man` and `completion` subcommands, and silent usage output (no help after a user error). It supports Windows VT processing for ANSI escape codes and color downsampling for terminals with limited color support. Architecturally, Fang is a library with a clear separation of concerns. The `fang.go` file defines the public API (`Execute`, `Option` functions, `ColorSchemeFunc`) and orchestrates the setup of the Cobra command. `help.go` contains the custom help and error rendering logic, including a usage error detector. `theme.go` defines the theming system with a `ColorScheme` struct, multiple built-in themes (default, ANSI), and a `Styles` struct that applies these colors to lipgloss styles. Platform-specific code for Windows VT processing is isolated in `fang_windows.go`. The library depends on Cobra, lipgloss v2 for styling, colorprofile for terminal color detection, and mango for manpage generation. It includes an example CLI application in `example/main.go` that showcases all features. Fang is designed for Go developers who want a production-ready, beautiful CLI experience without manually wiring up help formatting, version flags, completions, and error styling. Its theme system is extensible: users can provide their own color scheme functions that adapt to light/dark terminals. The project is actively maintained by Charmbracelet and follows modern Go conventions (e.g., `iter.Seq2` from Go 1.23).