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

spotify-library-checker

v1.0.5

Published

A Node.js utility to help you clean up your local music library by checking which artists are available on Spotify

Readme

Spotify Music Library Checker

npm version npm downloads License PayPal

A Node.js utility to help you clean up your local music library by checking which artists are available on Spotify. The tool scans your local music directory, matches artist names with Spotify's database, and helps you identify which folders you can safely delete if you're transitioning to Spotify streaming.

Features

  • Scans first-level directories in your music folder (assumed to be artist names)
  • Uses Spotify's API to find matching artists
  • Implements smart name matching with similarity scoring
  • Generates reports of matches and non-matches
  • Includes a safe deletion utility with confirmation prompts

Prerequisites

  • Node.js (v16 or higher)
  • A Spotify Developer account

Installation

You can install this tool globally using npm:

npm install -g spotify-library-checker

Or run it directly using npx:

npx spotify-library-checker-configure
npx spotify-library-checker "/path/to/your/music"

Configuration

Before using the tool, you need to configure your Spotify API credentials:

  1. Get your Spotify API credentials:

    1. Go to Spotify Developer Dashboard
    2. Create a new application
    3. Copy the Client ID and Client Secret
  2. Run the configuration command:

    spotify-library-checker-configure

    This will prompt you for your Spotify credentials and save them securely in ~/.spotify-library-checker/config.json.

Usage

1. Check Artists Against Spotify

Run the command with your music directory path as an argument:

spotify-library-checker "/path/to/your/music/directory"

This will:

  1. Scan all artist folders in the specified directory
  2. Check each artist name against Spotify's database
  3. Generate two files:
    • spotify_matches.txt: Lists folders with matching artists on Spotify
    • no_matches.txt: Lists folders with no matches on Spotify

2. Delete Matched Folders (Optional)

If you want to delete the folders that have matches on Spotify:

spotify-library-checker-delete

This script will:

  • Read the spotify_matches.txt file
  • Ask for confirmation before deleting each folder
  • Show the match quality (similarity percentage) for each deletion

Output Format

spotify_matches.txt

/path/to/folder    Spotify Artist Name    Spotify URL    Similarity%

no_matches.txt

/path/to/folder

Safety Features

  • Similarity threshold of 80% to prevent false matches
  • Confirmation prompt before each folder deletion
  • Full paths in log files for transparency
  • Error handling and logging
  • Directory existence validation
  • Directory path validation
  • Secure credential storage in user's home directory

Contributing

Feel free to submit issues and pull requests.

License

ISC