Lip Gloss is a Go library for styling terminal output and building text-based user interfaces.
The library solves the problem of creating visually polished terminal layouts by providing a declarative, CSS-like API for applying styles to text. It handles colors across different terminal capabilities, from basic 16-color ANSI through 256-color and true color profiles, automatically downsampling to what the terminal supports. The tool supports inline formatting including text styles and underlines with multiple variants, block-level formatting with borders, padding, and margins, text alignment, and width and height constraints. It can render clickable hyperlinks in supporting terminals while degrading gracefully elsewhere.
Developers building terminal user interfaces or command-line tools should consider Lip Gloss if they want expressive styling without manually managing ANSI escape codes. The library is particularly suited to projects using Bubble Tea, Charm's terminal UI framework, though it works standalone. Those familiar with CSS will find the declarative approach natural. The README indicates the tool has evolved significantly between major versions, with an upgrade guide available for those migrating from earlier releases.
The project maintains active development with regular updates and a focus on stability. The codebase receives consistent attention to both new features and maintenance of existing functionality. The maintainers prioritize compatibility across different terminal environments and provide comprehensive documentation alongside the code.