Your Apple Health and Whoop data β unified in a local SQLite database. In 60 seconds.
Apple Health locks your biometrics in a 4GB XML file. Whoop buries yours in CSVs with inconsistent column names. Leo Core parses both in under 60 seconds and writes everything to a single, normalized SQLite database β Heart Rate, Sleep, Workouts, HRV, Recovery Score, Blood Oxygen β all queryable with standard SQL.
Zero network requests. Runs locally. MIT licensed.
Local LLM that analyses your data privately. Bloodwork history, wearable trends, medical literature β all on your Mac, nothing leaves your machine.
git clone https://github.com/sandseb123/Leo-Health-Core.git
cd Leo-Health-Core
pip3 install -e .Three commands are now available anywhere on your Mac:
leo # view your health dashboard
leo-watch # start watching Downloads for new exports
leo-dash # open full web dashboard in browserNote: If
pip3is not found, trypip install -e .or install Python 3.9+ from python.org
Run Leo Health in a container β works on macOS, Linux, and Windows.
# Clone the repo
git clone https://github.com/sandseb123/Leo-Health-Core.git
cd Leo-Health-Core
# Start the dashboard
docker compose up -d
# Open in browser
open http://localhost:5380Drop your health exports into the imports/ folder β Leo will detect and ingest them automatically.
# Import Apple Health export
cp ~/Downloads/export.zip imports/
# Import Whoop CSVs
cp ~/Downloads/whoop_recovery.csv imports/Or run directly without compose:
docker run \
-p 127.0.0.1:5380:5380 \
-v ~/.leo-health:/data \
-e LEO_HOST=0.0.0.0 \
-e LEO_DB_PATH=/data/leo.db \
leo-healthData is stored in a Docker volume (leo-data) and persists across container restarts.
# Stop
docker compose down
# View logs
docker compose logs -fApple Health (iPhone):
- Open the Health app
- Tap your profile picture β Export All Health Data
- AirDrop it to your Mac β Leo detects and parses it automatically
Whoop: Open Whoop app β Profile β Export Data β check email for CSVs β AirDrop to Mac
leo-watch # start the watcher β detects exports within 10 secondsLeo watches your Downloads folder and automatically parses any health export the moment it arrives β no commands needed after setup.
- Checks for new files every 10 seconds
- Uses ~8MB RAM, near-zero CPU while idle
- Never processes the same file twice
- Sends a macOS notification when ingestion completes
Auto-start on login: Coming soon.
sqlite3 ~/.leo-health/leo.db-- Last 7 days of Whoop recovery
SELECT recorded_at, recovery_score, hrv_ms, resting_heart_rate
FROM whoop_recovery
ORDER BY recorded_at DESC LIMIT 7;
-- HRV by source (Apple Watch vs Whoop)
SELECT source, ROUND(AVG(value), 1) as avg_hrv, COUNT(*) as readings
FROM hrv GROUP BY source;
-- Sleep stage breakdown
SELECT stage, COUNT(*) as sessions
FROM sleep GROUP BY stage ORDER BY sessions DESC;
-- Top workouts by volume
SELECT activity, COUNT(*) as sessions, ROUND(AVG(calories), 0) as avg_cal
FROM workouts GROUP BY activity ORDER BY sessions DESC;| Data | Table | Metrics |
|---|---|---|
| Heart Rate | heart_rate |
BPM, resting HR, walking avg |
| HRV | hrv |
SDNN in milliseconds |
| Sleep | sleep |
REM, Deep, Core, Awake stages |
| Workouts | workouts |
Activity, duration, distance, calories |
| Blood Oxygen | blood_oxygen |
SpOβ % |
| Data | Table | Metrics |
|---|---|---|
| Recovery | whoop_recovery |
Score, HRV, resting HR, SpO2 |
| Strain | whoop_strain |
Day strain, calories, max/avg HR |
| Sleep | sleep |
Performance %, time in bed, stages |
Leo Core contains zero outbound network code. Verify the entire repository yourself:
grep -r "import urllib\|import http\|import requests\|import socket\|http.client\|urllib.request" .You'll see three results, all in leo_health/dashboard.py β these are Python stdlib imports used to run a local web server on your own machine (localhost only). No data is sent anywhere. No outbound connections. No tracking.
Your data lives in ~/.leo-health/leo.db and never leaves your machine.
Threat model: Dashboard binds to localhost only. Anyone with local machine access can read the DB. No authentication β designed for single-user desktop use only.
Leo Core is an open-source developer tool. If you're comfortable with Terminal, git clone and bash install.sh gets you running in 2 minutes. Free forever, MIT licensed.
Leo Max is the upcoming AI health coach layer β a local LLM that runs against your unified health database, cross-references medical literature, and lets you upload bloodwork PDFs to track lab panels over time. Nothing leaves your Mac. Join the waitlist β
leo_health/
βββ parsers/
β βββ apple_health.py # SAX streaming parser for export.zip
β βββ whoop.py # Auto-detecting CSV parser
βββ db/
β βββ schema.py # SQLite schema
β βββ ingest.py # Unified ingest for all sources
βββ dashboard.py # Local web dashboard (localhost only)
status.py # leo command β terminal dashboard
watcher.py # leo-watch β auto-ingest on AirDrop
install.sh # One-command installer for macOS
pyproject.toml
flowchart TD
subgraph External Inputs
A[Apple Health Export XML]
B[Whoop CSV Export]
C[AirDrop Watch Folder]
end
subgraph Leo Health Core
D[Streaming SAX Parser]
E[CSV Parser]
F[Normalization & Validation]
G[(SQLite<br/>User-Owned DB)]
H[Query & Trend Engine]
I[Local Dashboard<br/>localhost only]
end
A --> D
B --> E
C --> D
D --> F
E --> F
F --> G
G --> H
H --> I
- Apple Health XML parser
- Whoop CSV parser
- Normalized SQLite schema
-
leoterminal dashboard -
leo-watchauto-ingest watcher - AirDrop β auto-parse workflow
- Docker support (cross-platform)
- Linux & Windows support (via Docker)
- Oura Ring CSV support
- Fitbit CSV support
- Garmin
.fitsupport - Leo Max β AI Health Coach (local LLM, fully private)
- Leo Max β bloodwork PDF/photo ingestion
- Leo Max β native macOS app (no Terminal required)
Good first issues:
- Add Oura Ring CSV parser
- Add Fitbit CSV parser
- Add Garmin
.fitfile support - Add missing Whoop metrics to schema
- Improve test coverage
See good first issue labels to get started.
Leo Health was built with AI assistance and reviewed, tested, and maintained by @sandseb123. All security fixes, architectural decisions, and code reviews were done by a human. If you find issues or have questions, open a GitHub issue or reach out directly.
Leo Core β MIT. Free to use, modify, and distribute.
Leo Max (AI Coach) is a separate commercial product β join the waitlist.
Built by sandseb123

