Skip to main content

A simple but powerful interactive command-line tool to search and download high-quality MP3s from YouTube Music.

Project description

grab-yt-mp3

PyPI version PyPI - Python Version License: MIT

A beautiful interactive command-line tool to search and download high-quality MP3s from YouTube Music directly to your local machine.

Features

  • Interactive Search: Search for songs on YouTube Music and choose from top results.
  • High-Quality Audio: Automatically extracts and converts the best available audio to MP3.
  • Rich Metadata & Cover Art: Embeds artist, album, and thumbnail cover art directly into the downloaded MP3.
  • Cross-Platform: Works on Windows, macOS, and Linux.
  • Direct Query: Pass search queries directly via command-line arguments.

(Note: Requires ffmpeg to be installed and available in your system's PATH.)

Installation

Prerequisites

  1. Python 3.14+
  2. FFmpeg (Required for audio extraction and metadata embedding)
    • Windows: winget install ffmpeg or via gyan.dev
    • macOS: brew install ffmpeg
    • Linux: sudo apt install ffmpeg

Using uv (Recommended)

To install from PyPI:

uv tool install grab-yt-mp3

To install locally from source (After cloning the repo):

uv tool install .

Using pip

pip install grab-yt-mp3

To install locally for development:

pip install -e .

Usage

You can launch the tool simply by typing:

ytdl

Or you can pass a search query directly:

ytdl "Never Gonna Give You Up"

You can also pass a direct YouTube link as a positional argument to skip the interactive search:

ytdl "https://music.youtube.com/watch?v=dQw4w9WgXcQ"

Help

ytdl --help

Development

To setup the development environment:

uv sync --all-groups
# run the project with:
uv run ytdl

License

MIT License

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

grab_yt_mp3-1.0.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: grab_yt_mp3-1.0.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grab_yt_mp3-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ab9d529b4ae7a8c6963aaee587959b880c850c8f0ba174cc1d5ba38d35dff385
MD5 625320b1ac369f429a43599a4da811e4
BLAKE2b-256 19381bb466de8910a20e9316d7648c722fd42f08d4a1c8e4648bf635d90a08a5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: grab_yt_mp3-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for grab_yt_mp3-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f9e1421167ef980762f96551ee510964744908887ba2e615f52188fd4294085
MD5 b7ccfb16103272087ac492b5354f216e
BLAKE2b-256 5658155859455c4c9811a22322f121b47b30bc7c13a87c5c4d3788f7ee24b433

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