Releases: quantcli/withings-export-cli
Release list
v1.2.0
--version
withings-export --version (and -v) now print the build version, wired to the release tag:
$ withings-export --version
withings-export version v1.2.0
Previously it errored with unknown flag: --version — the binary had no build-time version to report. Dev builds (go build without release ldflags) report dev. (#44)
Full changelog: v1.1.0...v1.2.0
v1.1.0
Headless auth
withings-export now runs in CI and containers with no interactive auth login. Set the refresh token in the environment (CONTRACT.md §5):
export WITHINGS_CLIENT_ID=...
export WITHINGS_CLIENT_SECRET=...
export WITHINGS_REFRESH_TOKEN=... # from a prior local `auth login` (see auth.json)
withings-export measurements --since 30dWITHINGS_REFRESH_TOKENtakes precedence over a savedauth.json— a container with a stale mounted config and a freshly injected secret uses the secret. This matchesliftoff-export; the rule is now written into CONTRACT.md §5 (quantcli/common#28) rather than decided per-CLI.auth statusreports the env as the source and exits 0 without a network call. Exit 0 there means "a token was supplied", not "the token works".- A failed token-file write no longer fails the export. Previously a successfully minted access token still surfaced as
token refresh failed: …whenever~/.config/withings-export/auth.jsoncould not be written — read-only rootfs, distroless, or noHOME— which is exactly the environment the headless path exists to serve. It is now a warning on stderr, exit 0.
Rotation caveat: Withings rotates the refresh token on every use, so a static WITHINGS_REFRESH_TOKEN is single-use. The rotated value is written to ~/.config/withings-export/auth.json; a repeat job must read it back and re-inject it, so mount a writable path for that file.
Also in this release
--formatis validated before any network call (#39).authrejects unknown subcommands with a non-zero exit (#32).primetrimmed to one screen per CONTRACT §6 (#33); worked example added to the README (#40).- §4 format conformance is now machine-attested against
compat/formats(#36). - Supply-chain security workflow: govulncheck, osv-scanner, license allowlist (#35, #37, #38).
- Go toolchain bumped to 1.25.12 for three stdlib advisories (GO-2026-5037, GO-2026-5039, GO-2026-5856).
Removed from the docs
withings-export auth refresh never existed — only login, logout, and status were ever registered, so the documented command fell through to help. It is gone from the README and prime. Every export subcommand already refreshes on demand.
Full changelog: v1.0.0...v1.1.0
v1.0.0
First 1.0 release. withings-export now conforms to the quantcli export-CLI contract.
Highlights since v0.2.1
primesubcommand — one-screen primer for LLM agents (#10).auth statussubcommand — one-line auth readiness check (#9).--formatreplaces--json—--format markdown|json|csv, markdown default (#7). Breaking for scripts that used--json; pass--format jsoninstead.- Harmonized date flags —
--until,today/yesterdaykeywords (#8). - Empty JSON returns
[], notnull(#11). auth refreshremoved (#30) — refresh is automatic inside export commands; the standalone subcommand was passive and printed token bytes.- Bare
auth/root invocations exit non-zero with help on stderr (#29).
Known issues
See open issues — float precision noise on some derived/structured outputs, JSON/CSV column-name drift on intraday and workouts. None block normal use.
v0.2.1
Bug fix: dates parse in local time and CSV/JSON timestamps render in local zone. Previously, --since 2026-04-15 asked the API for data starting 4+ hours earlier than intended (epoch math on UTC-parsed date), and sleep/workout/measurement/intraday timestamps output as UTC regardless of user zone. Intraday CSV column datetime_utc renamed to datetime. See #6.
v0.2.0
New
intradaysubcommand — exports minute-level samples (heart rate, HRV rmssd/sdnn1, SpO2, steps, distance) from/v2/measure?action=getintradayactivity, auto-chunking into Withings' 24h window cap. See #4.sleep --deriveflag — for nights with no Withings sleep summary, polyfills start/end from intraday heart-rate samples using a quiet-window heuristic (HR ≤ 80 mean, tolerates bathroom-visit step samples and watch-off-for-charging gaps up to 90 min). Adds asourcecolumn to CSV/JSON distinguishingsummaryvsderivedrows. See #5.
Changed
- OAuth scope simplified to
user.info,user.metrics,user.activity.user.sleepeventswas webhook-only (not needed for data retrieval) and has been dropped;user.infois now requested so device listing is available.
Breaking
- Users must re-run
auth loginafter upgrading to consent to the new scope set. Existing~/.config/withings-export/auth.jsonwill keep working for token refresh but won't haveuser.infocoverage until re-auth.
Upgrade:
brew upgrade withings-export
withings-export auth login
v0.1.1
Fixed
- Token refresh now works. Withings returns
useridas a JSON number on therefresh_tokengrant (but as a string on initial login). Previous versions failed to unmarshal this and locked users out ~3h afterauth loginuntil they re-authorized. See #3.
Upgrade with:
brew upgrade withings-export
Existing ~/.config/withings-export/auth.json files remain compatible — no re-login needed after upgrade.