Enrich and manage your Komoot planned tours with intelligent deduplication, AI-powered renaming, and automatic POI enrichment from OpenStreetMap.
Turn generic "Planned Route" into rich, organized GPX files.
- ๐บ๏ธ Bulk download all your Komoot planned tours as GPX files
- ๐ Smart deduplication - automatically find and remove duplicate routes you've saved multiple times
- ๐ POI enrichment - add useful waypoints (water, toilets, bike repair, viewpoints, castles) from OpenStreetMap, with AI-generated descriptions
- ๐ค Intelligent renaming - replace "Planowana trasa" with descriptive names like "Krakรณw - Tarnรณw via Niepoลomice" using reverse geocoding and AI
- ๐งน Sync cleanup - changes apply to both Komoot and your local files
- ๐ Safe by default - preview everything with
--dry-runbefore making changes
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ KOMOOT AUTHENTICATION โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โน Found stored credentials, attempting login...
โ Authentication successful!
โน Fetching planned tours from Komoot...
โ Found 53 planned tours
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ DOWNLOADING GPX FILES โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Downloading GPX files... โโโโโโโโโโโโโโโโ 100%
โ Downloaded 5 new, skipped 48 existing
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ FINDING DUPLICATES โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Comparing routes... โโโโโโโโโโโโโโโโโโโโ 100%
Duplicate: Old Route โ New Route
โน Total comparisons: 1,378
โ Found 2 duplicate groups
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ENRICHING GPX FILES WITH POIS โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Enriching with POIs... โโโโโโโโโโโโโโโโโ 100%
โ Krakรณw - Tarnรณw via Niepoลomice: 45 POIs added
โ Sunday Morning Loop: 12 POIs added
โ Enriched 50 GPX files with 1,234 POIs
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ AI-POWERED ROUTE RENAMING โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Renaming routes... โโโโโโโโโโโโโโโโโโโโโ 100%
Planowana trasa
ID: 12345678 | Distance: 45.2 km
Type: Loop
Current: Planowana trasa
Suggested: Krakรณw - Niepoลomice Loop via Bieลczyce
โ Renamed successfully
โ Done!
- Python 3.10+
- Komoot account
- OpenAI-compatible API key (required for POI descriptions and route renaming)
git clone https://github.com/edgard/routesmith.git
cd routesmith
pip install -r requirements.txt# Set your API key (required)
export OPENAI_API_KEY="sk-..."
# Preview changes without executing (recommended for first run)
python routesmith.py --dry-run
# Run all steps: download, dedupe, enrich, rename
python routesmith.py| Command | Description |
|---|---|
routesmith.py |
Run all steps (same as sync) |
routesmith.py sync |
Run all steps: download, dedupe, enrich, rename |
routesmith.py download |
Download GPX files only |
routesmith.py dedupe |
Find and delete duplicates only |
routesmith.py enrich |
Add POIs to GPX files only |
routesmith.py rename |
AI-powered renaming only |
| Option | Description |
|---|---|
--dry-run |
Preview changes without executing |
--yes, -y |
Skip confirmation prompts |
--limit N, -n N |
Process only first N routes |
--force |
Re-process already processed routes |
--debug |
Enable verbose output for troubleshooting |
# Required
export OPENAI_API_KEY="sk-..."
# Optional (defaults shown)
export OPENAI_API_BASE="https://api.openai.com/v1"
export OPENAI_MODEL="gpt-5-mini"Compatible with: OpenAI, Anthropic Claude (via compatibility layer), Ollama, LM Studio, vLLM, or any OpenAI-compatible endpoint.
- Authenticate - Login to Komoot
- Fetch tours - Get all planned tours metadata
- Download GPX - Cache GPX files locally (skips existing)
- Deduplicate - Find and remove duplicates
- Enrich POIs - Add OpenStreetMap waypoints with AI descriptions
- AI Rename - Generate descriptive names using geocoding + POI data
Routes are duplicates if they match ALL criteria:
- Start/end points within 1% of route length (100-300m)
- Point counts within 25%
- Sample points (8-20) mostly match within 1.5% threshold
The oldest route (lowest ID) is always kept.
Adds waypoints from OpenStreetMap:
Utilitarian: Drinking water, toilets, bike repair, bike shops, shelters
Points of Interest: Castles, viewpoints, museums, waterfalls, peaks, archaeological sites, memorials
POI count and search radius scale with route distance. AI generates brief descriptions explaining what makes each POI notable.
Uses reverse geocoding (Nominatim) and an LLM to generate descriptive names:
- Place names in native spelling (e.g., "Krakรณw" not "Krakow")
- Format:
Start - End via NotableorStart - Notable Loop - Maximum 50 characters, no emojis
Updates: Komoot title, GPX <name> tag, and local filename.
~/.local/share/routesmith/
โโโ credentials.json # Komoot login (plain text)
โโโ tours.json # Tour metadata with tracking
routes/ # In working directory
โโโ komoot_123456.gpx # Original downloads
โโโ krakow_loop_123456.gpx # After renaming
Security: Credentials are stored in plain text (Komoot doesn't provide OAuth). Set appropriate permissions: chmod 700 ~/.local/share/routesmith
Use --debug to enable verbose output:
python routesmith.py --debugShows: API requests/responses, query sizes, token usage, full tracebacks.
Authentication failed
- Delete
~/.local/share/routesmith/credentials.jsonand re-enter credentials
No duplicates found
- Duplicate detection is precise; routes must be nearly identical
- Routes with different start/end points won't match
No POIs found
- Route may be in a remote area with few mapped POIs
- Check Overpass API status
AI renaming fails
- Verify
OPENAI_API_KEYis set correctly - Check API rate limits/quota
- Unofficial Komoot API - May break if Komoot changes their API
- Sequential processing - Routes processed one at a time with rate limiting
- Plain text credentials - Komoot doesn't provide OAuth
- OSM data quality - POI completeness varies by region
- API costs - AI features make API calls; use
--limitto test
Contributions welcome! Ideas:
- Add new POI categories (
ALL_POI_CATEGORIES) - Tune duplicate detection thresholds
- Improve AI prompts
- Add support for other platforms (Strava, Ride with GPS)
Please open an issue first to discuss major changes.
- kompy - Komoot API
- gpxpy - GPX parsing
- haversine - GPS calculations
- openai - AI API
- requests + requests-ratelimiter - HTTP
- rich - Terminal UI
- typer - CLI framework
MIT License - See LICENSE for details.
This tool is not affiliated with Komoot or OpenStreetMap. It uses Komoot's unofficial API which may break at any time. Credentials are stored locally in plain text. Use at your own risk.