Streaming my Spotify library from the terminal with spotify_player

I’ve been on the hunt for an alternative desktop client to stream my Spotify library. You see, like countless others, I pay Spotify the monthly fee just to listen to music ad-free—that’s it. I don’t expect anything else from them other than ensuring the music playback is stellar and that I have access to their vast library all the time. Sure, the recommendations and playlists are a nice bonus but I’m not as invested in those as I am in my personal collection of nearly 2000 songs. Sadly for me, streaming music is not the sole focus of the company anymore and their quest to expand into podcasts, videos, etc. has deteriorated my perceived experience of music playback. I’m sure I’m not alone.

This change in direction is mainly visible in the apps, which are now quite bloated and have become such resource hogs. On my M1 MacBook Air, this is what the resource usage looks like when Spotify is in the background, minimized, and streaming my liked songs (which is how I use it 99% of the time):

macOS Activity Monitor showing Spotify processes and memory usage. The window displays multiple Spotify-related processes including the main Spotify app and several helper processes using over 500MB of combined memory. At the bottom, a memory pressure gauge shows system memory statistics with 16 GB total physical memory and 11.34 GB memory used.

I just wanted to listen to music and do other things. This seemed unacceptable. So, I came up with a checklist to evaluate potential alternatives:

  1. Play my liked songs, albums, and playlists
  2. Search and play tracks and albums
  3. Consume fewer resources and don’t hog my system
  4. Bonus
    1. Control music playback on connected devices
    2. Work with Raycast Spotify extension
    3. Offline playback

Initially, I was leaning towards alternative GUI clients, hoping there’d be something native built for macOS. But no dice. The closest thing was Jan Pochyla’s Psst which is written in Rust but it’s still in early development. So, I switched gears to TUIs—Terminal User Interfaces.

Thang Pham’s spotify_player seemed like the best choice for an actively developed cross-platform, open-source Spotify TUI client. It’s written in Rust and I hoped that meant it’s fast so I decided to give it a shot. Installing it was easy with Homebrew:

brew install spotify_player

Once installed, just type spotify_player and hit enter. Follow the instructions to authenticate the client with your Spotify account and allow it to play back music. Thereafter, just enter spotify_player to access the TUI.

It’s thankfully as fast as I hoped it’d be. The interface was very straightforward and not too difficult to navigate. Here’s a cheatsheet:

  1. Arrow keys to move up and down lists and Tab to move between panes
  2. g s to search for songs/playlists/albums etc.
  3. g y to access your liked songs
  4. Enter to start playing the song
  5. Space to pause/resume
  6. ? for a help page with a list of commands and shortcuts
  7. Backspace to go back between screens
  8. q to Quit

This is how it looks playing back an album:

spotify_player TUI showing The Weeknd’s album “Hurry Up Tomorrow” with 22 tracks. The current song playing is “Wake Me Up” at 70% volume on Spotify. The interface displays a track list with song titles, durations, and a progress bar. The album artwork appears as a small thumbnail in the top left corner.

While not surprising, I was glad to see that with iTerm2, spotify_player renders the album art in the TUI. I’ve seen screenshots on Reddit that rendering images/videos in terminals is very much a thing but this is probably the first time I’m actively a consumer of such a capability. Here’s how my liked songs look:

spotify_player TUI displaying a “Liked Tracks” playlist with 1,942 songs. Currently playing is “High For This” by The Weeknd from the album “Hurry Up Tomorrow” at 70% volume. The screen shows a list of diverse tracks from various artists and albums, including songs from The Weeknd, Joel P West, Hozier, and others. Each track listing includes the title, artist, album name, and duration. A small progress bar is visible at the top of the interface.

And the search page:

spotify_player TUI showing search results for “Blinding Lights”. At the top, Hozier’s “Too Sweet” from “Unreal Unearth: Unaired” is currently playing at 100% volume. The search results are categorized into Tracks, Albums, Artists, Shows, and Playlists, all related to “Blinding Lights”. Various versions are listed including the original by The Weeknd, remixes featuring ROSALÍA and Major Lazer, and covers by different artists. The results also include playlists and albums containing the song.

To be frank, I had very low expectations regarding the supported features for such a TUI client but I was very surprised to find out it supports controlling remote playback and being controlled from other devices. This meant I could also control it from the Raycast extension eliminating the need to use the TUI most of the time. But, the real cherry on the top was the memory usage:

macOS Activity Monitor window showing system resource usage, filtered to display “spotify”. The spotify_player process is using 41.9 MB of memory. The bottom of the window shows a memory pressure graph and detailed memory statistics.

Quite dramatic: Just 42 MB of memory usage which is a 13X improvement! 🤯 All while enabling most things I care about.

Let’s take a look at my checklist once again:

  • Play my liked songs, albums, and playlists
  • Search and play tracks and albums
  • Consume fewer resources and don’t hog my system
  • Bonus
    • Control music playback on connected devices
    • Work with Raycast Spotify extension
    • Offline playback

I don’t know about you but this was a slam dunk find for me. I’ve been using spotify_player for a week now and while it does have occasional glitches when switching playback between devices, I found that being able to quit and reopen the TUI in 3 seconds is a very acceptable remedy in the worst case. The only thing missing is offline playback but I can imagine DRM making that difficult. It was going to be a bonus anyway.