A collection of tools for working with Garmin activity data, including a command-line sync tool and a web-based TCX visualizer.
A command-line tool that automatically syncs latest Garmin activity to Strava.
-
Install the required dependencies:
uv sync- Create a
.envfile based on.env.exampleand fill in credentials:- Garmin Connect credentials (email and password)
- Strava API credentials (you can get these from Strava API Settings)
- Go to Strava API Settings
- Create a new application
- Set the "Authorization Callback Domain" to
localhost - Copy the Client ID and Client Secret to your
.envfile - Run
uv run auth_strava.py
Run the sync command:
uv run garmin2strava.pyThe tool will:
- Connect to Garmin account
- Download latest activity
- Upload it to Strava
- Automatically handle token refresh when needed
A beautiful, interactive web application for visualizing multiple TCX activity files on a map with distinctive colors and icons for each activity type.
- 🗺️ Interactive Map: Visualize activities on OpenStreetMap
- 📁 Multiple Files: Upload and display multiple TCX files simultaneously
- 🎨 Activity Types: Color-coded activities (Running, Cycling, Walking, Swimming)
- 🔒 Privacy First: All processing happens locally in your browser
- 📱 Responsive: Works on desktop and mobile devices
# Navigate to the web UI directory
cd web-ui
# Start a local server
python -m http.server 8080
# Open in browser
open http://localhost:8080Then drag and drop your TCX files from the downloads/ folder onto the web page!
GarminToStrava/
├── 📄 README.md # This file
├── 🐍 garmin2strava.py # Python CLI sync tool
├── 🔐 auth_strava.py # Strava authentication
├── 📦 pyproject.toml # Python dependencies
├── 📂 downloads/ # Downloaded TCX files
│ ├── 2025-07-26_Running_*.tcx
│ ├── 2025-07-26_Cycling_*.tcx
│ └── ...
└── 📂 web-ui/ # Web-based TCX visualizer
├── 🌐 index.html # Web application
├── ⚡ tcx-visualizer.js # JavaScript application
└── 📖 README.md # Web UI documentationÌ
- Clone the repository
- Set up Python environment with
uv sync - Configure Strava API credentials
- Run
uv run garmin2strava.py
- Navigate to
web-ui/directory - Open
index.htmlin a browser OR start a local server - Upload your TCX files and explore!
- Daily Sync: Use the Python CLI tool to automatically sync new activities to Strava
- Activity Analysis: Use the web UI to visualize and compare multiple activities on a map
- Data Export: Download activities from Garmin Connect in TCX format
- Batch Processing: Sync multiple activities at once
Both tools support these activity types:
- 🏃 Running
- 🚴 Cycling/Biking
- 🚶 Walking
- 🏊 Swimming (including Open Water)
- 💪 Other activities
This project uses:
- Python 3.12+ for CLI tools
- uv for dependency management
- Vanilla JavaScript for web UI
- Leaflet.js for interactive mapping
- Garmin Connect API for activity downloads
- Strava API for activity uploads
MIT License - see LICENSE.txt for details
Contributions welcome! Whether it's:
- 🐛 Bug fixes
- ✨ New features
- 📚 Documentation improvements
- 🧪 Testing enhancements
- Garmin - For the TCX file format
- Strava - For the upload API
- Leaflet - For the amazing mapping library
- OpenStreetMap - For free, open map data