Strava CLI
Strava command-line interface for activity data and uploads
Description
Strava CLI is a command-line interface that leverages the Strava API to access and manage fitness activity data. It supports querying activity statistics, listing and viewing detailed activity information, uploading GPX files, and flexible date filtering with natural language support. Output is available in JSON format for easy integration with tools like jq.
Install
pip install strava-clibrew tap bwilczynski/tap && brew install strava-cliAI Summary
Command-line interface for Strava that provides access to activity statistics, detailed activity views, and GPX upload capabilities with JSON output for scripting.
Capabilities
- + View recent, yearly, and all-time activity statistics
- + List activities with date range filtering using natural language
- + View detailed activity information including splits, heart rate, and gear
- + Upload GPX files (single or batch)
- + OAuth-based authentication via browser
- + JSON output format for piping to jq and other tools
Use When
- → You want to view your Strava stats from the terminal
- → You need to upload GPX files to Strava in bulk
- → You want to script or automate Strava data retrieval
- → You need activity data in JSON for further processing
Avoid When
- x You don't have a Strava account
- x You need the full Strava social features
- x You want to edit routes or segments
Usage Patterns
View activity statistics
strava stats Displays recent, yearly, and all-time activity statistics
List recent activities
strava activities Lists your recent Strava activities
Filter activities by date
strava activities --after '2 weeks ago' Lists activities from the last two weeks using natural language dates
View activity details
strava activity 1234567890 Shows detailed information for a specific activity
Upload a GPX file
strava upload my_ride.gpx Uploads a GPX file as a new activity to Strava
Typical Pipelines
strava activities --output json | jq '.[] | .name'