Skip to content

🎡 The ultimate multi-platform music downloader supporting Spotify, Apple Music, and YouTube Music. Features include AI-powered mood detection, smart playlists, high-quality audio downloads (FLAC, AAC), and completely automated setup. πŸš€

License

Notifications You must be signed in to change notification settings

avinaxhroy/Treta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Treta Music Downloader

Release Python License Downloads

A powerful, AI-enhanced music downloader with support for Spotify, Apple Music, and YouTube Music

πŸš€ Quick Install β€’ πŸ“– Documentation β€’ �️ Features β€’ ❓ Support


⚠️ Important Disclaimer

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.


πŸš€ Installation

One-Click Installation (Recommended)

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

Manual Installation

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

What the Installer Does

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

πŸ› οΈ Features

🎧 Supported Platforms

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)

⭐ Key Features

  • πŸ€– 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

πŸ“– Usage

Getting Started

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

Quick Commands

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

Authentication Setup

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

Advanced Features

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

πŸ“ File Organization

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

πŸ”§ Troubleshooting

Health Check & Diagnostics

Run our built-in diagnostic tool:

python test_installation.py --verbose

Auto-fix common issues:

python test_installation.py --fix-issues

Common Issues & Solutions

❌ 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

Getting Help

  • πŸ“– Full Documentation: See TROUBLESHOOTING.md
  • πŸ› Report Issues: GitHub Issues
  • πŸ’¬ Community Support: Discussions

🀝 Contributing

We welcome contributions! Here's how to get started:

Development Setup

# 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

Running Tests

# 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/

Contribution Guidelines

  1. 🍴 Fork the repository
  2. 🌿 Create a feature branch (git checkout -b feature/amazing-feature)
  3. ✨ Make your changes with tests
  4. βœ… Test thoroughly (pytest tests/)
  5. πŸ“ Commit your changes (git commit -m 'Add amazing feature')
  6. πŸš€ Push to your branch (git push origin feature/amazing-feature)
  7. πŸ”„ Submit a Pull Request

πŸ™ Acknowledgments

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

πŸ“„ License

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


Star History

Star History Chart

About

🎡 The ultimate multi-platform music downloader supporting Spotify, Apple Music, and YouTube Music. Features include AI-powered mood detection, smart playlists, high-quality audio downloads (FLAC, AAC), and completely automated setup. πŸš€

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published