Repolode
krumjahn

krumjahn/applehealth

A terminal CLI that exports Apple Health export.xml data to CSV/JSON, charts it, and lets you chat with it using local or cloud LLMs.

Stars
465
Forks
38
Open issues
1
Last commit
3 months ago

What is it?

healthai is a Python command-line tool that reads the export.xml file produced by Apple Health and converts it into CSV or JSON datasets with metadata preserved for records, workouts and activity summaries. It generates charts for daily heart rate, sleep and workout heart-rate intensity, and normalizes distance, body mass, energy and heart rate units before aggregation.

The main interface is a chat REPL where you ask questions in plain English. Slash commands cover steps, heart rate, sleep, workouts, weight, diagnostics and exports. Overlapping measurements from iPhone, Apple Watch and third-party sources are reconciled by a configurable per-metric priority, and a source filter can exclude unwanted apps.

Models can be cloud providers such as OpenAI, Anthropic, Google and DeepSeek, or fully local ones served through Ollama, LM Studio, Jan, llama.cpp, GPT4All or any OpenAI-compatible endpoint, so health data can stay on your machine.

Key features

  • 01Converts export.xml into CSV and JSON while keeping record, workout and activity metadata.
  • 02Chat REPL that answers plain-English questions about your health data.
  • 03Generates charts for heart rate, sleep and workout intensity.
  • 04Reconciles overlapping sources with configurable per-metric priority and source filters.
  • 05Supports cloud LLM providers and fully local models via Ollama, LM Studio and similar servers.
  • 06Switches between metric and imperial units.

Use cases

  • Analyzing years of Apple Watch and iPhone data for trends in steps, sleep and heart rate.
  • Keeping sensitive health records on your own machine by using a local model.
  • Exporting Apple Health data to CSV for further analysis in pandas or spreadsheets.
  • Checking a training log for patterns such as recovery dips across workouts.

Quick start

  1. 1

    Install healthai with pipx

    pipx install healthai
  2. 2

    Run healthai and follow the setup wizard to choose an AI model and point to your export.xml

    healthai

Things to know

  • No license is listed in the repository metadata, so reuse terms are unclear.
  • Chat features need either a cloud LLM API key or a locally installed model such as Ollama.

Topics

FAQ

What is applehealth?
A terminal CLI that exports Apple Health export.xml data to CSV/JSON, charts it, and lets you chat with it using local or cloud LLMs. healthai is a Python command-line tool that reads the export.xml file produced by Apple Health and converts it into CSV or JSON datasets with metadata preserved for records, workouts and activity summaries. It generates charts for daily heart rate, sleep and workout heart-rate intensity, and normalizes distance, body mass, energy and heart rate units before aggregation.
Is applehealth free to use? What license does it have?
applehealth has no declared license. Its code is public, but without a license you have no explicit permission to reuse it; ask the author before relying on it.
Is applehealth still maintained?
Updated within 6 months. The last commit to applehealth was on Aug 6, 2026.
What can I use applehealth for?
Analyzing years of Apple Watch and iPhone data for trends in steps, sleep and heart rate. Keeping sensitive health records on your own machine by using a local model. Exporting Apple Health data to CSV for further analysis in pandas or spreadsheets. Checking a training log for patterns such as recovery dips across workouts.
How do I install applehealth?
Install healthai with pipx: pipx install healthai Run healthai and follow the setup wizard to choose an AI model and point to your export.xml: healthai
Where can I get applehealth?
The source code and installation instructions are on GitHub: https://github.com/krumjahn/applehealth

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects