npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

garmin-strava-automator

v0.1.5

Published

Automate uploads from Garmin GPS devices to your Strava account

Readme

Garmin Strava Automator

Automatic Garmin uploads to Strava, plus automatic archiving

Somewhat inspired by @thegingerbloke's Pi Python Garmin Strava.

Garmin Strava Automator [GSA] takes the pain out of uploading your activities after a long ride or run. Get home, plug your Garmin device into your Mac (Window support soon...) and GSA uploads the activity to Strava, and backs up your activity files from your Garmin to your chosen location (I use Dropbox). It then cleans up your activities from the Garmin, freeing up limited memory.

Installation

To install this package using npm run:

npm install garmin-strava-automator

Alternatively clone this repository.

Currently not working on node 4.0.0 as the usb dependency of node-usb-detection has some issues with 4.0.0.

Next make a copy of config.sample.json and save it as config.json.

Garmin setup

You need to configure where you want to grab activities from on your device, where your device normally mounts and where you want to copy activities to as backup.

You can set all these options in config.json.

{
  "env": {
    ...
  },
  "garmin": {
    "idVendor": 2334,
    "volumeName": "GARMIN",
    "activityPath": "/Garmin/Activities/"
  },
  "dropboxPath": "~/Dropbox/Garmin Backups/"
}

idVendor as far as I know is fixed for all Garmins as 2334 (0x91E), but if yours doesn't work you can find it out and change it here. To find it run system_profiler SPUSBDataType and find your device in there. You'll need to convert the number from hex to dec so it can be stored in JSON format.

Strava Access Token Generation

You will need to create your own application on Strava in Settings -> My API Application.

Make a copy of config.sample.json and save it as config.json then add the Client ID, Client Secret and Access Token from your API Application page to the "env" properties in config.json.

It should look something like this:

{
  "env": {
  	"STRAVA_ACCESS_TOKEN": "f7e50f461da110ca62b74a31c5652631f7e50f46",
  	"STRAVA_CLIENT_SECRET": "ec679d3d9ba115d9906e23efa2eb68ef2af3c1c",
  	"STRAVA_CLIENT_ID": "1234",
  	"STRAVA_REDIRECT_URI": "http://localhost"
  }...

On your API Application page set the 'Authorization Callback Domain' to be http://localhost.

The default access token only has public permissions, which are insufficient to upload files, so we need to request write permissions from the API.

To do this simply run

$ node setup

This will launch your browser and go to strava to request authorization for this local application. Approve it and when redirected, select the new code value from the url you are redirected to. You want to copy everything after code= in the url below

http://localhost/?state=&code=7a29cc1ae49c0e0148620cadd69196a19b33be1f

Paste that code into the terminal as prompted.

That's it, you're authorized to upload to Strava.

Running GSA

To run GSA just

$ node app

If your Garmin is already plugged in, it will be detected, otherwise, plug it in and wait for the browser to open with your activity!

Running as a Daemon

Use forever js to run this as a daemon. Make sure forever is installed

$ npm install forever -g

Then run forever with the supplied config file.

$ forever start forever.json