Skip to main content

Garmin iCAL Export

Garmin Connect currently only supports publishing a calendar of planned workouts for the next 30 days (source). Unfortunately, there is no native way to export or publish your past activities. This package provides a CLI tool designed to bridge that gap.

The tool exports your activity history into an iCalendar (.ics) file, which can be imported into any calendar application.

To keep your calendar synchronized with Garmin Connect, you will need to:

  1. Schedule a periodic job to run the CLI tool.
  2. Host the generated iCalendar file at a public or accessible URL.
  3. Subscribe to that URL from your preferred calendar client.

Installation

pip3 install garmin-ical-export

Usage

usage: garmin-ical-export [-h]
                          [--activity_type {running,cycling,swimming,multi_sport,fitness_equipment,hiking,walking,winter_sports,other,all}]
                          [--limit LIMIT]
                          [--measurement_system {metric,imperial}]
                          [--target_file TARGET_FILE]
                          [login_email]

Exports Garmin Connect activities to iCalendar file.

positional arguments:
  login_email           your Garmin Connect login e-mail (falls back to the
                        GARMIN_ICAL_EXPORT_EMAIL env var, then an interactive
                        prompt)

optional arguments:
  -h, --help            show this help message and exit
  --activity_type {running,cycling,swimming,multi_sport,fitness_equipment,hiking,walking,winter_sports,other,all}
                        export only specific type of activity
  --limit LIMIT         max. number of activities to export
  --measurement_system {metric,imperial}
                        which system to use to calculate activity properties
  --target_file TARGET_FILE
                        target .ics file (prints to stdout if not passed)

Your password is never accepted as a command-line argument — it's always read from the GARMIN_ICAL_EXPORT_PASSWORD env var or an interactive, hidden prompt. See Security note below.

Examples

Export all activities, print the result (password prompted interactively).

garmin-ical-export <GARMIN_CONNECT_EMAIL>

Export only running activities, save the result to garmin_activities.ics file inside home folder.

garmin-ical-export <GARMIN_CONNECT_EMAIL> --activity_type running --target_file ~/garmin_activities.ics

Run non-interactively, e.g. from a cron job, without exposing credentials as command-line arguments.

GARMIN_ICAL_EXPORT_EMAIL=<GARMIN_CONNECT_EMAIL> GARMIN_ICAL_EXPORT_PASSWORD=<GARMIN_CONNECT_PASSWORD> garmin-ical-export --target_file ~/garmin_activities.ics

Security note

login_email is optional and may be passed as a command-line argument, but password never is — it's always read from the GARMIN_ICAL_EXPORT_PASSWORD env var, or an interactive, hidden prompt if that's not set. This avoids the password ever ending up in your shell history or being visible to other users on the machine via the process list (ps). login_email falls back the same way, via GARMIN_ICAL_EXPORT_EMAIL, if you'd rather not pass it as an argument either.

After a successful login, the tool caches your session (not your password) in a garmin-ical-export-session file in your system's temp directory, so you won't be prompted for MFA on every run. Delete that file to force a fresh login.

Development

See AGENTS.md for local setup and running tests.

License

MIT

Metadata

Release files for garmin-ical-export 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for garmin-ical-export 2.0.0
File Size Uploaded
garmin_ical_export-2.0.0.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for garmin-ical-export 2.0.0
File Interpreter ABI Platform
garmin_ical_export-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.2 kB

Release files / garmin_ical_export-2.0.0.tar.gz

Download URL garmin_ical_export-2.0.0.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
567084b1b2074c4c97d411ba8235460e7f2a16cfac7ec612ba3fce4b0d610526
BLAKE2b-256 checksum
How to use checksums
45ed319bb3900b9cb7623ad400e270482ebd7271156fbd20d5504ceee6f25f6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / garmin_ical_export-2.0.0-py3-none-any.whl

Download URL garmin_ical_export-2.0.0-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c07ecffaa49dee3a01c8630536e872e5279ca491ccbe185df955d451e2f9eef
BLAKE2b-256 checksum
How to use checksums
5d9b545e7a7f894e20aaaa73b15152b5f4c924225c1a6ca424ad05375707ba4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

1.2.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page