lipgloss
Crystal port of the Go lipgloss terminal styling library
Borders, padding, margins, alignment, and layout helpers for terminal applications
Architecture · Development · Guidelines · Testing · PR Workflow · Porting Parity · Upgrade Guide
Lipgloss applies cosmetic styling to terminal output—transforming plain text into beautifully formatted, bordered, and colored displays. Like its namesake adds shine and color to lips, this library adds visual polish to command-line interfaces, making them more engaging and readable.
Quick Start
-
Add the dependency to your
shard.yml:dependencies: lipgloss: github: dsisnero/lipgloss -
Run
shards install -
Use in your Crystal code:
require "lipgloss" style = Lipgloss::Style.new .foreground(Lipgloss::Color::CYAN) .border(Lipgloss::Border.rounded) .padding(1, 2) puts style.render("Hello")
Features
- Fluent API: Chainable methods for intuitive styling
- Border styles: Rounded, thick, double, hidden, and custom borders
- Color support: Hex, RGB, ANSI, and adaptive terminal colors
- Layout helpers: Padding, margins, alignment, and positioning
- Terminal-aware: Adaptive rendering based on terminal capabilities
- Unicode support: Proper handling of wide characters and emoji
Migration from Go Lip Gloss v1
If you're migrating from the Go version of Lip Gloss v1, see the Upgrade Guide for detailed migration instructions, API changes, and code examples.
Development
make install # Install dependencies
make spec # Run tests
make format # Format Crystal files
rumdl fmt docs/ *.md # Format markdown documentation
See Development Guide for full setup instructions.
Documentation
| Document | Purpose |
|---|---|
| Architecture | System design and data flow |
| Development | Setup and daily workflow |
| Coding Guidelines | Code style and conventions |
| Testing | Test commands and patterns |
| PR Workflow | Commits, PRs, and review process |
| Porting Parity | Upstream source tracking from Go v2.0.0 |
| Upgrade Guide | Migrating from Lip Gloss v1 to v2 |
Contributing
- Create an issue:
/forge-create-issue - Implement:
/forge-implement-issue <number> - Self-review:
/forge-reflect-pr - Address feedback:
/forge-address-pr-feedback - Update changelog:
/forge-update-changelog
Contributors
- Dominic Sisneros - creator and maintainer
lipgloss
- 0
- 0
- 0
- 5
- 10
- 17 days ago
- February 5, 2026
MIT License
Sun, 08 Mar 2026 04:15:53 GMT