--- name: pp-withings description: "Every Withings metric in one offline-first, agent-native CLI — with a local SQLite mirror and recomposition, recovery Trigger phrases: `check my withings`, `how is my weight trending`, `am I recovering or overtraining`, `sleep debt this week`, `BP report for my doctor`, `use withings`, `run withings`." author: "Greg Stellato" license: "Apache-2.0" argument-hint: " [args] | install cli|mcp" allowed-tools: "Read Bash" metadata: openclaw: requires: bins: - withings-pp-cli install: - kind: go bins: [withings-pp-cli] module: github.com/mvanhorn/printing-press-library/library/devices/withings/cmd/withings-pp-cli --- # Withings — Printing Press CLI ## Prerequisites: Install the CLI This skill drives the `withings-pp-cli` binary. **You must verify the CLI is installed before invoking any command from this skill.** If it is missing, install it first: 1. Install via the Printing Press installer. It defaults binaries to `$HOME/.local/bin` on macOS/Linux and `%LOCALAPPDATA%\Programs\PrintingPress\bin` on Windows: ```bash npx -y @mvanhorn/printing-press-library install withings --cli-only ``` 2. Verify: `withings-pp-cli --version` 3. Ensure the reported install directory is on `$PATH` for the agent/runtime that will invoke this skill. If the `npx` install fails (no Node, offline, etc.), fall back to a direct Go install (requires Go 1.26.6 or newer). This installs into `$GOPATH/bin` (default `$HOME/go/bin`), so add that directory to `$PATH` instead: ```bash go install github.com/mvanhorn/printing-press-library/library/devices/withings/cmd/withings-pp-cli@latest ``` If `--version` reports "command not found" after install, the runtime cannot see the binary directory on `$PATH`. Do not proceed with skill commands until verification succeeds. Pulls your weight/body-composition, activity, sleep, heart/ECG and workouts from the official Withings API into a local SQLite store you can search, query with SQL, and export as JSON or CSV. On top of that it adds local-join analytics — `recomp`, `recovery`, `bp-report`, `sleep debt`, `digest`, `correlate` — that no single API call can produce. ## When to Use This CLI Use this CLI when you want programmatic, offline-queryable access to your own Withings health data and analytics across metrics over time — body recomposition, training recovery, sleep debt, BP/AFib reports for a clinician, or a structured health digest to feed an LLM. It is ideal for agents answering 'how is my health trending' and for scripted exports. ## Anti-triggers Do not use this CLI for: - Do not use this CLI to push data to Garmin/TrainerRoad/Strava — use withings-sync for one-way fitness-platform sync. - Do not use it for medical diagnosis; it reports your recorded measurements and is not a clinical device. - Do not use it to access another person's Withings data — it operates only on the authorized account. ## Unique Capabilities These capabilities aren't available in any other tool for this API. ### Local-join analytics - **`recomp`** — See whether you're actually recomposing — fat mass down while lean mass holds — on a de-noised rolling-average weight, not scale-weight whiplash. _Reach for this instead of raw measures when the question is 'is my cut/bulk working', not 'what did I weigh on Tuesday'._ ```bash withings-pp-cli recomp --since 90d --agent ``` - **`recovery`** — Weigh recent workout HR-zone load against your recovery markers (resting HR, HRV, sleep score) to catch overtraining before it catches you. _Use when deciding whether to push or back off; it correlates how hard you trained with how recovered you are._ ```bash withings-pp-cli recovery --since 14d --agent ``` - **`sleep debt`** — Cumulative sleep deficit against your target over a rolling window — the number the per-night summary never adds up for you. _Use for sleep-deficit accounting over time; for one night use 'sleep summary'._ ```bash withings-pp-cli sleep debt --window 14d --agent ``` - **`correlate`** — Pearson + best-lag correlation between any two daily metrics (weight vs sleep score, steps vs resting HR). _The flexible fallback when no curated readout fits the metric pair you care about._ ```bash withings-pp-cli correlate weight sleep_score --since 90d --agent ``` ### Clinician + agent reports - **`bp-report`** — A dated blood-pressure + AFib table with your own annotations (medication changes, symptoms) — the clean history to hand a cardiologist. _Use for a doctor-ready BP/AFib history; prefer it over raw 'heart list' when you need the annotated report._ ```bash withings-pp-cli bp-report --since 90d --agent ``` - **`digest`** — One structured 'what changed since