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

greenloader

v1.1.2

Published

Spotify downloader with small customization.

Readme

GreenLoader

Spotify downloader with small customization. Download tracks, albums, and playlists with rich metadata and high-quality artwork.

⚠️ Disclaimer

This tool is for educational purposes only. Users are responsible for complying with Spotify's Terms of Service and applicable copyright laws. The developers do not condone piracy or copyright infringement.

Features

  • Download tracks, albums, and playlists from Spotify
  • Apple Music metadata integration - More metadata including composer, genre, copyright
  • High-quality artwork - Up to 3000x3000 from Apple Music
  • Synced lyrics support - Embedded LRC format lyrics
  • Complete ID3 tagging - Including ISRC, track numbers, artwork
  • Customizable file organization - Template-based naming and folder structure
  • Skip existing files - Resume interrupted downloads
  • Decryption & Tagging - Core audio decryption and metadata tagging implemented in JavaScript
  • Premium quality - 256kbps AAC when available (128kbps AAC for free users)

Installation

npm install -g greenloader

On Termux (recommended):

yarn add greenloader > /dev/null 2>&1

Quick Start

  1. Generate configuration file:
greenloader --init

Or use with npx (especially Termux):

npx greenloader --init
  1. Edit config.json and add your Spotify cookie:

    • Open Spotify Web Player in your browser
    • Open Developer Tools (F12)
    • Go to Application/Storage → Cookies
    • Copy the value of sp_dc cookie
    • Paste it in config.json under spotify.cookie
  2. Download music:

# Single track
greenloader https://open.spotify.com/track/xxxxx

# Album
greenloader https://open.spotify.com/album/xxxxx

# Playlist
greenloader https://open.spotify.com/playlist/xxxxx

⚙️ Configuration

Edit config.json to customize behavior:

Spotify Settings

{
  "spotify": {
    "cookie": "YOUR_SP_DC_COOKIE",
    "clientId": "...", // Automatically, no need to change
    "accessToken": "...", // Automatically, no need to change
    "accessTokenExpiry": "..." // Automatically, no need to change
  }
}

Apple Music Integration

{
  "appleMusic": {
    "enabled": true,
    "bearer": "...", // Automatically, no need to change
    "musicUserToken": "YOUR_APPLE_MUSIC_USER_TOKEN"
  }
}

Download Settings

{
  "download": {
    "outputDir": "./downloads",
    "trackTemplate": "{artist} - {title}",
    "albumTemplate": "{albumArtist} - {album}",
    "playlistTemplate": "{playlistName}",
    "trackFilenameInAlbum": "{trackNumber} - {title}",
    "trackFilenameInPlaylist": "{index} - {artist} - {title}",
    "createArtistFolder": false,
    "createAlbumTypeFolder": false,
    "coverArtSize": 3000,
    "embedLyrics": true,
    "preferAppleMusicArtwork": true
  }
}

Template Variables

  • {artist} - Track artist
  • {albumArtist} - Album artist
  • {title} - Track title
  • {album} - Album name
  • {trackNumber} - Track number (zero-padded)
  • {discNumber} - Disc number
  • {year} - Release year
  • {playlistName} - Playlist name
  • {index} - Playlist index (zero-padded)

Metadata Settings

{
  "metadata": {
    "comment": "Downloaded with GreenLoader",
    "addDownloadDate": false,
    "customTags": {}
  }
}

Advanced Settings

{
  "advanced": {
    "concurrentDownloads": 1,
    "retryAttempts": 3,
    "retryDelay": 2000,
    "skipExisting": true,
    "verboseLogging": false
  }
}

CLI Options

greenloader <spotify-url> [options]

Options:
  --init              Generate default config.json file
  --version, -v       Show version number
  --no-apple          Disable Apple Music metadata
  --output DIR        Custom output directory
  --skip-existing     Skip already downloaded files

Examples

Basic Download

greenloader https://open.spotify.com/track/xxxxx

Custom Output Directory

greenloader https://open.spotify.com/album/xxxxx --output ./my-music

Without Apple Music Metadata

greenloader https://open.spotify.com/playlist/xxxxx --no-apple

Resume Interrupted Download

greenloader https://open.spotify.com/album/xxxxx --skip-existing

Project Structure

greenloader/
├── index.js          # Main application code
├── bin/
│   └── cli.js        # CLI entry point
├── config.json       # User configuration (generated)
├── downloads/        # Default download directory
├── package.json
├── README.md
└── LICENSE

Metadata Sources

  1. Spotify API - Track information
  2. Apple Music API - More metadata via ISRC lookup
    • Composer
    • Genre(s)
    • Copyright information
    • High-res artwork (up to 3000x3000)

ID3 Tags

  • Title, Artist, Album, Album Artist
  • Track Number, Disc Number
  • Release Year, Genre
  • Composer, Copyright
  • ISRC (International Standard Recording Code)
  • Embedded Artwork
  • Synced Lyrics (LRC format)

License

GPL-3.0 License - see LICENSE file for details

Acknowledgments

  • Portions of this project are adapted from work by PwLDev. Originally licensed under MIT.
  • Some internal code adapted from PwLDev/node-spdl
  • @spdl/widevine / node-widevine - Widevine DRM handling (GPL-3)
  • Apple Music Internal API
  • Spotify Internal API

Legal Notice

This tool is provided for educational purposes only. Users must:

  • Have a valid Spotify subscription
  • Comply with Spotify's Terms of Service
  • Respect copyright laws in their jurisdiction

The developers are not responsible for any misuse of this tool.


Made with ❤️ by Paxsenix0