A comprehensive personal health management system for tracking body metrics, logging meals, analyzing nutrition, managing pantry inventory, and receiving intelligent diet recommendations.
bash
python3 scripts/init_db.py --user <username>
Creates isolated SQLite database for the user with all required tables.
bash
python3 scripts/user_profile.py --user <username> set \
--name "Robert" \
--gender male \
--birth-date 1994-05-15 \
--height-cm 175 \
--target-weight 70 \
--activity-level moderate \
--goal-type maintain
bash
python3 scripts/body_metrics.py --user <username> log-weight --weight 72.5
bash
python3 scripts/meal_logger.py --user <username> log \
--meal-type lunch \
--foods "米饭:150g, 鸡胸肉:100g, 西兰花:100g"
bash
python3 scripts/diet_recommender.py --user <username> recommend --meal-type dinner
bash
python3 scripts/launch_dashboard.py --user <username>
Opens browser at http://127.0.0.1:5000 with visual health data overview.
米饭:150g, 鸡胸肉:100gSee references/ARCHITECTURE.md for system design and data flow.
See references/DATABASE_SCHEMA.md for complete ER diagram and table definitions.
See references/FEATURE_GUIDE.md for detailed user-facing documentation including:
See references/DEVELOPER_GUIDE.md for:
See CHANGELOG.md for version history and breaking changes.
ScriptPurposeinit_db.pyInitialize user databaseuser_profile.pyManage user profile and goalsbody_metrics.pyLog weight and track trendsmeal_logger.pyLog meals and view daily summarydiet_recommender.pyGet meal recommendationsfood_analyzer.pySearch foods, OCR scan, add custompantry_manager.pyManage ingredient inventorysmart_recipe.pyGenerate recipes from pantrylaunch_dashboard.pyStart web dashboardreport_generator.pyGenerate weekly/nutrition reportsexport_data.pyExport to JSON/CSVbackup_db.pyBackup and restore databasefood_ocr.pyOCR engine wrapperfood_matcher.pyMatch OCR results to databasemigrate_db.pyDatabase migration tool
Each user has an isolated SQLite database stored at:
text
~/.openclaw/workspace/skills/nutricoach/data/<username>.db
Backups are stored in:
text
~/.openclaw/workspace/skills/nutricoach/data/backups/
body_metrics.py log-weightmeal_logger.py logreport_generator.py weeklyuser_profile.py updatepython3 scripts/food_analyzer.py --user <username> scan --image <path>meal_logger.py logpantry_manager.py add --food "鸡胸肉" --quantity 500pantry_manager.py list --expiring 3smart_recipe.py --count 3launch_dashboard.py --user <username>OCR 食品包装识别支持多种方式, 零配置即可使用。
如果你使用 AI 助手(如 OpenClaw),直接发送食品包装图片:
text
[发送图片]
"录入这个食材,生产日期 2025-01-15"
助手会直接识别图片并录入, 无需任何配置。
使用 macOS 内置 Vision 框架,无需配置:
bash
python3 scripts/food_analyzer.py --user <name> scan --image food.jpg --engine macos
如需更高识别精度,配置云端 Vision API:
步骤 1:创建配置文件
bash
cp data/user_config.example.yaml data/user_config.yaml
步骤 2:填入 API key
yaml
vision:
api_key: "your-api-key"
base_url: "https://api.moonshot.cn/v1" # 或其他兼容 OpenAI 的 API
model: "kimi-k2.5"
步骤 3:使用
bash
python3 scripts/food_analyzer.py --user <name> scan --image food.jpg
支持的 API 提供商:
说明:
user_config.yaml 已被加入 .gitignore,不会意外提交Built-in database includes 569 Chinese foods across categories:
Add custom foods via OCR scan or manual entry.
Last updated: 2026-03-28 (v2.0: Added pantry management, smart recipes, OCR, web dashboard)