JSPM

trainerroad-cli

0.1.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 9
    • Score
      100M100P100Q36160F
    • License ISC

    Unofficial CLI for authenticating with TrainerRoad and querying timeline/workout data

    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 help

    Global install

    npm install -g trainerroad-cli
    trainerroad-cli help

    Local project install

    npm install trainerroad-cli
    npx trainerroad-cli help

    Local development (from source)

    git clone https://github.com/quinnsprouse/trainerroad-cli.git
    cd trainerroad-cli
    npm install
    npm run help

    Quickstart

    1. Authenticate
    trainerroad-cli login --username <username> --password-stdin
    1. 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
    1. Discover all commands
    trainerroad-cli help
    trainerroad-cli help future --json
    trainerroad-cli discover --level 3 --json

    Modes

    • private (authenticated): full account data
    • public (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 to TR_TIMEZONE or system timezone)

    Security

    • Session cookies are stored in .trainerroad/session.json.
    • Treat this file as sensitive and do not commit it.