A CLI to get my family's Garmin data into a queryable SQLite db
▲ 26 r/GarminFenix+2 crossposts

A CLI to get my family's Garmin data into a queryable SQLite db

I wanted my Garmin data on my own machine, in something I could actually query, instead of stuck behind Connect's UI and its clunky exports. So I wrote garmin-health-data.

It's a Python CLI. garmin extract logs in, pulls the whole account (activities + per-second FIT streams, sleep at 1-min resolution, HRV, stress/body battery, steps, body composition, etc.), keeps the raw files, and loads everything into a local SQLite db. Raw files stay on disk so you can rebuild the db without hitting Garmin again. Login only grabs OAuth tokens, stored locally.

The part I care about is the schema. Every table and column is documented in the DDL, and SQLite keeps those comments in the db, so SELECT sql FROM sqlite_master tells you what each field means. Normal, normalized tables, plain SQL.

That also makes it easy to hand to an AI coding agent. I point one at the db, ask for a sleep-vs-HRV dashboard, and it builds it, because the schema explains itself. That's the real reason I bothered: get your data back and let an agent do the analysis in a couple of minutes.

pip install garmin-health-data

https://github.com/diegoscarabelli/garmin-health-data

Happy to add data types if there's something you want pulled.

u/redditbeetles — 3 hours ago