Skip to content

Implement CLI styling with Charm.sh tools for enhanced user experience - #4

Merged
liamgallear merged 5 commits into
mainfrom
copilot/fix-02999c5e-3350-45c9-8303-2dd4aa5c01fe
Sep 24, 2025
Merged

Implement CLI styling with Charm.sh tools for enhanced user experience#4
liamgallear merged 5 commits into
mainfrom
copilot/fix-02999c5e-3350-45c9-8303-2dd4aa5c01fe

Conversation

Copilot AI commented Sep 24, 2025

Copy link
Copy Markdown
Contributor

This PR transforms the md_split CLI tool from basic text output to a modern, visually appealing interface using Charm.sh's ecosystem.

What's Changed

Visual Enhancements

  • Colorful Status Messages: Added green ✓ checkmarks for successful file operations, blue 📄 icons for merge operations, and red ✗ symbols for errors
  • Real-time Progress Bars: Interactive progress indicators show completion status during file processing with animation and statistics
  • Styled Summary Boxes: Professional bordered completion messages that clearly highlight operation results
  • Enhanced Error Messages: Red-styled error messages with clear symbols make problems immediately visible

Technical Implementation

  • New Style System: Created internal/style package with Lipgloss-based styling functions and a professional color palette
  • Progress Tracking: Integrated github.com/schollz/progressbar/v3 for smooth progress visualization
  • Modular Design: Clean separation of styling logic from business logic for maintainability
  • Backward Compatibility: All original functionality preserved with no breaking changes

Before/After Examples

Before (plain text):

Created: 01-introduction.md
Created: 02-installation.md
Successfully split markdown into 2 files in splits

After (styled output):

ℹ Writing split files...
✓ Created: 01-introduction.md
✓ Created: 02-installation.md
100% |████████████████████| (2/2, 1234 it/s)

╭──────────────────────────────────────────╮
│ Successfully split markdown into 2 files │
╰──────────────────────────────────────────╯

Dependencies Added

  • github.com/charmbracelet/lipgloss v1.1.0 - Terminal styling framework
  • github.com/schollz/progressbar/v3 v3.18.0 - Progress bar library

All dependencies have been security-scanned and contain no known vulnerabilities.

Testing

  • Comprehensive testing across split and merge operations
  • Error handling verification with styled output
  • File integrity validation (split/merge operations maintain content accuracy)
  • No performance impact on core functionality

The CLI now provides a professional, modern user experience while maintaining all original functionality.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI and others added 2 commits September 24, 2025 08:32
…ss bars, and enhanced error messages

Co-authored-by: liamgallear <185555686+liamgallear@users.noreply.github.com>
…nctionality confirmed working

Co-authored-by: liamgallear <185555686+liamgallear@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement CLI styling by making use of Charm.sh's tools Implement CLI styling with Charm.sh tools for enhanced user experience Sep 24, 2025
Copilot AI requested a review from liamgallear September 24, 2025 08:35
@liamgallear
liamgallear requested a review from Copilot September 24, 2025 09:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances the md_split CLI tool by integrating Charm.sh's styling ecosystem to provide a modern, visually appealing terminal interface while maintaining backward compatibility.

  • Added comprehensive styling system using Lipgloss with color-coded status messages and progress bars
  • Implemented real-time progress tracking for file operations using progressbar/v3
  • Enhanced error handling with styled output that makes issues immediately visible

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/style/style.go New styling package with Lipgloss-based color palette and helper functions
go.mod Added dependencies for Lipgloss styling and progressbar functionality
cmd/split.go Enhanced split command with styled output and progress tracking
cmd/root.go Updated error handling to use styled error messages
cmd/merge.go Enhanced merge command with styled output and progress tracking

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread internal/style/style.go Outdated
Comment thread internal/style/style.go Outdated
liamgallear and others added 2 commits September 24, 2025 10:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@liamgallear
liamgallear marked this pull request as ready for review September 24, 2025 09:16
@liamgallear
liamgallear merged commit 0aca978 into main Sep 24, 2025
@liamgallear
liamgallear deleted the copilot/fix-02999c5e-3350-45c9-8303-2dd4aa5c01fe branch September 24, 2025 09:20
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.

3 participants