greenloader
v1.1.2
Published
Spotify downloader with small customization.
Maintainers
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 greenloaderOn Termux (recommended):
yarn add greenloader > /dev/null 2>&1Quick Start
- Generate configuration file:
greenloader --initOr use with npx (especially Termux):
npx greenloader --initEdit
config.jsonand 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_dccookie - Paste it in
config.jsonunderspotify.cookie
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 filesExamples
Basic Download
greenloader https://open.spotify.com/track/xxxxxCustom Output Directory
greenloader https://open.spotify.com/album/xxxxx --output ./my-musicWithout Apple Music Metadata
greenloader https://open.spotify.com/playlist/xxxxx --no-appleResume Interrupted Download
greenloader https://open.spotify.com/album/xxxxx --skip-existingProject 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
└── LICENSEMetadata Sources
- Spotify API - Track information
- 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
