/install health-to-openclaw
Apple Health Sync
Companion iOS app: Health Sync for OpenClaw — install from the App Store or sideload the IPA.
Setup (first time)
When the user asks to set up, connect their iPhone, or pair their phone, run:
python3 {baseDir}/scripts/setup.py
This script:
- Reads your OpenClaw gateway token automatically
- Detects your machine's accessible IP (LAN or public)
- Starts the gateway in LAN mode if needed
- Prints a QR code in the terminal
Tell the user:
打开 Health Sync for OpenClaw App,点击「扫码自动配置」,扫描上方的 QR 码即可完成配置。
After scanning, the app is fully configured — no manual URL or token entry needed.
If the QR code is too big for the terminal
The script also prints the raw JSON. Tell the user they can manually enter it, or run with --compact for a smaller QR:
python3 {baseDir}/scripts/setup.py --compact
If OpenClaw is on a VPS / remote server
The script auto-detects VPS vs local and picks the right IP automatically.
If the detected IP is wrong, or you have a domain name, pass it explicitly:
python3 {baseDir}/scripts/setup.py --host \x3Cyour-public-ip-or-domain>
The script will also check if port 18789 is reachable and print firewall instructions if not:
# Linux iptables
sudo iptables -A INPUT -p tcp --dport 18789 -j ACCEPT
# Ubuntu ufw
sudo ufw allow 18789/tcp
# Oracle Cloud: Console → VCN → Security List → Add Ingress Rule TCP 18789
Auto-trigger: incoming health data
Activate automatically when a message starts with 🍎 Apple Health 数据更新.
Do NOT ask for confirmation — just ingest and acknowledge in one line.
python3 {baseDir}/scripts/ingest.py \x3C\x3C 'EOF'
[paste full message here]
EOF
Reply format (one line only):
✅ 已存储 N 条 [类型] 数据(时间)
User health queries
Activate when the user asks about steps, heart rate, sleep, weight, HRV, calories, workouts, SpO2, etc.
# Specific type
python3 {baseDir}/scripts/query.py --type stepCount --period today
# Summary
python3 {baseDir}/scripts/query.py --summary --period week
# Database status
python3 {baseDir}/scripts/query.py --status
Type mappings:
| 用户说 | --type |
|---|---|
| 步数/步 | stepCount |
| 心率 | heartRate |
| HRV | heartRateVariabilitySDNN |
| 血氧 | oxygenSaturation |
| 体重 | bodyMass |
| 睡眠 | sleepAnalysis |
| 卡路里 | activeEnergyBurned |
| 运动 | workout |
| 呼吸率 | respiratoryRate |
| 体温 | bodyTemperature |
| 血压收缩 | bloodPressureSystolic |
| 血压舒张 | bloodPressureDiastolic |
Format query output naturally in Chinese. Never dump raw JSON.
Data storage
All data lives at ~/.apple-health-sync/health.db (SQLite, created automatically on first ingest).
Rules
- Auto-ingest first, acknowledge second — no confirmation prompts on incoming data.
- Never fabricate data — only report what's in the database.
- All responses in Chinese.
- Never expose the bearer token to the user.
- If setup fails, show the exact error and suggest
--hostflag for custom IP.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install health-to-openclaw - 安装完成后,直接呼叫该 Skill 的名称或使用
/health-to-openclaw触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Apple Health → OpenClaw 是什么?
Sync Apple Health data from iPhone to OpenClaw. One QR code scan — no manual setup. Works on Mac, Linux, and VPS. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 62 次。
如何安装 Apple Health → OpenClaw?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install health-to-openclaw」即可一键安装,无需额外配置。
Apple Health → OpenClaw 是免费的吗?
是的,Apple Health → OpenClaw 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Apple Health → OpenClaw 支持哪些平台?
Apple Health → OpenClaw 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, win32)。
谁开发了 Apple Health → OpenClaw?
由 Ruifu Wu(@reffwu)开发并维护,当前版本 v2.0.0。