charmbracelet/lipgloss ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go library for making terminal output look polished and easy to lay out.

I want it to let developers create reusable styles in a simple chainable way, kind of like CSS for the terminal. It should support text colors, backgrounds, bold, italic, underline options, strikethrough, hyperlinks when the terminal allows them, padding, margins, width, height, alignment, borders, and nice block layouts.

It should handle different terminal color abilities gracefully, including basic ANSI colors, 256 colors, true color, and plain black and white output. If a terminal can’t show something, it should fall back cleanly instead of looking broken.

Please include helpers for joining and sizing text blocks, wrapping text, blending or adjusting colors, and building common terminal UI pieces like lists, tables, and trees. Add examples and tests so it’s clear how people should use it.

Use Go, keep the API friendly and declarative, and look up current terminal styling docs online if needed.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab