lipgloss

Lipgloss Crystal port

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

  1. Add the dependency to your shard.yml:

    dependencies:
      lipgloss:
        github: dsisnero/lipgloss
    
  2. Run shards install

  3. 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

  1. Create an issue: /forge-create-issue
  2. Implement: /forge-implement-issue <number>
  3. Self-review: /forge-reflect-pr
  4. Address feedback: /forge-address-pr-feedback
  5. Update changelog: /forge-update-changelog

Contributors

Repository

lipgloss

Owner
Statistic
  • 0
  • 0
  • 0
  • 5
  • 10
  • 17 days ago
  • February 5, 2026
License

MIT License

Links
Synced at

Sun, 08 Mar 2026 04:15:53 GMT

Languages