Skip to content

feat(tui): add styled output with lipgloss#107

Merged
CalvinAllen merged 6 commits intomainfrom
feature/tui-styled-output
Dec 12, 2025
Merged

feat(tui): add styled output with lipgloss#107
CalvinAllen merged 6 commits intomainfrom
feature/tui-styled-output

Conversation

@CalvinAllen
Copy link
Contributor

Summary

  • Add TUI styling to enhance the visual experience of the CLI using charmbracelet/lipgloss
  • Create separate internal/tui package to keep shim binary small
  • Update multiple commands with styled tables and borders

Changes

New TUI Package (internal/tui/)

  • styles.go - Color palette, text styles, box styles, indicator constants
  • table.go - Reusable table component with borders, centered titles, optional headers, configurable width, and active row highlighting

Updated Commands

  • list - Table with Version/Status columns, runtime name as title
  • list-all - Table with checkmark indicators, paging support (--limit flag), global/local status
  • current - Table with Runtime/Version/Status columns
  • version - Styled info box
  • where - Simplified to title + info box
  • --help - Custom usage with two styled tables (header + available commands)
  • --version - Intercepted to use custom version output

Other Improvements

  • Hidden completion command until implemented
  • Fixed duplicate error messages on unknown flags
  • Consistent table widths across help output

Test plan

  • dtvem --help shows styled tables
  • dtvem --version matches dtvem version
  • dtvem list shows table with version indicators
  • dtvem list-all python shows paged output with checkmarks
  • dtvem current shows active versions table
  • Unknown flags show error only once

Closes #104

Add TUI styling to enhance the visual experience of the CLI:

- Create internal/tui package (separate from ui to keep shim small)
- Add reusable Table component with borders, titles, and active rows
- Update list, list-all, current, version, where commands with tables
- Add paging support to list-all with --limit flag
- Customize help/usage output with styled tables
- Intercept --version to use custom version output
- Hide completion command until implemented
- Fix duplicate error messages on unknown flags

Closes #104
@CalvinAllen CalvinAllen force-pushed the feature/tui-styled-output branch from aa6e93c to 9136838 Compare December 12, 2025 15:55
- Use sync.Once for lazy style initialization
- Force TrueColor profile to skip slow terminal capability detection
- Fixes slow cold start on Windows caused by lipgloss background color queries

See: charmbracelet/lipgloss#86
- Show 'Regenerating shims for <Runtime>...' for each runtime
- Display summary table with runtime names and their shims
- Show total count of shims and runtimes created
- Add RehashWithCallback for progress reporting
@CalvinAllen CalvinAllen merged commit e122f89 into main Dec 12, 2025
10 checks passed
@CalvinAllen CalvinAllen deleted the feature/tui-styled-output branch December 12, 2025 16:40
@MartinodF
Copy link

@CalvinAllen you may be interested in this: charmbracelet/lipgloss#616

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Add TUI styled output with lipgloss

2 participants