Skip to main content

A production-grade YouTube music downloader CLI

Project description

🎵 musicmandu

musicmandu is a production-grade, zero-configuration command-line interface (CLI) tool written in Python. It allows users to seamlessly download high-quality audio from YouTube videos and automatically process them into fully tagged, album-art-embedded MP3 files.


✨ Features

  • Zero Manual Dependencies: Automatically detects, downloads, and caches the correct system-specific FFmpeg binaries at runtime—even when Windows user paths contain spaces.
  • High-Quality Audio: Downloads the best available audio stream and converts it into a clean 192 kbps MP3 file.
  • Rich Metadata Integration: Automatically extracts and embeds metadata such as the title and creator, then downloads and embeds the video's high-resolution thumbnail as album art.
  • Sleek Visual Feedback: Uses Rich console components to replace noisy console output with clean status spinners and styled messages.

🚀 Installation & Prerequisites

musicmandu runs on Windows, macOS, and Linux.

1. Requirements

  • Python 3.8 or later

2. Set Up the Project

Clone or navigate to the project directory, then install the required Python packages:

pip install typer rich yt-dlp ffmpeg-downloader

🛠 Usage & Commands

Run the CLI using standard Python execution syntax:

python main.py [COMMAND] [ARGUMENTS] [FLAGS]

1. Greet Users (greet)

Test the CLI setup or display a custom greeting.

# Standard greeting
python main.py greet Milan

# Formal greeting
python main.py greet "Mr. Wayne" --formal

2. Download Tracks (download)

Download audio and save a formatted MP3 file in the current working directory.

python main.py download "https://www.youtube.com/watch?v=dQw4w9WgXcQ"

3. View Built-in Help

Display automatically generated command descriptions, arguments, and flags.

python main.py --help
python main.py download --help

⚙️ Architecture & Under the Hood

The application relies on three core frameworks to provide a seamless user experience:

  • Typer: Powers command parsing, argument handling, flags, and dynamically generated help screens.
  • Rich: Manages styled terminal output, layout, and responsive loading indicators.
  • yt-dlp and ffmpeg-downloader: Handle the download and processing pipeline, including metadata extraction, high-bitrate audio retrieval, thumbnail downloading, and FFmpeg-based MP3 conversion.

Runtime Dependency Sandbox

When the download command is invoked, the application runs a gatekeeper function named ensure_ffmpeg_installed.

If a valid FFmpeg installation cannot be found in the system path, the application downloads and caches a platform-specific FFmpeg binary. It then maps the binary into the current process environment without modifying the user's global system configuration.


📝 License

Distributed under the MIT License. See LICENSE for more information.


💡 Project Idea

A useful next feature would be a download history log that records previously downloaded songs.

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

musicmandu-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

musicmandu-1.0.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file musicmandu-1.0.0.tar.gz.

File metadata

  • Download URL: musicmandu-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for musicmandu-1.0.0.tar.gz
Algorithm Hash digest
SHA256 30aa78816f10f8fa6e3b621cf4ec352414cfa3e8c376721d681cfe24fb6fbffd
MD5 e111980d615a89ab182af21e6efeaeee
BLAKE2b-256 39198b5e9174905bccede452c2a39045c7749f2fc362ddc20061f90616f0b81c

See more details on using hashes here.

File details

Details for the file musicmandu-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: musicmandu-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for musicmandu-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84aa5a78f4274881b1583dc517cd4867e7c3d058c031aa71e3fbca5a28a51d90
MD5 83f9efd8b163c5394f0aa80c112f8de4
BLAKE2b-256 0581de76b2ec59b8006f8c96e5ad1989bb97c28824e36fdc2bae83d2c4d5418f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page