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

gpm-playlister

v1.0.0

Published

A command line tool that generates a Google Play Music playlist from a BBC Playlister url

Readme

GPM-Playlister

A command line Node.js tool that generates a Google Play Music playlist from a BBC Playlister url.

gpm-playlister generate http://www.bbc.co.uk/playlist/zzzzwj
gpm-playlister generate -s radioscotland

example generate command output

Table of contents

Requirements

Installation

npm install -g gpm-playlister

Permissions: GPM-Playlister needs to be able to write to the file system (login). Using sudo to install and when running the login command would resolve any permission errors. However it would be better to fix your npm permissions.

Usage

gpm-playlister --help

  Usage: gpm-playlister command [options] <argument...>

  Commands:
    generate [options] <url|station_name>  Generate a playlist
    login <google_username> <password>     login to google music

  Command help:
    gpm-playlister login -h
    gpm-playlister generate -h

Login

First you must authorise GPM-Playlister to access your Google Play Music account.

gpm-playlister login --help

  Usage: login <google_username> <password>

  Example:
    gpm-playlister login [email protected] password123

Run login again to either change or update the account GPM-Playlister is authorised against.

  • Google account using two step authentication: you must use a newly created app password, in place of your usual account password.

    • Use the 'Select App' dropdown to pick 'Other (Custom Name)', I would suggest using 'GPM-Playlister' as the name. This will generate a password for use with this tool.
  • Regular Google accounts: Ensure the "Allow less secure apps" setting is "ON" found here.


What does this do? Due to no official GPM API we have to use an unofficial one. This will create a mock 'Android' device on your account, which you would be able to see here. The mock android id and token is saved locally in: config/auth-token.json. GPM-Playlister will masquerade as this authorised device. The app does not locally save your username and password.


Generate

Requires authorisation. See: Login

gpm-playlister generate --help

  Usage: generate [options] (<url> | <station_name>)

  Options:
    -s, --station  Station mode: Required when using station name instead of url
    -g, --guided   Guided mode: ask for help when finding matching search results
    -r, --replace  Replace mode: Replace existing GPM playlist

  Examples:
    gpm-playlister generate -s radio1
    gpm-playlister generate -s -r -g radio1
    gpm-playlister generate http://www.bbc.co.uk/playlist/zzzzwj
    gpm-playlister generate -r -g http://www.bbc.co.uk/playlist/zzzzwj

Generate will create/replace a playlist in your Google Play Music library containing:

  • A name and description pulled from the BBC Playlister source, as well as a link to the source.
  • A track list populated with matching songs where a match can be found on GPM.
  • Fuzzy matching will be used to help resolve common differences in titles, such as the use of a (Radio Edit) classification, or using feat. as apposed to featuring.
  • Track ordering will be maintained from the source.

Sources

Options

-g --guided Guided mode

This will ask for user help to match songs from results if no exact matches are found.

gpm-playlister generate -g http://www.bbc.co.uk/music/playlists/zzzzwj

example guided mode

-s --station Station mode

GPM-Playlister can also generate playlists from the preset stations available in the config/stations.json. These are BBC radio playlists that are updated weekly. The following would generate a playlist from the BBC Radio 1 playlist.

gpm-playlister generate -s radio1

-r --replace Replace mode

Will replace an existing GPM playlist if one is found with the same name. If there isn't a match, a new playlist will be generated.

gpm-playlister generate -r http://www.bbc.co.uk/music/playlists/zzzzwj
gpm-playlister generate -r -s radio1

This is useful in several use cases:

  • Maintaining an up-to-date playlist from the weekly updates to the BBC Radio track listings.
  • Maintaing a publicly shared GPM playlist url, such that the playlist can be updated.
  • If you have the GPM Playlist downloaded, then changes to a playlist will be automatically downloaded to the GPM app.
  • Replacing the playlist with one with better matches i.e using guided mode

Multiple options

Short flags may be passed as a single arg, for example -srg is equivalent to -s -r -g.

gpm-playlister generate -srg radio1

Example output

Station: BBC Radio 6 Playlist source -> Shared GPM Playlist Output

BBC Playlist: David Bowie: A Life In Music source -> Shared GPM Playlist Output

Note: These playlists are generated by myself and shared publicly. They may not always be up-to-date.

Attribution

  • https://github.com/jamon/playmusic - Google Play Music client for Node

To Do

  • Test tool from countries other than UK (BBC Playlister may be region locked)
  • Write tests
  • Improve fuzzy matching
  • Allow fuzzy matching of artists (Maximo Park -> Maxïmo Park)
  • Logout functionality
  • Custom auth-token.json location, so that it may persist with updates to the tool
  • Store final report as log file

License

GPM-Playlister is licensed under the MIT license. Copyright © 2016, Adam Tavener