Skip to content

refactor: Colors and Improved Formatting of Responses#13

Merged
DylanDevelops merged 3 commits into
mainfrom
ravel/improved-formatting
Dec 16, 2025
Merged

refactor: Colors and Improved Formatting of Responses#13
DylanDevelops merged 3 commits into
mainfrom
ravel/improved-formatting

Conversation

@DylanDevelops
Copy link
Copy Markdown
Owner

Pull Request Checklist

  • I have read and followed the contribution guidelines.
  • My pull request targets the main branch of tmpo.
  • I have tested these changes locally on my machine.

Description

This pull request refactors the user interface output for several CLI commands by replacing direct fmt print statements with standardized helper functions from the new ui package. This change ensures consistent formatting, improved readability, and better user experience across commands like init, log, manual, start, export, and stats.

The most important changes are:

User Interface Standardization:

  • Replaced all direct fmt-based output and error handling in cmd/init.go, cmd/log.go, cmd/manual.go, cmd/start.go, cmd/export.go, and cmd/stats.go with calls to the new ui package functions such as PrintError, PrintSuccess, PrintWarning, PrintInfo, PrintMuted, PrintSeparator, NewlineAbove, and NewlineBelow. This includes error messages, warnings, info, and success messages, as well as formatting for durations and muted text. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]

Command Output Improvements:

  • Enhanced the output of commands to include clearer sectioning, emoji indicators, and visually distinct warnings, errors, and info messages, improving the overall usability and professionalism of the CLI. [1] [2] [3] [4] [5] [6] [7]

Codebase Consistency:

  • Updated import statements in all affected command files to include the new ui package. [1] [2] [3] [4] [5] [6]

These changes make the CLI output more user-friendly and maintainable by centralizing formatting logic and improving consistency across commands.

Screenshots

N/A

Replaces direct fmt print statements in command files with new functions from internal/ui/format.go for consistent colored and emoji-enhanced output. Adds internal/ui/format.go, which provides color constants, emoji constants, and utility functions for printing success, error, warning, info, muted messages, separators, and formatted durations. This improves the user experience with clearer, visually distinct CLI feedback and centralizes output formatting logic.
Replaces 'Estimated Earnings' with 'Earnings' in output messages for consistency and clarity across manual and stats commands.
@DylanDevelops DylanDevelops merged commit 03f93df into main Dec 16, 2025
3 checks passed
@DylanDevelops DylanDevelops deleted the ravel/improved-formatting branch December 16, 2025 22:33
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