A comprehensive personal health management system for tracking body metrics, logging meals, analyzing nutrition, managing pantry inventory, and receiving intelligent diet recommendations.
python3 scripts/init_db.py --user <username>
Creates isolated SQLite database for the user with all required tables.
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
python3 scripts/body_metrics.py --user <username> log-weight --weight 72.5
python3 scripts/meal_logger.py --user <username> log \
--meal-type lunch \
--foods "米饭:150g, 鸡胸肉:100g, 西兰花:100g"
python3 scripts/diet_recommender.py --user <username> recommend --meal-type dinner
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.
| Script | Purpose |
|---|---|
| -------- | --------- |
init_db.py | Initialize user database |
user_profile.py | Manage user profile and goals |
body_metrics.py | Log weight and track trends |
meal_logger.py | Log meals and view daily summary |
diet_recommender.py | Get meal recommendations |
food_analyzer.py | Search foods, OCR scan, add custom |
pantry_manager.py | Manage ingredient inventory |
smart_recipe.py | Generate recipes from pantry |
launch_dashboard.py | Start web dashboard |
report_generator.py | Generate weekly/nutrition reports |
export_data.py | Export to JSON/CSV |
backup_db.py | Backup and restore database |
food_ocr.py | OCR engine wrapper |
food_matcher.py | Match OCR results to database |
migrate_db.py | Database migration tool |
Each user has an isolated SQLite database stored at:
~/.openclaw/workspace/skills/nutricoach/data/<username>.db
Backups are stored in:
~/.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 scan --image meal_logger.py logpantry_manager.py add --food "鸡胸肉" --quantity 500pantry_manager.py list --expiring 3smart_recipe.py --count 3launch_dashboard.py --user OCR 食品包装识别支持多种方式,零配置即可使用。
如果你使用 AI 助手(如 OpenClaw),直接发送食品包装图片:
[发送图片]
"录入这个食材,生产日期 2025-01-15"
助手会直接识别图片并录入,无需任何配置。
使用 macOS 内置 Vision 框架,无需配置:
python3 scripts/food_analyzer.py --user <name> scan --image food.jpg --engine macos
如需更高识别精度,配置云端 Vision API:
步骤 1:创建配置文件
cp data/user_config.example.yaml data/user_config.yaml
步骤 2:填入 API key
vision:
api_key: "your-api-key"
base_url: "https://api.moonshot.cn/v1" # 或其他兼容 OpenAI 的 API
model: "kimi-k2.5"
步骤 3:使用
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)
共 1 个版本