Skip to content

Switch from fatih/color to charmbracelet/lipgloss - #259

Open
nathanjcochran wants to merge 2 commits into
mainfrom
nathan/lipgloss
Open

nathanjcochran wants to merge 2 commits into
mainfrom
nathan/lipgloss

Conversation

@nathanjcochran

@nathanjcochran nathanjcochran commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Replaces fatih/color with charmbracelet/lipgloss for colored output. Lipgloss is more capable and more widely used, it integrates with the BubbleTea UIs we already use, and it doesn't rely on mutable global state like color.NoColor.

Color handling now lives in the output streams rather than in individual commands. The root command wraps stdout and stderr in writers that strip or downsample ANSI sequences to suit the terminal, so commands render styles unconditionally, and --color=false (or color: false in the config) turns color off for both streams in one place.

This also fixes some color bugs. fatih/color only checks whether stdout is a terminal, and the per-command overrides that worked around this for stderr also ignored the user's environment (NO_COLOR, TERM=dumb) and could leak escape codes into redirected output. Now each stream checks its own terminal, and the user's environment is respected, including NO_COLOR, CLICOLOR_FORCE, and TERM=dumb.

tiger db psql hands psql the underlying file descriptors, so psql still sees a real terminal. Output sticks to the base ANSI colors, which follow the user's terminal theme.

@nathanjcochran nathanjcochran self-assigned this Oct 9, 2026
@nathanjcochran nathanjcochran changed the title Switch from fatih/color to lipgloss Switch from fatih/color to charmbracelet/lipgloss Oct 9, 2026
@nathanjcochran
nathanjcochran marked this pull request as ready for review October 9, 2026 17:30
@nathanjcochran
nathanjcochran requested a review from a team as a code owner October 9, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant