Skip to content
Dem1241Public

About

Track your body weight in the terminal. Watch the weekly average, not the daily noise.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

weight

Track your body weight in the terminal.
Watch the weekly average, not the daily noise.

CI Go Dependencies License

weight showing this week's weigh-ins, the weekly average and progress toward a goal

Why

Your weight moves a kilo or more from one day to the next: water, salt, food, a hard training day. A single weigh-in tells you almost nothing. The average of a week does. weight keeps the log, works out the weekly averages and shows whether they are heading where you want them to, whether you are building muscle or cutting.

Install

go install github.com/Dem1241/weight@latest

That's it: one static binary, nothing else to set up.

Usage

weight 78.4          # log today's weight (78,4 works too)
weight               # this week, with the average vs last week
weight history       # weekly averages of the last 8 weeks, and the trend
weight goal 80       # set a goal: progress, colours and a time estimate
weight history showing eight weekly averages rising toward a goal
Command
weight add KG [DAY] log a weight for another day: 2026-10-20, 20.10. or yesterday
weight week [DAY|last] any week, or last week
weight history [N] the last N weeks (default 8)
weight log [N] the last N weigh-ins (default 14)
weight rm DAY delete a weigh-in
weight goal [KG|off] show, set or clear the goal

Logging the same day twice replaces the earlier value.

How it works

  • Weeks run Monday to Sunday. Each week's number is the mean of its weigh-ins, and each week is compared with the most recent week before it that has data.
  • The trend is a least-squares line through the last eight weekly averages, so one odd week barely moves it. The goal estimate divides what's left by that trend.
  • Colours follow the goal: green when a change moves toward it, red when it moves away. Without a goal, changes are neutral. Set NO_COLOR to turn colour off.
  • Your data is a plain CSV file at ~/.local/share/weight/weights.csv that you can edit by hand or open in any spreadsheet. Set WEIGHT_FILE to keep it somewhere else.

Built with Go

Standard library only: no dependencies, around 600 lines, and it starts instantly. Weigh-ins are written atomically, so a crash can't corrupt the log.

go test ./...
golangci-lint run

License

MIT

About

Track your body weight in the terminal. Watch the weekly average, not the daily noise.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages