Play LastFM recommendations on linux: using mpd, yt-dlp and bash
Go to file
Nathan Paul 8b065c8516
bug: don't break out of the loop
fixes #13
2023-08-25 14:29:16 +05:30
.github feat: -c flag 2023-08-07 18:37:23 +05:30
stream docs: split into http and snapcast docs 2023-08-11 15:37:37 +05:30
LICENSE add license 2023-07-30 00:03:46 +05:30 readme: stream 2023-08-11 14:11:47 +05:30
charts feat: charts 2023-08-02 13:03:25 +05:30
jukebox bug: don't break out of the loop 2023-08-25 14:29:16 +05:30
listen feat: -c flag 2023-08-07 18:37:23 +05:30


Play LastFM recommendations on linux: using mpd(1), yt-dlp(1) and bash(1)

usage: demo


jukebox -h
  -a: <artist name>
  -g: <genre name>
  -s: <song name>

  -u: <lastfm: username>
  -m: <lastfm: mix | recommended | library>

  -l: vosk: uses your mic to search songs
  -y: use ytmusic tags for songs
  -c: top charts in your region (setup your api_key)


  • edit the script to: use your LastFM $username
  • choose between:
    • recommended: Listen to recommended music from
    • library: Listen to music youve scrobbled before
    • mix: Listen to a mix of music youve scrobbled before and recommendations from


  • sanity-check title/artist tags before scrobbling
  • figure your how to mpc add songs properly
  • make the script interactive
  • fast(er)? yt-dlp fetches
  • custom artist/album search
  • global charts
  • voice-recognition/search via vosk ref: bugswriter's video


  • mpd, yt-dlp, jq and optionally mpdscribble (to scrobble to LastFM)
  • run systemctl --user enable --now mpd mpdscribble at least once before running jukebox
  • read: foss-music-setup or use my dotfiles


  • charts: LastFM $api_key
  • listen: pip install vosk google-speech & pacman -S sox
  • stream: Stream songs to your other devices like a phone, laptop or speaker

This repo is hosted on Codeberg & mirrored to GitHub for traffic.

license: GPLv3 or Later