Fitness Tracking System
The automated fitness data pipeline: Hevy API integration for workouts, and the nutrition/food logging system. All data auto-converts to pounds for David.
Skills:
hevy-workouts(procedure for building workout analysis),food-logger(procedure for logging meals)
Hevy Workout Pipeline
Data Flow
Hevy API (REST) → hevy.sh (BWS-wrapped curl) → hevy-workout-watchdog.py (cron, 15min, no_agent)
→ Detects new workout → Writes markdown to content/fitness/david/workout-YYYY-MM-DD.md
→ Updates David's Fitness-Home MOC with wikilink
→ git add + commit + push (auto-deploy via CI)
→ Prints summary → delivered to Telegram
Scripts
| Script | Location | Purpose |
|---|---|---|
hevy.sh | ~/.hermes/scripts/hevy.sh | BWS-credentialed curl wrapper for Hevy API |
hevy-analysis.py | ~/.hermes/scripts/hevy-analysis.py | Analysis in lbs. Imported by watchdog and cron |
hevy-workout-watchdog.py | ~/.hermes/scripts/hevy-workout-watchdog.py | Cron worker: polls API, detects new workout, writes vault note |
Cron Jobs
| Job | Schedule | Type | Purpose |
|---|---|---|---|
hevy-workout-insights | Every 15 min | no_agent=True | Watchdog: detects new workouts, writes notes |
| (manual) | On demand | Agent-driven | Deep analysis: trends, comparisons, plateau detection |
Key Details
- All workout data auto-converts kg → lbs for display. The API returns kg; every display value is converted.
- David has 235 workouts (as of Jun 2026), runs Full Body 2, trains ~1.8x/week
- State file at
~/.hermes/cache/<name>-last-state.jsontracks last-seen workout ID - Markdown note format: YAML frontmatter + exercise table with sets/reps/weight + MOC update
Nutrition Tracking Pipeline
Data Flow
Manual food entry (Telegram) → food-logger skill → writes to content/fitness/david/nutrition/daily/YYYY-MM-DD.md
→ Midnight consolidation (cron, 07:00 UTC, no_agent) → recalc totals → update trends
→ git add + commit + push
Key Details
- Macro targets: 1,800 cal / 130g protein / 195g carbs / 50g fat
- Daily log format: individual meal entries with calories + macros, then a calculated Total: line
- Cron runs at 07:00 UTC (midnight Pacific). Scripts set
TZ=America/Los_Angeles+time.tzset()sodate.today()returns the correct Pacific date. recalc-food-log.py(not cron) for manual re-processing when entries are added late- Consolidation is idempotent — won’t re-add existing rows
- Weight entries (
⚖️) are logged alongside food data and feed into a weight tracker table
Vault Location
- Daily logs:
content/fitness/david/nutrition/daily/YYYY-MM-DD.md - Monthly rollup:
content/fitness/david/nutrition/Nutrition-Home.md - Trends:
content/fitness/david/nutrition/trends.md
Per-Person Subdirectories
- David:
content/fitness/david/— workouts, nutrition, training hub - Molly:
content/fitness/molly/— ready for future content - Top-level hub:
content/fitness/Fitness-Home.mdlinks to both
See Also
- Garden: Fitness Home — latest workouts and MOC
- Garden: Nutrition Home — daily logs and weight tracker
- Garden: Hevy API Integration — hevy.sh setup details
- Cron Data Pipeline — the shared ingestion pattern used by both systems
- The Rigie Family — biographical context for the household