CLI tool for downloading Spotify tracks, playlists, and albums with organized folders and progress tracking
Project description
๐ต GroveGrab CLI
A powerful command-line tool for downloading Spotify tracks, playlists, albums, and artists using your own Spotify API credentials.
โจ Features
- ๐ต Download Everything - Tracks, playlists, albums, and artists
- ๐ Your API Credentials - Use your own Spotify API to avoid rate limits
- ๐จ Beautiful CLI - Rich terminal UI with progress bars and colors
- ๐ Individual Song Progress - See each song's download progress in playlists/albums
- ๐ง High Quality - Download in MP3 (up to 320kbps), FLAC, OGG, OPUS, or M4A
- โก Fast & Efficient - Concurrent downloads with real-time progress
- ๐ Task Management - List, cancel, retry, and view logs for all downloads
- ๐ Batch Downloads - Download multiple URLs from a file
- ๐พ Smart Caching - Skip already downloaded tracks
- ๐ป Windows Compatible - Full support for Windows console (no Unicode issues)
๐ฆ Installation
Option 1: Install from PyPI (Recommended)
pip install GroveGrabCLI
Option 2: Install from Source
git clone https://github.com/yourusername/grovegrab-cli.git
cd grovegrab-cli
pip install -e .
Prerequisites
- Python 3.8+
- FFmpeg - Required by SpotDL for audio conversion
# Windows (Chocolatey) choco install ffmpeg # macOS brew install ffmpeg # Linux (Ubuntu/Debian) sudo apt install ffmpeg
๐ Quick Start
1. Setup Spotify API Credentials
Run the interactive setup wizard:
grovegrab auth
Or get credentials manually:
- Go to Spotify Developer Dashboard
- Create an app
- Copy your Client ID and Client Secret
- Add redirect URI:
http://localhost:8888/callback
2. Download Your First Track
grovegrab dl "https://open.spotify.com/track/..."
That's it! ๐
๐ Usage
Basic Commands
# Download a track/playlist/album
grovegrab dl "spotify_url"
# Download with custom settings
grovegrab dl "url" --format flac --quality 320k --output ~/Music
# Watch progress in real-time
grovegrab dl "url" --watch
# Run in background
grovegrab dl "url" --detach
Configuration
# Run setup wizard
grovegrab auth
# Show current configuration
grovegrab config --show
# Reset configuration
grovegrab config --reset
Task Management
# List active downloads
grovegrab list
# List all downloads (including completed)
grovegrab list --all
# Cancel a download
grovegrab cancel <task-id>
# Retry a failed download
grovegrab retry <task-id>
# View logs
grovegrab logs <task-id>
# Follow logs in real-time
grovegrab logs <task-id> --follow
Batch Downloads
# Download from a file containing URLs
grovegrab batch urls.txt
# With custom worker count
grovegrab batch urls.txt --workers 5
Example urls.txt:
https://open.spotify.com/track/...
https://open.spotify.com/playlist/...
https://open.spotify.com/album/...
Other Commands
# Show version
grovegrab version
# Get help
grovegrab --help
grovegrab dl --help
๐จ Screenshots
Single Track Download
Starting download: track
Downloading: Artist - Song Name โโโโโโโโโโโโโโโโโโโโ 60%
Playlist Download (Individual Songs)
Starting download: playlist
Overall: 15/31 tracks (2 failed) โโโโโโโโโโโโโโโโโโโโ 48%
Anirudh Ravichander - Pathala Pathala โโโโโโโโโโโโโ 100%
The Weeknd - Blinding Lights โโโโโโโโโโโโโโโโโโโโโโ 100%
Drake - God's Plan โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ 75%
Ed Sheeran - Shape of You โโโโโโโโโโโโโโโโโโโโโโโโโโ 30%
Task List
โโ Download Tasks โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ID Status Progress Current Track Stats โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ a1b2c3d4 > running 67% Drake - Hotline 3/5 โ
โ e5f6g7h8 OK completed 100% - 10/10 โ
โ i9j0k1l2 ERR failed 45% - 5/12 (2) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ๏ธ Configuration
Configuration is stored at:
- Linux/Mac:
~/.config/grovegrab/config.json - Windows:
%APPDATA%\grovegrab\config.json
Environment Variables
You can also set credentials via environment variables:
export SPOTIFY_CLIENT_ID="your_client_id"
export SPOTIFY_CLIENT_SECRET="your_client_secret"
export GROVEGRAB_OUTPUT="~/Music"
Configuration Options
| Setting | Default | Options |
|---|---|---|
audio_format |
mp3 |
mp3, flac, ogg, opus, m4a |
audio_quality |
320k |
128k, 192k, 256k, 320k |
default_download_path |
~/Music/GroveGrab |
Any valid path |
๐ ๏ธ Development
Setup Development Environment
# Clone the repository
git clone https://github.com/yourusername/grovegrab-cli.git
cd grovegrab-cli
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Format code
black grovegrab/
# Lint code
flake8 grovegrab/
Project Structure
grovegrab-cli/
โโโ grovegrab/
โ โโโ __init__.py # Package info
โ โโโ __main__.py # Entry point
โ โโโ cli.py # CLI commands
โ โโโ core.py # Download manager
โ โโโ config.py # Configuration
โ โโโ ui.py # Terminal UI
โโโ tests/ # Unit tests
โโโ docs/ # Documentation
โโโ requirements.txt # Dependencies
โโโ setup.py # Setup script
โโโ pyproject.toml # Project metadata
๐ Troubleshooting
FFmpeg not found
# Install FFmpeg first
# Windows: choco install ffmpeg
# Mac: brew install ffmpeg
# Linux: sudo apt install ffmpeg
No internet connection
# Check your network connection
ping google.com
Download fails
# View detailed logs
grovegrab logs <task-id>
# Retry the download
grovegrab retry <task-id>
Invalid credentials
# Re-run setup
grovegrab auth
# Or check your credentials at
# https://developer.spotify.com/dashboard
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
โ ๏ธ Legal Notice
This tool is for personal use only. Please comply with:
- Spotify's Terms of Service
- YouTube's Terms of Service (SpotDL uses YouTube as audio source)
- Copyright laws in your jurisdiction
Always support artists by using legitimate streaming services!
๐ Acknowledgments
- SpotDL - The amazing tool that powers the downloads
- Typer - Beautiful CLI framework
- Rich - Gorgeous terminal formatting
- GroveGrab Web - The original web version this CLI is based on
๐ Support
- ๐ Report Bug
- ๐ก Request Feature
- ๐ Documentation
Made with โค๏ธ for music lovers
If you enjoy this project, consider โญ starring the repository!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file grovegrabcli-1.0.1.tar.gz.
File metadata
- Download URL: grovegrabcli-1.0.1.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6199b3b76fec8fa4ed2f4a274873f94e2ac87b91b10ca4c94695ffba27b79dd7
|
|
| MD5 |
4bdf7eadac3e1de088a25386ecdffe9e
|
|
| BLAKE2b-256 |
1b0fa62f37389ada4420d23f54451a11618c11f947dbb10b6ca9814f044c475d
|
File details
Details for the file grovegrabcli-1.0.1-py3-none-any.whl.
File metadata
- Download URL: grovegrabcli-1.0.1-py3-none-any.whl
- Upload date:
- Size: 20.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4160e36a1f187279c4c1c9dded64fe0607b91df0062cac36027b0f612a0bf009
|
|
| MD5 |
4bc81680d8ae47581e9312bf0f240229
|
|
| BLAKE2b-256 |
36a000bac9017a36a7e2f813a1060ad9954ce29514c94cead67012890fe05682
|