# myGarmin A local-first logbook for your activity and health history. It collects data from Garmin (watch over USB, Connect account export, Connect API), Strava (account export) and AlpineQuest (.trk), keeps the original files in one library folder, and builds a self-contained HTML dashboard plus GPX and AlpineQuest exports. Everything stays on your PC: there is no server and no account, and nothing is uploaded anywhere. > Status: early (phase 0/1 of [docs/PLAN.md](docs/PLAN.md)), command line only. A desktop window and installer come next. ## Install Python 3.12 or newer: ``` pip install -e . # from a checkout of this repo pip install -e ".[api]" # also the Garmin Connect API (optional) ``` ## Use ``` mygarmin init D:\myGarmin --name Sam --birth-year 1985 --sex F --tz Europe/London mygarmin import D:\myGarmin mygarmin build D:\myGarmin # -> D:\myGarmin\dashboard.html and all_activities.csv mygarmin export D:\myGarmin # -> exports\tracks_gpx.zip and tracks_trk.zip (one track per outing, by year) ``` Keeping it up to date: ``` mygarmin watch D:\myGarmin # Windows: read a Garmin watch connected by USB mygarmin login D:\myGarmin # once: log in to Garmin Connect (password + MFA code) mygarmin sync D:\myGarmin # new activities and daily health from Garmin Connect mygarmin update D:\myGarmin # all of the above + build + export ``` ### Where to get your data | Source | How | |---|---| | Garmin Connect | garmin.com → Account → Data Management → Export Your Data. Arrives by e-mail as a zip; import the zip as is. | | Strava | strava.com → Settings → My Account → Download or Delete Your Account → Request your archive. Import the zip as is. | | AlpineQuest | Copy the `.trk` files from the phone (AlpineQuest folder, `Landmarks`/`Tracks`). | | Garmin watch | Connect by USB and run `mygarmin watch`, or copy the watch's `GARMIN` folder and import it. | | Races | Optional `races.csv` in the library: `date,event,time[,km,age_grade,position,pb]` (km defaults to 5). | ## How it works - Originals are copied unchanged into `/originals/`; the SQLite database `myGarmin.db` and everything else can be rebuilt from them. Importing the same file twice does nothing. - One outing recorded by several sources (watch, phone, Strava) is kept once, preferring the watch. Car/plane/train/boat trips and very short tracks are flagged and left out of the dashboard. - Local times come from the file itself or the GPS position (offline time zone lookup). - **The Garmin Connect API is unofficial** (python-garminconnect). Garmin has no personal API; this logs in the way the Connect app does and can break when Garmin changes its login. Your login token is stored on your PC only. The export zip and the watch over USB always work. ## Privacy This repository never contains personal data. Your library folder holds your health data: keep it private. ## Development `pip install -e ".[dev]"` then `pytest`. Tests use synthetic files only. ## Licence MIT, see [LICENSE](LICENSE).