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

@freeyourmusic/cli

v11.3.0

Published

Command-line interface for FreeYourMusic. Uses your FreeYourMusic account on freeyourmusic.com: transfers, library, playlist tools, insights and stats. Needs FreeYourMusic Pro.

Readme

@freeyourmusic/cli

The FreeYourMusic command-line interface. It uses your FreeYourMusic account, the same account as the web app at freeyourmusic.com/app: connected services, library, transfers, sync, playlist tools, insights, stats and exports. The CLI needs FreeYourMusic Pro.

Quickstart

npm i -g @freeyourmusic/cli
fym login            # opens freeyourmusic.com/app/cli; sign in and tap Allow
fym status
fym services connect spotify
fym library playlists --account-id <uuid>

fym login works with every sign-in method of your account (email, Apple, Google). On a machine without a browser, open the printed URL on another device (--no-browser). For CI, set FYM_TOKEN to an owner token instead.

Commands

Run fym help, fym <group> --help and fym <command> --help. Every command takes --json.

The commands come from the FreeYourMusic web API: one command for each operation of musicapi /v1/fym (musicapi/openapi-fym.json) and of server /fym-account. Flags are the input names in kebab case (--transfer-uuid); required inputs can also be given in order as arguments. A complex input takes JSON or @file.json, and --input @file.json takes the whole input.

| Group | What | |---|---| | login, logout, status | Sign-in and the account state | | services, accounts | Music services: services connect <service>, services reconnect <accountUuid>, accounts list, accounts refresh, accounts remove | | library | Collections, playlists, songs, refresh | | playlists, covers | Playlist details, create, edits (add, remove, move, rename, describe), tools (sort, shuffle, dedupe, split), copy, merge, delete, versions, covers | | queue | The queue of the account: queue get, queue enqueue, queue cancel, queue dismiss | | search | The catalogue search of a service | | transfers | Create, list, progress, items, pause, resume, delete, sync, retry, recreate, export | | matches | Songs that were not found: search, pick, reject | | insights | Playlist insights and share cards | | stats | Listening stats, sections, shares | | exports | Library exports | | notifications, account, premium | Preferences, email, Pro plans, checkout, licence keys | | watch | Live events of the account |

Commands that delete or replace data need --yes. There is no transfer cancel: pause or delete a transfer.

Every write to a playlist joins the queue of the account, as in the app: playlists delete, playlists merge, covers upload and the others answer at once with the queue action, and FreeYourMusic runs it on the server. Run fym queue get to see how it ended. fym queue enqueue takes any action as JSON, for example a delete of up to 200 playlists in one action. It asks for --yes for a delete, and for a merge with keepOriginals false.

Free and Pro

The CLI is a Pro feature. The sign-in (fym login) asks for an account with Pro; the browser page offers Pro to a free account. When Pro ends, only the account commands work (fym account, fym premium plans, fym premium buy <plan>); every other command exits with code 4.

Exit codes

| Code | Meaning | |---|---| | 0 | Success | | 1 | Wrong input, or the API refused the input | | 2 | Not signed in, or the session ended (fym login) | | 3 | FreeYourMusic could not be reached, or an unexpected error | | 4 | Pro needed | | 5 | Too many requests |

Environments and files

  • --env production|rc|local (or FYM_ENV). rc (= staging) uses the RC servers (api.stampapp.io, api.musicmigrator.com, site.stampapp.io/app) to test an RC release: fym login --env rc, then fym status --env rc. Each environment keeps its own session. FYM_MUSICAPI_URL, FYM_SERVER_URL, FYM_MUSIC_APP_URL and FYM_WEB_URL override the hosts (local needs all four).
  • ~/.fym/credentials.json (mode 0600) keeps one owner token per environment. The CLI refreshes it before its last 7 days. fym logout deletes it on this computer; fym account sign-out-everywhere ends the other sessions too.
  • FYM_NO_BROWSER=1 never opens a browser.

Error reporting

Published builds report unexpected failures to FreeYourMusic's Sentry project. Tokens, request payloads and arguments are not attached. Development and test builds do not report. Set FYM_DISABLE_TELEMETRY=1 to turn reporting off, or SENTRY_DSN to use your own destination.

Maintainers

  • The version is in packages/fym-cli/package.json (the MCP package uses the same version). rc-fym-cli publishes <version>-rc.<iid> with the npm tag next, master-fym-cli publishes <version> with latest (gitlab-ci/.publish.yml, ci/fym-cli/stage-npm-packages.sh; the publish runs in gitlab.com/freeyourmusic/npm-packages).
  • Bump the version in packages/fym-cli/package.json on develop right after each master-fym-cli release. Else the next rc-fym-cli publishes <old>-rc.<iid>, which npm sorts below the released <old>, and the tag next points at an older version than latest.
  • After a change of musicapi/openapi-fym.json, run pnpm --filter @freeyourmusic/cli-client gen:operations.
  • Checks: pnpm tsc-lint:fym-cli, pnpm lint:fym-cli, pnpm test:fym-cli (CI job test-fym-cli).