Wearables & Health Data
Connect a device, sync, query activity, sleep, vitals, and body composition.
Prerequisites
- Authenticated CLI
- For Apple Health: the Betterness iOS app installed
Check connected devices
betterness connected-devices list
See available integrations
betterness connected-devices available
Providers: Apple Health, Garmin, Oura, Withings, Peloton, Wahoo, Eight Sleep.
Connect a device
Apple Health (only path — does not work via link):
betterness connected-devices apple-health-code
Returns a one-time code for the Junction app and a deep link (betti://settings/wearables?autoConnect=APPLE_HEALTH_KIT) that opens the Betterness iOS app and starts the connection automatically.
All other providers (browser-based authorization):
betterness connected-devices link --integration-key OURA
Disconnect
betterness connected-devices disconnect --integration-key GARMIN
Query health data
All commands accept --from, --to (YYYY-MM-DD), and --timezone (IANA). Always pass --timezone so daily aggregations align with your local day. Use 7-30 day ranges.
betterness activity get --from 2026-03-01 --to 2026-03-17 --timezone America/Denver
betterness sleep get --from 2026-03-10 --timezone America/Denver
betterness sleep stages --from 2026-03-15 --timezone America/Denver
betterness vitals get --from 2026-03-01 --timezone America/Denver
betterness body-composition get --from 2026-03-01 --timezone America/Denver
What each command returns
| Command | Metrics |
|---|---|
activity | Steps, distance, active + basal calories, floors, VO2 max, workouts (type, duration) |
sleep | Time in bed, total sleep, breakdown by stage (deep, light/core, REM, awake) |
sleep stages | Minute-by-minute stage transitions grouped by night |
vitals | Heart rate, HRV, blood pressure, SpO2, glucose, respiratory rate |
body-composition | Weight, body fat %, muscle mass, BMI, waist circumference |
If data is empty
- Run
connected-devices list— verify the relevant wearable is connected - Some metrics need specific devices (HRV requires Oura/Apple Watch; glucose requires a CGM)
- Sync delays — most wearables backfill within minutes, some up to a few hours

