feat(food-tracking): add --aliases support to food_items.py and update skill docs

This commit is contained in:
Connor Rhodes 2026-05-24 15:58:29 +00:00
parent a91cfcd26b
commit d916c6925b
2 changed files with 21 additions and 1 deletions

View file

@ -22,6 +22,14 @@ uv run --with pymongo "$SCRIPT" add \
--description "Whole milk kefir with old-fashioned rolled oats" \
--nutrition '{"calories": 228, "protein_g": 12.1, "fat_g": 7.0, "carbs_g": 30.1, "fiber_g": 3.5, "sugar_g": 6.3}'
# Add with aliases (for flexible name matching)
uv run --with pymongo "$SCRIPT" add \
--name "Dave's Killer Bread 21 Whole Grains" \
--type food \
--serving "1 slice (45g)" \
--aliases "large bread,large toast" \
--nutrition '{"calories": 110, "protein_g": 6, "fat_g": 1.5, "carbs_g": 22}'
# Add a medicine
uv run --with pymongo "$SCRIPT" add \
--name "Excedrin Migraine" \
@ -51,6 +59,9 @@ uv run --with pymongo "$SCRIPT" update --name "Kefir Oats" --set-serving "2 cups
# Update an item by _id
uv run --with pymongo "$SCRIPT" update --id "6a11b0c3..." --set-nutrition '{"calories": 300, "protein_g": 15, "fat_g": 9, "carbs_g": 40}'
# Update aliases
uv run --with pymongo "$SCRIPT" update --name "Kefir Oats" --set-aliases "kefir oats,ko"
# Unset a field
uv run --with pymongo "$SCRIPT" update --name "Excedrin Migraine" --unset max_dosage