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.
go install github.com/Dem1241/weight@latestThat's it: one static binary, nothing else to set up.
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| 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.
- 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_COLORto turn colour off. - Your data is a plain CSV file at
~/.local/share/weight/weights.csvthat you can edit by hand or open in any spreadsheet. SetWEIGHT_FILEto keep it somewhere else.
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
