A powerful, AI-enhanced music downloader with support for Spotify, Apple Music, and YouTube Music
π Quick Install β’ π Documentation β’ οΏ½οΈ Features β’ β Support
This tool is for educational and personal use only. Please respect copyright laws and platform terms of service. Premium subscriptions are required for premium services. The developers are not responsible for any misuse of this software.
Get up and running in seconds with our automated installers:
Windows (PowerShell):
powershell -ExecutionPolicy Bypass -Command "irm https://raw.github.com/avinaxhroy/treta/main/install_remote.ps1 | iex"
Linux/macOS (Bash):
curl -fsSL https://raw.github.com/avinaxhroy/treta/main/install_remote.sh | bash
For advanced users who want more control:
# Clone the repository
git clone https://github.com/avinaxhroy/treta.git
cd treta
# Run the installer with global setup
python install_auto.py --global-install
Our smart installer automatically handles everything:
- β Python Environment: Detects and configures Python 3.8+
- β Dependencies: Installs all required packages
- β FFmpeg: Downloads and configures audio processing tools
- β Virtual Environment: Creates isolated Python environment
- β
Global Command: Sets up
treta
command system-wide - β PATH Configuration: Adds to system PATH automatically
Platform | Audio Quality | Formats | Requirements |
---|---|---|---|
Spotify | FLAC, 320kbps MP3 | FLAC, OGG | Premium Account |
Apple Music | AAC 256kbps | M4A, AAC | Active Subscription |
YouTube Music | Up to FLAC | FLAC, WEBM, MP3 | None (Free) |
- π€ AI Mood Detection: Automatically categorizes music by mood and energy
- π Smart Organization: Auto-sorts downloads by service/artist/album
- π Batch Processing: Download entire playlists and albums
- π― High Quality: Premium audio formats with complete metadata
- π Cross-Platform: Works on Windows, macOS, and Linux
- π¨ Interactive CLI: Beautiful command-line interface with progress bars
- π Statistics: Track your download history and library stats
- π Smart Search: Find and download music efficiently
After installation, simply run:
treta
This launches the interactive menu where you can:
- Download individual tracks or playlists
- Manage authentication for different services
- View your download statistics
- Analyze mood patterns in your library
Download a single track:
treta download url "https://open.spotify.com/track/4uLU6hMCjMI75M1A2tKUQC"
Download multiple URLs:
treta download url "url1" "url2" "url3"
Download from a file:
treta download batch --file my_playlist.txt
Download with specific quality:
treta download url "spotify_url" --quality flac
Before downloading from premium services, set up authentication:
Spotify:
treta auth add --service spotify
# Follow the prompts to log in
Apple Music:
treta auth add --service apple
# Enter your Apple ID credentials
Check authentication status:
treta auth status
Mood Analysis:
# Analyze your music library
treta mood analyze
# Create mood-based playlists
treta mood playlist --mood "energetic" --count 25
Library Statistics:
# View download statistics
treta stats overview
# Top artists in your library
treta stats artists --top 10
# Storage usage breakdown
treta stats storage
Queue Management:
# View download queue
treta queue list
# Pause/resume downloads
treta queue pause
treta queue resume
# Clear completed downloads
treta queue clear
Treta organizes your downloads in a clean, logical structure:
downloads/
βββ spotify/
β βββ Artist Name/
β β βββ Album Name/
β β β βββ 01 - Track Name.flac
β β β βββ 02 - Track Name.flac
β β β βββ cover.jpg
β β βββ Singles/
β βββ Playlists/
βββ apple/
β βββ [Similar structure]
βββ youtube/
β βββ [Similar structure]
βββ metadata/
βββ downloads.db
βββ mood_analysis.json
Run our built-in diagnostic tool:
python test_installation.py --verbose
Auto-fix common issues:
python test_installation.py --fix-issues
β Installation Failed
# Force reinstall with verbose output
python install_auto.py --force-reinstall --verbose
# Manual dependency install
pip install -r requirements.txt
β Authentication Issues
# Reset authentication
treta auth remove --service spotify
treta auth add --service spotify
# Clear auth cache
treta auth clear-cache
β Global Command Not Found
# Test global command setup
python test_global_command.py
# Manual PATH configuration (if needed)
# Windows: Add install directory to System PATH
# Linux/macOS: Add to ~/.bashrc or ~/.zshrc
β Download Failures
# Retry failed downloads
treta download retry
# Update downloaders
treta update components
# Check service status
treta status check
- π Full Documentation: See
TROUBLESHOOTING.md
- π Report Issues: GitHub Issues
- π¬ Community Support: Discussions
We welcome contributions! Here's how to get started:
# Clone and setup development environment
git clone https://github.com/avinaxhroy/treta.git
cd treta
python install_auto.py --verbose
# Install development dependencies
pip install -r requirements-dev.txt
# Install pre-commit hooks
pre-commit install
# Run all tests
pytest tests/ -v
# Run specific test categories
pytest tests/test_downloader.py -v
pytest tests/test_mood_detector.py -v
# Run tests with coverage
pytest --cov=treta tests/
- π΄ Fork the repository
- πΏ Create a feature branch (
git checkout -b feature/amazing-feature
) - β¨ Make your changes with tests
- β
Test thoroughly (
pytest tests/
) - π Commit your changes (
git commit -m 'Add amazing feature'
) - π Push to your branch (
git push origin feature/amazing-feature
) - π Submit a Pull Request
Treta builds upon the excellent work of these projects:
- Zotify - Spotify downloading engine
- GAMDL - Apple Music downloader
- yt-dlp - YouTube downloading
- librosa - Audio analysis and mood detection
- Rich - Beautiful terminal output
- Typer - Modern CLI framework
This project is licensed under the MIT License - see the LICENSE file for details.
π΅ Made with β€οΈ for music lovers everywhere π΅
β¬οΈ Download Latest β’ π Report Bug β’ π‘ Request Feature