gitwtfhub

wtf is lipgloss?

charmbracelet/lipgloss — explained in plain English

Analysis updated 2026-06-24

11,254GoAudience · developerComplexity · 2/5Setup · easy

TL;DR

Lip Gloss is a Go library for adding colors, borders, padding, and column layouts to command-line tool output using a CSS-inspired API that automatically adapts to the user's terminal color capabilities.

Mindmap

mindmap
  root((repo))
    What it does
      Text styling
      Color output
      Layout and borders
    Design
      CSS inspired API
      Style inheritance
      Color auto downgrade
    Features
      Padding and margins
      Text alignment
      Border styles
    Ecosystem
      Charm toolchain
      Bubble Tea

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Add colored text, bold formatting, and styled borders to a Go CLI tool's output without writing raw terminal escape codes

REASON 2

Build neatly aligned, padded column layouts for a terminal dashboard or table display using Lip Gloss's block layout features

REASON 3

Define reusable text styles in Go that automatically downgrade their colors on terminals with limited color support

REASON 4

Create consistent visual themes for a Bubble Tea terminal app by sharing Lip Gloss style definitions across components

What's in the stack?

Go

How it stacks up

charmbracelet/lipglossowncast/owncastcloudwego/eino
Stars11,25411,23911,218
LanguageGoGoGo
Setup difficultyeasymoderatemoderate
Complexity2/53/54/5
Audiencedeveloperops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 30min

Wtf does this do

Lip Gloss is a Go library for styling text in terminal applications. If you have ever seen a command-line tool with colored output, neatly aligned columns, bordered boxes, or other visual formatting, that kind of output is built using libraries like this one. Lip Gloss handles all of the low-level terminal codes needed to produce those effects and exposes them through a simple, readable Go API. The design takes inspiration from CSS, the language used to style web pages. You create a style object, chain properties onto it like bold, foreground color, padding, and width, and then apply it to a string of text. Developers familiar with web styling will find the approach recognizable. Styles can inherit from other styles, and properties cascade in a way similar to how CSS inheritance works. Color support is handled gracefully across different terminal environments. You can specify colors as hex codes, standard ANSI color numbers, or 256-color values. If the user's terminal does not support the full color range you specified, Lip Gloss automatically downgrades to the best available option rather than producing broken output. Beyond text color and decoration, the library supports block-level layout features: padding, margins, minimum widths and heights, text alignment, and a variety of border styles including rounded, thick, double, and custom. It also provides utilities for working with colors mathematically, such as darkening, lightening, or finding complementary colors. Lip Gloss is part of the Charm toolchain, a collection of Go libraries aimed at making terminal user interfaces easier to build. It works alongside Bubble Tea, which is Charm's framework for building interactive terminal applications.

Yoink these prompts

Prompt 1
Using Lip Gloss in Go, how do I create a style with a rounded border, padding, and a specific hex color for a CLI status panel?
Prompt 2
How do I build a multi-column terminal layout in Go using Lip Gloss with different widths and text alignment for each column?
Prompt 3
I want my Go CLI tool's colored output to degrade gracefully on terminals that do not support 256 colors, how does Lip Gloss handle that automatically?
Prompt 4
How do Lip Gloss styles inherit from each other and how do I cascade style properties across components, similar to CSS inheritance?

Frequently asked questions

wtf is lipgloss?

Lip Gloss is a Go library for adding colors, borders, padding, and column layouts to command-line tool output using a CSS-inspired API that automatically adapts to the user's terminal color capabilities.

What language is lipgloss written in?

Mainly Go. The stack also includes Go.

How hard is lipgloss to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is lipgloss for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.