Package Exports
- trainerroad-cli
- trainerroad-cli/src/cli.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (trainerroad-cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Unofficial TrainerRoad CLI
Unofficial tool. Not affiliated with or endorsed by TrainerRoad.
CLI to fetch TrainerRoad data for your account, including:
- future workouts
- past/completed workouts
- today view
- events and annotations
- progression levels
- plans and phases
- FTP and FTP prediction
- power ranking and power records
- weight history
Install
Run without install (npx)
npx --yes trainerroad-cli helpGlobal install
npm install -g trainerroad-cli
trainerroad-cli helpLocal project install
npm install trainerroad-cli
npx trainerroad-cli helpLocal development (from source)
git clone https://github.com/quinnsprouse/trainerroad-cli.git
cd trainerroad-cli
npm install
npm run helpQuickstart
- Authenticate
trainerroad-cli login --username <username> --password-stdin- Query data
trainerroad-cli whoami --json
trainerroad-cli today --json
trainerroad-cli future --days 30 --json
trainerroad-cli past --days 30 --json
trainerroad-cli plan --view current --json
trainerroad-cli levels --json
trainerroad-cli ftp --json
trainerroad-cli today --tz America/New_York --json- Discover all commands
trainerroad-cli help
trainerroad-cli help future --json
trainerroad-cli discover --level 3 --jsonModes
private(authenticated): full account datapublic(username-based): limited day-level data
Use --target <username> and/or --public for public mode queries.
Output
- default: pretty JSON
--json: structured JSON--jsonl: one record per line--fields a,b,c: project record fields--records-only: lighter record payloads--tz <IANA timezone>: localize day boundaries/timestamps (defaults toTR_TIMEZONEor system timezone)
Security
- Session cookies are stored in
.trainerroad/session.json. - Treat this file as sensitive and do not commit it.