Local-first iMessage health coach for macOS, built with Bun.
coach runs as a background agent, listens for messages from your configured iMessage handle, and responds with context-aware coaching using your OpenRouter model.
- Local-first by default: conversations, meals, workouts, facts, and nudges are stored in
~/.coach/coach.db - No hosted backend: data stays on your machine
- iMessage-native transport with dedupe and sender filtering
- Calendar-aware scheduling (for pre-workout nudges and daily planning)
- Built-in diagnostics via
coach doctor
- macOS (uses iMessage +
launchd) - Bun runtime
- OpenRouter API key
- Full Disk Access for Messages DB (
~/Library/Messages/chat.db) - Calendar permission (optional but recommended)
bun install
bun run src/index.ts initDuring init, Coach will:
- Prompt for your API key, iMessage handle, timezone, and model
- Create local config + SQLite data files under
~/.coach - Install a
launchdagent for background execution
Then run Coach:
bun run src/index.ts runcoach init
coach install
coach run
coach status
coach doctor
coach stop
coach uninstallinit/install: interactive setup and launchd installationrun: start the daemon in the current processstatus: show daemon, launchd, config, and DB statedoctor: run environment and permission checksstop: stop running daemon and unload launchd jobuninstall: remove launchd files and delete~/.coach
Config is stored at ~/.coach/config.json with file permissions 0600.
Key fields:
openrouter_api_keyimessage_handlemodel/vision_modeltimezoneschedule(morning_briefing,wind_down,protein_check)integrations.calendar.enabled
Default model: anthropic/claude-sonnet-4
- Coach stores local state in SQLite only (
~/.coach/coach.db) - Meal photos and message content can be sent to your configured model provider through OpenRouter
- No Coach-managed cloud service or sync backend is required
- Day boundaries and dedupe keys use your configured timezone
- Calendar reads are cached for 5 minutes
- Pre-workout nudges look ahead 24 hours and trigger about 45-60 minutes before events
Install dependencies:
bun installRun tests:
bun testRun in development:
bun run src/index.ts runThis project is under active development. If you plan to open-source it broadly, consider adding:
LICENSECONTRIBUTING.md- issue and pull request templates