Skip to content

Releases: quantcli/withings-export-cli

v1.2.0

Choose a tag to compare

@DTTerastar DTTerastar released this 30 Jul 19:35
59abfc0

--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

Choose a tag to compare

@DTTerastar DTTerastar released this 24 Jul 01:44
535b4d1

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 30d
  • WITHINGS_REFRESH_TOKEN takes precedence over a saved auth.json — a container with a stale mounted config and a freshly injected secret uses the secret. This matches liftoff-export; the rule is now written into CONTRACT.md §5 (quantcli/common#28) rather than decided per-CLI.
  • auth status reports 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.json could not be written — read-only rootfs, distroless, or no HOME — 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

  • --format is validated before any network call (#39).
  • auth rejects unknown subcommands with a non-zero exit (#32).
  • prime trimmed 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

Choose a tag to compare

@DTTerastar DTTerastar released this 26 Apr 00:37
5bbfc67

First 1.0 release. withings-export now conforms to the quantcli export-CLI contract.

Highlights since v0.2.1

  • prime subcommand — one-screen primer for LLM agents (#10).
  • auth status subcommand — one-line auth readiness check (#9).
  • --format replaces --json--format markdown|json|csv, markdown default (#7). Breaking for scripts that used --json; pass --format json instead.
  • Harmonized date flags--until, today/yesterday keywords (#8).
  • Empty JSON returns [], not null (#11).
  • auth refresh removed (#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

Choose a tag to compare

@DTTerastar DTTerastar released this 22 Apr 00:47
a509aa7

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

Choose a tag to compare

@DTTerastar DTTerastar released this 21 Apr 02:09
4e87534

New

  • intraday subcommand — 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 --derive flag — 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 a source column to CSV/JSON distinguishing summary vs derived rows. See #5.

Changed

  • OAuth scope simplified to user.info,user.metrics,user.activity. user.sleepevents was webhook-only (not needed for data retrieval) and has been dropped; user.info is now requested so device listing is available.

Breaking

  • Users must re-run auth login after upgrading to consent to the new scope set. Existing ~/.config/withings-export/auth.json will keep working for token refresh but won't have user.info coverage until re-auth.

Upgrade:

brew upgrade withings-export
withings-export auth login

v0.1.1

Choose a tag to compare

@DTTerastar DTTerastar released this 20 Apr 20:00
7c347c4

Fixed

  • Token refresh now works. Withings returns userid as a JSON number on the refresh_token grant (but as a string on initial login). Previous versions failed to unmarshal this and locked users out ~3h after auth login until 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.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 20 Apr 09:22

Changelog

  • d761de5 Fix OAuth + API decoding; add WITHINGS_CALLBACK_URL support
  • fabeb75 Initial scaffold for withings-export-cli