# Strava CLI
> Strava command-line interface for activity data and uploads

## 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

## When to Use
- 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

## When NOT to Use
- You don't have a Strava account
- You need the full Strava social features
- 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

## Installation
- **pip**: `pip install strava-cli`
- **homebrew**: `brew tap bwilczynski/tap && brew install strava-cli`

## Related Tools
- [garmin-connect-export](/tools/garmin-connect-export) (complementary): garmin-connect-export exports Garmin data that can complement Strava activity tracking

---
Source: https://littlescripts.sh/tools/strava-cli
