Skip to content

feat: Implement Thicc weight tracking CLI with full feature set#1

Merged
tryonlinux merged 1 commit intomainfrom
thicc-1FirstPass
Dec 21, 2025
Merged

feat: Implement Thicc weight tracking CLI with full feature set#1
tryonlinux merged 1 commit intomainfrom
thicc-1FirstPass

Conversation

@tryonlinux
Copy link
Owner

A command-line weight tracker with visualization, built with Go, Cobra, Lipgloss, and SQLite.

Features:

  • Add, modify, delete, and view weight entries
  • Automatic BMI calculation and storage
  • Support for both metric (kg/cm) and imperial (lbs/in) units
  • ASCII line graph showing weight trend over time
  • Goal weight tracking with visual goal line on graph
  • Table display with date, weight, and BMI
  • First-launch setup wizard for units, height, and goal weight
  • SQLite database storage in ~/.thicc/weights.db

Commands:

  • add [date] - Add weight entry (defaults to today)
  • show [number|date] - Display table and graph (default: last 20)
  • modify - Update existing entry
  • delete - Remove entry
  • goal - Set goal weight
  • reset - Wipe all data and settings

Technical Implementation:

  • Validation package with proper date/number validation and bounds checking
  • BMI calculator supporting all unit combinations
  • Graph rendering with Bresenham's line algorithm
  • Modular architecture with separate packages for calculator, database, display, models
  • Comprehensive test suite (23 tests)
  • GitHub Actions for PR testing and releases
  • Demo data scripts for testing

🤖 Generated with Claude Code

A command-line weight tracker with visualization, built with Go, Cobra, Lipgloss, and SQLite.

Features:
- Add, modify, delete, and view weight entries
- Automatic BMI calculation and storage
- Support for both metric (kg/cm) and imperial (lbs/in) units
- ASCII line graph showing weight trend over time
- Goal weight tracking with visual goal line on graph
- Table display with date, weight, and BMI
- First-launch setup wizard for units, height, and goal weight
- SQLite database storage in ~/.thicc/weights.db

Commands:
- add <weight> [date] - Add weight entry (defaults to today)
- show [number|date] - Display table and graph (default: last 20)
- modify <id> <weight> - Update existing entry
- delete <id> - Remove entry
- goal <weight> - Set goal weight
- reset - Wipe all data and settings

Technical Implementation:
- Validation package with proper date/number validation and bounds checking
- BMI calculator supporting all unit combinations
- Graph rendering with Bresenham's line algorithm
- Modular architecture with separate packages for calculator, database, display, models
- Comprehensive test suite (23 tests)
- GitHub Actions for PR testing and releases
- Demo data scripts for testing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link

✅ Test Results: PASSED

Test Output
=== RUN   TestCalculateBMI_MetricUnits
--- PASS: TestCalculateBMI_MetricUnits (0.00s)
=== RUN   TestCalculateBMI_ImperialUnits
--- PASS: TestCalculateBMI_ImperialUnits (0.00s)
=== RUN   TestCalculateBMI_MixedUnits_KgInches
--- PASS: TestCalculateBMI_MixedUnits_KgInches (0.00s)
=== RUN   TestCalculateBMI_MixedUnits_LbsCm
--- PASS: TestCalculateBMI_MixedUnits_LbsCm (0.00s)
=== RUN   TestCalculateBMI_Underweight
--- PASS: TestCalculateBMI_Underweight (0.00s)
=== RUN   TestCalculateBMI_Overweight
--- PASS: TestCalculateBMI_Overweight (0.00s)
=== RUN   TestFormatWeight
--- PASS: TestFormatWeight (0.00s)
=== RUN   TestFormatBMI
--- PASS: TestFormatBMI (0.00s)
=== RUN   TestFormatDate
--- PASS: TestFormatDate (0.00s)
=== RUN   TestGoalDifferenceCalculation
=== RUN   TestGoalDifferenceCalculation/Need_to_lose_weight
=== RUN   TestGoalDifferenceCalculation/Need_to_gain_weight
=== RUN   TestGoalDifferenceCalculation/At_goal_weight
=== RUN   TestGoalDifferenceCalculation/Small_amount_to_lose
=== RUN   TestGoalDifferenceCalculation/Large_amount_to_gain
--- PASS: TestGoalDifferenceCalculation (0.00s)
    --- PASS: TestGoalDifferenceCalculation/Need_to_lose_weight (0.00s)
    --- PASS: TestGoalDifferenceCalculation/Need_to_gain_weight (0.00s)
    --- PASS: TestGoalDifferenceCalculation/At_goal_weight (0.00s)
    --- PASS: TestGoalDifferenceCalculation/Small_amount_to_lose (0.00s)
    --- PASS: TestGoalDifferenceCalculation/Large_amount_to_gain (0.00s)
=== RUN   TestGoalWeightWithWeightEntries
--- PASS: TestGoalWeightWithWeightEntries (0.04s)
=== RUN   TestGoalWeightEdgeCases
=== RUN   TestGoalWeightEdgeCases/Normal_goal
=== RUN   TestGoalWeightEdgeCases/Zero_goal
=== RUN   TestGoalWeightEdgeCases/Large_goal
=== RUN   TestGoalWeightEdgeCases/Small_goal
=== RUN   TestGoalWeightEdgeCases/Decimal_goal
--- PASS: TestGoalWeightEdgeCases (0.06s)
    --- PASS: TestGoalWeightEdgeCases/Normal_goal (0.01s)
    --- PASS: TestGoalWeightEdgeCases/Zero_goal (0.01s)
    --- PASS: TestGoalWeightEdgeCases/Large_goal (0.01s)
    --- PASS: TestGoalWeightEdgeCases/Small_goal (0.01s)
    --- PASS: TestGoalWeightEdgeCases/Decimal_goal (0.01s)
=== RUN   TestAddAndGetWeights
--- PASS: TestAddAndGetWeights (0.01s)
=== RUN   TestDeleteWeight
--- PASS: TestDeleteWeight (0.01s)
=== RUN   TestModifyWeight
--- PASS: TestModifyWeight (0.01s)
=== RUN   TestGetWeightsBetweenDates
--- PASS: TestGetWeightsBetweenDates (0.01s)
=== RUN   TestGoalWeightSetting
--- PASS: TestGoalWeightSetting (0.01s)
=== RUN   TestUpdateGoalWeight
--- PASS: TestUpdateGoalWeight (0.01s)
=== RUN   TestGoalWeightDifferentUnits
=== RUN   TestGoalWeightDifferentUnits/Imperial
=== RUN   TestGoalWeightDifferentUnits/Metric
=== RUN   TestGoalWeightDifferentUnits/Mixed_LbsCm
=== RUN   TestGoalWeightDifferentUnits/Mixed_KgIn
--- PASS: TestGoalWeightDifferentUnits (0.05s)
    --- PASS: TestGoalWeightDifferentUnits/Imperial (0.01s)
    --- PASS: TestGoalWeightDifferentUnits/Metric (0.01s)
    --- PASS: TestGoalWeightDifferentUnits/Mixed_LbsCm (0.01s)
    --- PASS: TestGoalWeightDifferentUnits/Mixed_KgIn (0.01s)
PASS
ok  	github.com/tryonlinux/thicc/tests	0.216s

@tryonlinux tryonlinux merged commit 88057b4 into main Dec 21, 2025
1 check passed
@tryonlinux tryonlinux deleted the thicc-1FirstPass branch December 21, 2025 04:43
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