The problem I was trying to solve:
I track my food and I use TrainerRoad, but those two things have never talked to each other. I wanted something that could look at my training schedule, see what I ate yesterday, and give me an actual useful daily nutrition goal — not generic advice, but “you have a 70 TSS Sweet Spot session tomorrow and your protein has been low for 3 days, here’s what to eat today.”
No app I tried could do this well. They either didn’t know my training plan, or they treated every day the same regardless of what’s coming up in my schedule.
What I built:
An unofficial CLI called trainerroad-cli that lets you pull your TrainerRoad data as structured JSON from the command line. I paired it with an AI agent that runs every morning, checks my schedule, reads my food log, and sends me a brief like this:
Yesterday: 2,630 cal | 100g protein | 253g carbs | 135g fat
Today: Rest Day → Tomorrow: Batu (70 TSS)
Protein was 50g short yesterday.
Pre-workout day — aim for 155g protein, ~2,100 cal. Front-load carbs for tomorrow’s session.
It knows when I have a workout coming and pre-fuels me. It knows when I’m on a rest day and tightens up. It even calls me out if I’ve been skipping sessions.
How it works:
The CLI authenticates with your TrainerRoad account and gives you commands like:
-
trcli today — today’s planned + completed workouts
-
trcli future --days 14 — upcoming schedule with TSS
-
trcli past --days 30 — training history
-
trcli ftp — FTP snapshot + full history
-
trcli levels — progression levels by zone
-
trcli plan — current training plan and phases
-
trcli power-records — personal bests by duration
Everything outputs JSON. Timezone support built in (–tz America/New_York). Auth is cookie-based and persistent — log in once, then it just works.
For the dev-curious:
Any AI agent that can run shell commands can use this — Claude Code, Codex, OpenClaw, etc. Install globally via npm:
npm install -g trainerroad-cli echo “your-password” | trcli login --username yourname --password-stdin trcli future --days 7 --tz America/New_York --json
From there you can build whatever you want — daily nutrition briefs, training dashboards, weekly summaries, accountability bots. The CLI just handles the data layer.
npm: https://www.npmjs.com/package/trainerroad-cli
A note for TrainerRoad team: This is an unofficial tool that accesses user data through authenticated sessions. If this isn’t in the spirit of the platform or causes any concerns, I’m happy to take it down — just let me know. I built it because I love the product and wanted to extend what I could do with my own data.