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

komoot-cli

v1.1.1

Published

Unofficial command-line client for Komoot: list, download (GPX/FIT), edit, and upload your tours and routes from the terminal.

Readme

komoot-cli

npm version npm downloads license node

An unofficial command-line client for your Komoot account: list, view, download, edit, delete, and upload routes ("tours") from the terminal.

Disclosure: Komoot has no public developer API. This tool talks to api.komoot.de, the internal API Komoot's own web/mobile apps use. It is reverse-engineered, unversioned for external use, and could change or break at any time. Use at your own risk, for personal accounts only.

Table of contents

Features

  • List, view, edit, delete, and upload Komoot tours from the terminal.
  • Download tours as GPX or FIT.
  • Browse another user's public tours without logging in (--user <id>).
  • Credentials stored via the OS keychain (Secret Service D-Bus on Linux), with a locked-down plaintext fallback when a keychain isn't available.
  • Human-readable table output by default, or --json for scripting.

Requirements

  • Node.js 24 or newer.
  • Linux with a Secret Service D-Bus provider (GNOME Keyring, KWallet, etc.) for keychain credential storage. If unavailable, credentials fall back to a chmod 600 plaintext file at ~/.config/komoot-cli/credentials.json.

Install

From npm:

npm install -g komoot-cli

Or from this directory:

npm install -g .

This builds the TypeScript sources (via the prepare script) and installs the komoot-cli binary globally.

Usage

komoot-cli login                          # prompts for email/password, stores a token
komoot-cli logout                         # clears stored credentials
komoot-cli whoami                         # shows the currently logged-in account

komoot-cli routes list [--user <id>] [--type tour_planned|tour_recorded]
                       [--sport <type>] [--name <substr>] [--limit N] [--page N]
                       [--orderby name|id|date|distance|duration|elevation]
                       [--order asc|desc] [--json]
komoot-cli routes show <tour-id> [--json]
komoot-cli routes download <tour-id> [--format gpx|fit] [--output <path>] [--user <id>]
komoot-cli routes edit <tour-id> [--name <str>] [--sport <type>] [--status public|private|friends]
komoot-cli routes delete <tour-id>
komoot-cli routes upload <file> [--sport <type>] [--name <str>] [--format gpx|fit|tcx]

--verbose          # print request/response logging to stderr (never logs credentials)
--help / -h        # on the root command and every subcommand
--version / -V     # root command only

--orderby sorts server-side, except id, which Komoot's API does not support: for that field the CLI fetches all matching tours, sorts them locally, then applies --limit/--page. --order defaults to asc.

--user <id> (a numeric Komoot user id) runs a command unauthenticated against that user's public routes — no login required. Omit it to operate on your own account, which requires having run komoot-cli login first.

Examples

List your own tours:

$ komoot-cli routes list --sport hike --limit 3
ID         NAME                        ELEVATION UP   STATUS    DISTANCE   DURATION
987654321  Alpine ridge loop           842 m          public    18.4 km    5h12m
987654320  Sunday forest walk          120 m          private   7.2 km     1h45m
987654319  Coastal trail out-and-back  205 m          public    12.9 km    3h05m

Page 1 of 4

Download a tour as GPX:

$ komoot-cli routes download 987654321 --format gpx
Saved 987654321.gpx

Browse a public user's tours without logging in:

$ komoot-cli routes list --user 123456 --type tour_planned --json
{
  "_embedded": {
    "tours": [ ... ]
  }
}

Editing routes

routes edit only changes a tour's metadata (name, sport, status). Waypoint/path editing of an already-saved tour is not supported by this API surface — see the plan document for details.

Security & credential storage

komoot-cli login stores your Komoot session in the OS-native credential store where one is available: on Linux, via a Secret Service D-Bus provider such as GNOME Keyring or KWallet.

If no keychain backend is reachable, credentials fall back to a JSON file at ~/.config/komoot-cli/credentials.json, created with chmod 600 (owner read/write only), and a warning is printed to stderr so you know the fallback was used. --verbose logging never includes credentials.

Development

npm run build     # compile TypeScript to dist/
npm run watch     # compile on change
npm test          # run the Jest test suite (HTTP mocked, no live account access)
npm run lint      # type-check only

Project layout

bin/komoot-cli.js      # shebang entry point
src/
  commands/             # one file per CLI (sub)command
  api/                  # HTTP client, auth/login, credential storage, tours API calls
  util/                 # table rendering, prompts, error handling
  config.ts             # paths, base URLs, sport/status enums
test/                   # Jest tests, HTTP mocked via undici's MockAgent

License

MIT — see LICENSE.

Contributing

Bug reports and pull requests are welcome — please open one at github.com/albertoielpo/komoot-cli/issues.