Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

HealthMind — Local AI Health Trainer

A privacy-first personal AI health trainer that runs entirely on your machine. Your data never leaves your device except for an anonymized summary sent to Claude when you chat.

Features

  • AI Chat — Ask your personal trainer anything; responses reference your actual data
  • Data Import — Upload Hevy workout CSVs and Samsung Health CSVs
  • Dashboard — Visualize workout volume, weight progression, sleep, steps, and heart rate
  • Profile — Set your goals and preferences to personalize coaching

Setup

1. Clone the repository

git clone <repo-url>
cd health-mind

2. Install dependencies

Python 3.11+ is required.

pip install -r requirements.txt

3. Add your Anthropic API key

Copy .env.example to .env and add your key:

cp .env.example .env

Edit .env:

ANTHROPIC_API_KEY=sk-ant-...

Get a key at console.anthropic.com.

4. Run the app

streamlit run app.py

The app opens at http://localhost:8501.


Exporting Your Data

Hevy (Workout Tracker)

  1. Open Hevy on your phone
  2. Go to Profile → Settings → Export Data
  3. Select CSV and share/save the file
  4. Upload it on the Import Data page in HealthMind
  5. Choose whether your weights are in kg or lbs before importing

Expected columns: Date, Workout Name, Exercise Name, Set Order, Weight, Reps, Duration

Samsung Health

  1. Open the Samsung Health app
  2. Go to More (⋮) → Settings → Download personal data
  3. Select the data types you want (Heart rate, Sleep, Steps, Stress, etc.)
  4. Download and extract the ZIP — you'll get one CSV per data type
  5. Upload the relevant CSVs on the Import Data page

Supported file types: heart_rate, sleep, step_count, stress, calories, spo2


Privacy

  • SQLite database is stored at ./db/healthmind.db — local only, never synced
  • Claude API calls send only an aggregated JSON summary (averages, totals, trends) — never raw rows
  • The app runs exclusively on localhost; no data is shared with any server other than the Claude API for chat responses

Project Structure

health-mind/
├── .env                    # Your API key (never commit this)
├── app.py                  # Streamlit entrypoint + sidebar
├── requirements.txt
├── db/
│   ├── schema.sql          # SQLite schema
│   └── healthmind.db       # Created automatically on first run
├── core/
│   ├── database.py         # DB helpers
│   ├── normalizer.py       # CSV parsers (Hevy + Samsung)
│   ├── context_builder.py  # Builds Claude-safe data summaries
│   └── trainer.py          # Claude API wrapper
└── pages/
    ├── 1_Chat.py           # AI trainer chat
    ├── 2_Upload.py         # Data import
    ├── 3_Dashboard.py      # Charts
    └── 4_Profile.py        # User profile

Troubleshooting

Issue Fix
ANTHROPIC_API_KEY is not set Add key to .env and restart
CSV parse error Check that the file matches the expected format for Hevy or Samsung Health
No charts showing Import data first via the Import Data page
ModuleNotFoundError Run pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages