Privacy-first Apple Health data analyzer powered by AI
Project description
healthai — Apple Health AI Analyzer
Privacy-First Health Intelligence: Turn your Apple Health exports into actionable insights with DeepSeek-R1, ChatGPT, and local LLMs.
https://github.com/user-attachments/assets/98ad8fc3-ed1d-4395-80c5-eb66a8cceb61
Installation
curl -fsSL https://raw.githubusercontent.com/krumjahn/applehealth/main/install.sh | bash
Or install directly with pipx:
pipx install healthai
Then run:
healthai
On first launch, a setup wizard walks you through choosing your AI provider (OpenAI, Claude, Gemini, Grok, Ollama, and more), setting your API key, and pointing to your export.xml. Re-run it any time with healthai --setup.
🚀 Tired of the CLI?
Get the Pro Version: For instant, interactive analysis and one-click exports without touching a terminal, visit applehealthdata.com.
🧐 What is this?
This is an open-source technical toolkit for solopreneurs, researchers, and biohackers who want to own their health data.
It transforms the complex Apple Health export.xml into clean CSV/JSON datasets and provides a direct bridge to AI reasoning engines. Whether you want to use ChatGPT or run 100% private local analysis with DeepSeek-R1, this tool handles the heavy lifting of data parsing and visualization.
✨ Key Features
- 💍 Smart Ring Integration: Unified analysis for Oura, Whoop, and Samsung Ring via Apple Health sync.
- 🧠 DeepSeek-R1 & Local AI: Run 100% private health audits using Ollama (no data leaves your machine).
- 📊 Automated Visualizations: Instantly generate charts for heart rate cycles, sleep patterns, and workout intensity.
- 📤 High-Fidelity Export: XML → CSV/JSON conversion that preserves all metadata (Record, Workout, ActivitySummary).
- 🔄 WHOOP Integration: Specialized support for augmenting Apple Health data with WHOOP metrics.
- 🧪 Multi-Model Support: Native support for ChatGPT, Claude, Gemini, Grok, and LM Studio.
🛠️ "Steal My System": From 8 Years of Data to Actionable Training
I used this exact tool to analyze 8 years of my own fitness history. Here’s the system:
- The Pattern: I discovered that my most active days (40k+ steps) almost never coincided with gym sessions—they were work-related.
- The Optimization: I used the AI Analyzer to identify "Heart Rate Cycles" (3-4 week recovery dips) to automate my deload weeks.
- The Result: A training plan that finally matches my biology instead of a generic app's schedule. Read the full case study here.
⚡ Quick Start
Recommended (install once, run anywhere):
curl -fsSL https://raw.githubusercontent.com/krumjahn/applehealth/main/install.sh | bash
healthai
Or clone and run directly:
git clone https://github.com/krumjahn/applehealth.git && cd applehealth
./run
For private local AI (DeepSeek-R1, free, no API key):
- Install Ollama and run
ollama pull deepseek-r1. - Launch
healthai, choose Ollama in the setup wizard.
🦞 OpenClaw Support
This repo now has a published OpenClaw skill:
Install from ClawHub: Apple Health Export Analyzer
What OpenClaw does for normal users:
- check your Apple Health data quickly
- turn it into a short daily health brief
- give you simple daily tips on how to improve
The skill now supports two sources:
- the
Health Data AI AnalyzerMac app if its local API is available - this open-source
applehealthexport.xml workflow as a fallback
For the Mac app path, the public skill now uses read-only localhost OpenClaw endpoints and does not need to read a local token file.
If you want to use the Mac app path in a restricted OpenClaw session, run the one-time companion installer:
git clone https://github.com/krumjahn/applehealth.git
cd applehealth
python skills/apple-health-export-analyzer/scripts/install_mac_app_companion.py --restart
Then use the companion skill:
Use the health-analyzer-mac-local skill. Give me my daily health brief for today and 3 suggestions.
Use it if you want OpenClaw to:
- verify your Apple Health export setup
- generate a daily health brief from
export.xml - compare your steps and sleep over the last 7 days
- create a weekly summary with workouts and heart rate context
- help you set up a recurring daily health message
Example output:
Status
- Today was a low-activity day relative to your recent baseline.
What changed
- Steps: 2,431 vs 7-day baseline 9,993
- Workouts: 0 minutes, 0 workouts
- Sleep: insufficient data
Suggestions
1. Add one easy walk today instead of trying to catch up with a hard workout.
2. Use one fixed movement anchor, like a walk after lunch.
3. Keep effort moderate when recovery data is missing.
Example prompts:
Use the Apple Health Export Analyzer skill. Verify my setup and give me my latest daily health brief with 3 suggestions.
Use the Apple Health Export Analyzer skill. Compare my steps and sleep over the last 7 days.
Use the Apple Health Export Analyzer skill. Generate a weekly summary from my Apple Health export.
🤖 Instructions for AI Agents
If you are an AI Agent (Claude Code, Windsurf, OpenClaw) helping a user analyze health data:
- Clone this repo into the user's workspace.
- Direct the user to place their
export.xmlin the root. - Call
python src/applehealth.py --export ./export.xml --out ./analysisto generate the CSV datasets. - Read the resulting
.csvfiles to provide personalized medical/fitness coaching.
🦞 Local OpenClaw Workflow
skills/apple-health-export-analyzer
The skill includes concrete scripts for:
- verifying the local repo and
export.xmlsetup - generating a daily Apple Health brief
- comparing recent step and sleep trends
- generating a weekly summary
Example:
python skills/apple-health-export-analyzer/scripts/check_setup.py --repo /path/to/applehealth --export /path/to/export.xml --out /path/to/analysis
python skills/apple-health-export-analyzer/scripts/daily_brief.py --repo /path/to/applehealth --export /path/to/export.xml --out /path/to/analysis
📋 Requirements & Tech Stack
- Language: Python 3.6+
- Data: Pandas, XML.ElementTree
- Viz: Matplotlib
- AI: OpenAI, Anthropic, Google, and Ollama APIs
🐳 Docker (The "No-Setup" Way)
If you have Docker installed, you can run the analyzer without installing Python or dependencies locally:
# 1) Build the image
docker build -t applehealth .
# 2) Run the container (mount your export.xml and an output folder)
docker run -it \
-v "/path/to/your/export.xml:/export.xml" \
-v "$(pwd)/out:/out" \
applehealth
🌟 Visuals & Charts
🤝 Contributing & Community
Join our community of builders! If you improve the parser or add a new visualization, please submit a PR.
Join my community for updates, experiments, and AI-builder workflows.
If you find this tool useful, please give it a star ⭐️ to help others find it!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file healthai-1.4.2.tar.gz.
File metadata
- Download URL: healthai-1.4.2.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ae01a34b37461aaae187c78ca48d440787abea2f31fa5dc582a752d74f1d0b8
|
|
| MD5 |
903742b0bcf48790308e1e8851fb2ced
|
|
| BLAKE2b-256 |
ccdd21997adad9b7a3ddcd142f4759cfe9f56b11b6a07730d218246dae5f2cfc
|
File details
Details for the file healthai-1.4.2-py3-none-any.whl.
File metadata
- Download URL: healthai-1.4.2-py3-none-any.whl
- Upload date:
- Size: 39.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e6b15de67b4b4bc1520fcfcc47a6d42985d63d16cba8b4fe9c170d0bb611465
|
|
| MD5 |
5158bc5349701b696c508f0889bfece3
|
|
| BLAKE2b-256 |
739987814900a158fd558545e8d853a927a15199f4ec8a3a9ab7df1b05524b1c
|