withingy is a Go CLI for pulling Withings data from the terminal.
It was transplanted from the whoopy codebase, so it keeps the same overall shape:
- Cobra-based CLI
- XDG config and token storage
auth,diag,stats, and resource subcommands- root-level
--hpxexport for Hypercontext NDJSON - JSON-first output with optional
--text - installable local binary via
make install
brew tap totocaster/tap
brew install withingywithingy auth login|status|logout
withingy --hpx [--since ... --until ... --last ... --limit ...]
withingy activity list|today|view
withingy measures list
withingy sleep list|today|view
withingy weight list|today|latest
withingy workouts list|today|view|export
withingy stats daily --date YYYY-MM-DD
withingy diag [--text]
withingy versionweightandmeasuresJSON timestamps are emitted as RFC3339 UTC values.- Human-readable
--textoutput renders timestamps in your local timezone. weight listdefaults to the last 30 days when no explicit range is given.todayshortcuts andstats dailywith no--dateuse your local calendar day.
Temporary session setup:
source <(withingy completion zsh)Persisted setup examples:
withingy completion zsh > "${fpath[1]}/_withingy"
withingy completion bash > ~/.local/share/bash-completion/completions/withingy
withingy completion fish > ~/.config/fish/completions/withingy.fishConfig and tokens live under ${XDG_CONFIG_HOME:-~/.config}/withingy/.
Example:
client_id = "..."
client_secret = "..."
api_base_url = "https://wbsapi.withings.net"
oauth_base_url = "https://account.withings.com"
redirect_uri = "http://127.0.0.1:8735/oauth/callback"
scopes = "user.metrics,user.activity"Environment overrides:
WITHINGY_CLIENT_IDWITHINGY_CLIENT_SECRETWITHINGY_API_BASE_URLWITHINGY_OAUTH_BASE_URLWITHINGY_REDIRECT_URIWITHINGY_SCOPESWITHINGY_CONFIG_DIR
The auth flow is Withings-specific, not WHOOP-compatible:
- browser authorization uses
account.withings.com/oauth2_user/authorize2 - token exchange uses signed requests against
wbsapi.withings.net - refresh tokens rotate and are replaced on refresh
The current Withings docs reviewed during the transplant say loopback redirect URIs may be disallowed, but the CLI still preserves the same localhost callback/manual-paste workflow that whoopy used. If automatic callback auth fails, use manual mode and inspect docs/status.md for the current caveats.
withingy defaults to JSON output. Add --text for readable tables and summaries. For everyday use, the main pattern is today for quick checks, view YYYY-MM-DD for a specific day, and latest for the most recent weigh-in.
| Command | Description |
|---|---|
withingy auth status |
Confirm tokens are present and see expiry/scopes. |
withingy weight latest [--text] |
Show the most recent weight entry. |
withingy weight today [--text] |
Show today's weight entries. |
withingy sleep today [--text] |
Show today's sleep summaries. |
withingy sleep view YYYY-MM-DD [--text] |
Show one sleep summary for a specific date. |
withingy activity today [--text] |
Show today's activity summary. |
withingy activity view YYYY-MM-DD [--text] |
Show one activity summary for a specific date. |
withingy stats daily --date YYYY-MM-DD [--text] |
Aggregate activity, sleep, and workouts for one day. |
withingy diag [--text] |
Show config, token, and API health information. |
withingy version |
Print the installed version/build info. |
For broader history and scripting:
listcommands accept--start,--end,--limit, and--cursor.- Timestamps accept either RFC3339 or
YYYY-MM-DD. withingy --hpx ...emits Hypercontext NDJSON for imports.withingy completion <shell>generates shell completions.
# Check auth state
withingy auth status
# Latest weigh-in
withingy weight latest --text
# Today's weight entries
withingy weight today --text
# Today's sleep summary
withingy sleep today --text
# One sleep summary by date
withingy sleep view 2026-03-03 --text
# Today's activity
withingy activity today --text
# One activity summary by date
withingy activity view 2026-03-03 --text
# Quick sanity check when something looks wrong
withingy diag --text
# Daily dashboard
withingy stats daily --date 2026-03-03 --textwithingy --hpx emits canonical Hypercontext NDJSON to stdout.
Examples:
withingy --hpx | hpx import
withingy --hpx --last 30d | hpx import
withingy --hpx --since 2026-03-01 --until 2026-03-07 | hpx importThe exporter currently emits:
- body metrics for supported Withings measure groups
- sleep signposts plus session metrics
- workout signposts plus session metrics
- summary documents for daily activity and unsupported measurement groups
gofmt -w .
go test ./...
make installThe running migration ledger is in docs/status.md.