wwlog unlocks the WeightWatchers data you enter in the mobile app.
It provides a CLI for exporting text, Markdown, JSON, and CSV so you can analyze your data with your own tools across a selected date range.
It also includes a TUI for browsing daily logs, comparing nutrition, and viewing insights across a selected date range.
- Log tab β day-by-day food log with a points bar, meal breakdown, and per-entry kcal; filter by date and sort entries by points or calories
- Nutrition tab β nutrient bars vs. recommended daily values, per-day averages, and asciigraph trend charts for calories, protein, carbs, and fat across the selected range
- Insights tab β a calendar heatmap of daily points budget, range summary, points by meal, macro distribution, top foods by points, and a zero-point food log
- Pipeline mode β
--json,--report, and--exportflags for scripting and file output - No DevTools required β one
--loginstep stores credentials in your system keychain
Homebrew (macOS):
brew install ali5ter/tap/wwlogBinary (macOS and Linux, no Go required):
# macOS Apple Silicon
curl -sL https://github.com/ali5ter/wwlog/releases/latest/download/wwlog_darwin_arm64.tar.gz | tar -xz
sudo mv wwlog /usr/local/bin/
# macOS Intel
curl -sL https://github.com/ali5ter/wwlog/releases/latest/download/wwlog_darwin_amd64.tar.gz | tar -xz
sudo mv wwlog /usr/local/bin/
# Linux arm64
curl -sL https://github.com/ali5ter/wwlog/releases/latest/download/wwlog_linux_arm64.tar.gz | tar -xz
sudo mv wwlog /usr/local/bin/
# Linux amd64
curl -sL https://github.com/ali5ter/wwlog/releases/latest/download/wwlog_linux_amd64.tar.gz | tar -xz
sudo mv wwlog /usr/local/bin/Go:
go install github.com/ali5ter/wwlog@latestAuthenticate once β credentials are stored securely in your system keychain:
wwlog --login# Open the TUI (defaults to the last 7 days)
wwlog
# Browse a specific date range
wwlog --start 2026-04-20 --end 2026-04-26
# Print insights report to stdout (no TUI)
wwlog --start 2026-04-20 --end 2026-04-26 --report
# Output log as JSON to stdout
wwlog --start 2026-04-20 --end 2026-04-26 --json
# Export to a file (JSON | CSV | Markdown | report)
wwlog --start 2026-04-20 --end 2026-04-26 --export markdown
wwlog --start 2026-04-20 --end 2026-04-26 --export json --output ~/Downloads/
# Clear stored credentials
wwlog --logoutThe WW my-day endpoint enforces a hard ~90-day backwards retention window β any date more
than 89 days before today returns HTTP 400, regardless of how long you've held your WW account.
This is a server-side policy, not a wwlog limitation.
If --start is older than the window, wwlog clamps it forward and prints a one-line notice:
$ wwlog --start 2024-01-01 --end 2026-05-05 --report
note: --start clamped to 2026-02-05 (WW retains ~90 days)If --end is also older than the window, wwlog errors out before making any API calls. There's
no workaround β long-running history exports aren't possible with this API. Plan ahead if you
want to keep more than ~3 months of records: pull --export json regularly and archive the files.
The --json flag outputs a JSON array of day logs. Each element contains the date, meals
(morning / midday / evening / anytime arrays of food entries), and a points summary. Pipe it
to jq for quick ad-hoc analysis.
Daily points summary:
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '.[] | {date: .Date, used: .Points.DailyUsed, target: .Points.DailyTarget}'All food names and points across the range (flat list):
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '[.[].Meals | to_entries[].value[]] | map({name: .name, pts: .pointsPrecise})'Days where you went over budget:
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '.[] | select(.Points.DailyUsed > .Points.DailyTarget)
| {date: .Date, over: (.Points.DailyUsed - .Points.DailyTarget)}'Top foods by points for the week:
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '[.[].Meals | to_entries[].value[]]
| group_by(.name)
| map({name: .[0].name, total_pts: (map(.pointsPrecise) | add)})
| sort_by(-.total_pts) | .[0:10]'Breakfast items sorted by calories:
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '[.[].Meals.morning[]
| {name: .name,
kcal: (.defaultPortion.nutrition.calories * (.portionSize / .defaultPortion.size))}]
| sort_by(-.kcal)'The calorie calculation above mirrors what the app does internally β scale
defaultPortion.nutrition.caloriesbyportionSize / defaultPortion.size. Entries where WW omits calories (some protein/meat foods) will show0; use--reportfor accurate totals.
Average macro distribution across the range (% of calories from protein, carbs, and fat):
wwlog --start 2026-04-20 --end 2026-04-26 --json \
| jq '
[.[].Meals | to_entries[].value[]]
| map(
(if .defaultPortion.size > 0 then .portionSize / .defaultPortion.size else 1 end) as $scale
| { p: (.defaultPortion.nutrition.protein * $scale),
c: (.defaultPortion.nutrition.carbs * $scale),
f: (.defaultPortion.nutrition.fat * $scale) }
)
| (map(.p) | add) * 4 as $pkcal
| (map(.c) | add) * 4 as $ckcal
| (map(.f) | add) * 9 as $fkcal
| ($pkcal + $ckcal + $fkcal) as $total
| { protein: "\($pkcal / $total * 100 | round)%",
carbs: "\($ckcal / $total * 100 | round)%",
fat: "\($fkcal / $total * 100 | round)%" }
'Macros are scaled to the tracked portion size, then converted to kcal using Atwater factors (protein and carbs Γ4, fat Γ9) to match what the Insights tab shows.
| Key | Action |
|---|---|
β / β or k / j |
Navigate dates |
β§β / β§β |
Scroll detail pane |
/ |
Filter dates (Log and Nutrition tabs) |
s |
Cycle sort order (logged β by points β by kcal) |
r |
Change date range |
e |
Export (opens format picker) |
tab / β§tab |
Switch tabs |
q or ctrl+c |
Quit |
| Flag | Default | Description |
|---|---|---|
-s, --start |
7 days ago | Start date (YYYY-MM-DD) |
-e, --end |
today | End date (YYYY-MM-DD) |
--json |
β | Output log as JSON to stdout (no TUI) |
-r, --report |
β | Output insights report as text to stdout (no TUI) |
--export |
β | Export to file: json, csv, markdown, or report |
-o, --output |
reports/ |
Output file or directory for --export |
--no-tty |
β | Force pipeline mode even in a terminal |
--login |
β | Authenticate and store credentials |
--logout |
β | Clear stored credentials |
-l, --tld |
com |
WW top-level domain (com, co.uk, etc.) |
Optional config at ~/.config/wwlog/config.toml:
tld = "com" # WW top-level domain
weight_unit = "lb" # override weight unit: "lb" or "kg" (default: from API)
store_dir = "" # local store path (default: alongside this config file)wwlog maintains a local store of your food log data β one JSON file per day β so you can access dates beyond the WW API's ~90-day retention window.
Default location:
- macOS:
~/Library/Application Support/wwlog/store/ - Linux:
~/.config/wwlog/store/
On every run wwlog fetches the requested date range from the API and upserts each day into the store. Dates older than 89 days are served from the store automatically.
Cloud sync: set store_dir in config.toml to a folder inside Dropbox, iCloud
Drive, or any synced directory to share your history across machines:
store_dir = "~/Dropbox/wwlog-store"wwlog was inspired by wwtracked by
Joshua Wright.
