lipgloss

Version, currently 2.0.14 versions

github.com/dsisnero/lipgloss

Lipgloss Crystal port

0 stars
3 dependents
License: MIT

Nothing has been indexed for 2.0.1 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.

Installation

# Add this to your shard.yml
dependencies:
  lipgloss:
    github: dsisnero/lipgloss
    version: ~> 2.0.1

Then run:

shards install

shard.yml

No shard.yml has been indexed for 2.0.1. You can read it on the repository.

Dependencies

Unknown: the shard.yml for this version has not been read yet.

README

This README is the one indexed from the repository at its latest ref, not from the tag for this version.


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

DocumentPurpose
ArchitectureSystem design and data flow
DevelopmentSetup and daily workflow
Coding GuidelinesCode style and conventions
TestingTest commands and patterns
PR WorkflowCommits, PRs, and review process
Porting ParityUpstream source tracking from Go v2.0.0
Upgrade GuideMigrating 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