cli
cli
Command-line interface.
Every command reads data/raw/observations.csv and data/raw/subject.toml of this repository unless given other paths, so they run from any directory.
The everyday loop:
daily The morning routine: record the weigh-in (and waist, when due), fill in a day of food left unlogged, then validate, plan and log the plan. log (alias eat) Add a meal, exercise energy or the step count to a day, and show what is left of today’s prescription. plan Run the controller and print a prescription for today.
Diagnostics:
validate Check a CSV before trusting anything built on it. fit-noise Phase 1. Estimate observation and trend noise from your weight history. filter Phase 2. Joint state and parameter estimation; writes state trajectories and figures. backtest Score the filter’s out-of-sample forecasts of every weigh-in. plots Every figure in one folder: weight, composition, innovations, parameters and their evolution, maintenance, plan, and prescribed versus eaten.
Exercise energy:
session-kcal Estimate a named session’s energy cost from a routine CSV (one row per exercise, no dates) – for “I did Lower A today” rather than a full dated log entry. exercise-kcal Estimate a lifting session’s energy cost from a set-by-set log in a dated workout-tracker spreadsheet.
demo Run the whole pipeline on synthetic data with known ground truth. Useful for seeing what the output looks like before you have four months of your own, and for confirming the install works.
Functions
| Name | Description |
|---|---|
| cmd_daily | The morning routine: collect what is missing, then validate, plan and log. |
| cmd_demo | End-to-end run on synthetic data with known ground truth. |
| cmd_log | Add to a day’s log (a meal, exercise, steps) and show what is left of today’s plan. |
| cmd_plots | Every figure in one directory: the filter’s, the plan’s, and the history. |
cmd_daily
cli.cmd_daily(args)The morning routine: collect what is missing, then validate, plan and log.
In a terminal it asks, in order, for yesterday’s food if that row has none, this morning’s weight, and the waist when one is due; a blank answer skips the item. Values given as flags are not asked for, and --no-input turns the questions off (for scripts), leaving only warnings.
cmd_demo
cli.cmd_demo(args)End-to-end run on synthetic data with known ground truth.
cmd_log
cli.cmd_log(args)Add to a day’s log (a meal, exercise, steps) and show what is left of today’s plan.
cmd_plots
cli.cmd_plots(args)Every figure in one directory: the filter’s, the plan’s, and the history.
One fit serves all of them. The plan figure needs a plan, made as wdm plan would with its defaults; if planning refuses (a stale estimate, a passed goal date) the other figures are still written.