Skip to content

labithiotis/mdl

Repository files navigation

mdl MusicDownLoader

mdl is MusicDownLoader, a terminal music downloader for people who want to sync music locally.

Paste a URL, and the tool resolves music metadata, searches YouTube for matches, and downloads tracks. It stores a local sync manifest so future runs can reconcile the folder instead of starting over.

mdl

Provider support

Recognized providers:

  • Spotify
  • Apple Music
  • Amazon Music
  • YouTube Music
  • SoundCloud
  • Bandcamp
  • Qobuz
  • Deezer
  • Tidal

Current implementation status:

  • Music metadata import is attempted for every provider listed above.
  • Spotify still has the most direct/robust metadata path in the current implementation.
  • Audio downloads currently come from YouTube matches for all supported flows.

Why use it

  • Interactive CLI
  • Links work without API keys, we query via public urls
  • Downloads are grouped into a music name directory
  • A .mdl.json manifest is written next to the files for resyncs
  • Metadata is resolved directly from the music URL
  • Audio is currently sourced from YouTube

Install

ffmpeg must already be installed and available on your PATH.

NPM/BUN/PNPM

Globally

npm install --global @mdlx/cli
bun install --global @mdlx/cli
pnpm install --global @mdlx/cli

Execute directly

npx @mdlx/cli
bunx @mdlx/cli
pnpx @mdlx/cli

Homebrew

brew tap labithiotis/homebrew-tap && brew install mdl

Manual

Download the archive for your platform from the project's Releases page, extract the binary, and move it somewhere on your PATH.

chmod +x mdl
mv mdl /usr/local/bin/mdl
mdl --help

Usage

Run the interactive CLI:

mdl

Pass a playlist URL directly:

mdl "https://open.spotify.com/playlist/..."

Choose a base output directory:

mdl "https://open.spotify.com/playlist/..." --output ./music

Control how many tracks download in parallel:

mdl "https://open.spotify.com/playlist/..." --parallel 5

Choose the extracted audio format and quality:

mdl "https://open.spotify.com/playlist/..." --format m4a --bitrate 192K

CLI help:

mdl --help