Fitness and diet tracking tool. Use when the user wants to analyze food photos for calories, log workouts, calculate metabolism (BMR/TDEE), get daily calorie summaries, or generate training/diet plans. Invoked with /bulkcut-coach.
Uses Gemini 3 Flash (via OpenRouter) for food photo analysis and personalized planning.
All commands run from the project root. Parse the user's natural language and call the appropriate command via Bash.
When user shares a food image path:
python scripts/app.py photo <image_path>
When user describes what they ate:
python scripts/app.py meal "<description>"
When user describes their training (exercises, sets, reps, weight), do NOT use the interactive command. Instead call Python directly:
trainpython -c "
import sys; sys.path.insert(0, 'scripts')
from training import log_training
r = log_training([
{'name': '<exercise>', 'sets': <n>, 'reps': <n>, 'weight_kg': <n>},
])
print(f'Calories burned: {r[\"calories_burned\"]} kcal')
"
Parse the user's natural language into the exercise list. Examples:
{'name': 'Back Squat', 'sets': 4, 'reps': 4, 'weight_kg': 112.5}{'name': 'Power Clean', 'sets': 3, 'reps': 2, 'weight_kg': 67.5}When user provides height/weight/age/gender/body fat:
python -c "
import sys; sys.path.insert(0, 'scripts')
from metabolism import set_metrics
p = set_metrics(<height_cm>, <weight_kg>, <age>, '<gender>', <body_fat_pct_or_None>)
print(f'BMR: {p[\"bmr\"]} kcal/day\nTDEE: {p[\"tdee\"]} kcal/day')
"
python scripts/app.py goal <cut|bulk|maintain>
python scripts/app.py summary
python scripts/app.py plan
python scripts/app.py history