Skip to content

Conversation

@DylanDevelops
Copy link
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.

Closes #42

Description

This pull request introduces a new global configuration system for the application, allowing users to set preferences such as currency, date/time formats, and timezone. It adds a new interactive CLI command (tmpo config) for managing these settings, and updates the codebase to use these global and per-project settings for formatting and display. The changes also refactor configuration-related code from internal/config to internal/settings, and update all relevant commands to use the new formatting and configuration utilities.

The most important changes are:

Global Configuration System:

  • Added a new cmd/config/config.go command that provides an interactive wizard (tmpo config) for setting global preferences (currency, date format, time format, timezone), with validation and persistent storage at ~/.tmpo/config.yaml.
  • Updated documentation in README.md and CLAUDE.md to describe the new global and per-project configuration, including supported settings and usage instructions. [1] [2] [3]

Refactoring and Codebase Consistency:

  • Migrated configuration logic from internal/config to internal/settings, and updated all imports and usages accordingly across commands (manual entry, editing, deletion, etc.). [1] [2] [3] [4]

Date/Time Formatting Improvements:

  • Replaced all direct date/time formatting in commands (edit, delete, manual, log) with new formatting helpers in internal/settings, ensuring consistent display that respects user preferences. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Currency Handling:

  • Updated currency display logic to use the new global configuration, falling back to defaults if not set, and ensuring earnings are shown with the correct currency code.

These changes collectively improve user experience by enabling global customization, ensuring consistency in display, and simplifying configuration management.

Screenshots

Screenshot 2025-12-26 at 1 03 09 PM

Introduces a global configuration system (`~/.tmpo/config.yaml`) for currency, date format, time format, and timezone, managed via the new `tmpo config` command. Refactors all date and time formatting to use user preferences from the global config, updates documentation and usage guides, and removes per-project currency from `.tmporc` in favor of global settings. Cleans up related code, updates tests, and improves user experience for configuration and display consistency.
Moved all configuration-related files from internal/config to internal/settings and updated all imports and references throughout the codebase. This improves clarity by grouping all settings and configuration logic under a single, more descriptive package name.
@DylanDevelops DylanDevelops merged commit e10107c into main Dec 26, 2025
6 checks passed
@DylanDevelops DylanDevelops deleted the ravel/global-configuration-file branch December 26, 2025 21:23
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.

Currency shown on tmpo stats is only correct for current directory

2 participants