Create Playlist in cmus


Here's how to create a playlist in cmus, an in-terminal music player for linux/mac/terminal-things.

Install

Playing 44100 Hz from the terminal is what all the cool cats are doing. It's a great music library manager and player:

sudo apt install cmus

And open it:

cmus

I like cmus. But if ya'll have a really nice player (with better keyboard shortcuts), I'm ready for suggestions.

Point to Music

The first view (ie, view 1, navigated to by pressing the 1 key) is the Tree View.

Add a directory with your music so that cmus can see it and play stuff from it. Like vim, press : colon to enter the command mode and type:

:a /mnt/mynetworkshare/music

Create Playlist

The third view (ie, view 3, nav with the 3 key) is the Playlist View.

By default, there's one playlist, called "default". We want to make our own:

:pl-create myplaylist

Now myplaylist will appear in the playlist.. list. To mark it as the active playlist, go down with j and mark with space. The * star moves next to the myplaylist item.

Select Songs

Go back to the Tree View (press 1), and nav to some songs:

  • j / k - up and down the list
  • /[myquery] - to search tracks by a query term
  • tab - to switch panes from artists to albums/tracks

Once you find a track you like, add to your playlist with y. If you go back to Playlist View, you'll see it on myplaylist

To remove a song from the playlist, just D it.

Export Playlist

Playlists aill be persisted inside of cmus and available the next time you start it.

But if you want to take the playlist in plaintext form with you, you can export it. If not already marked, mark the playlist. Export with:

:pl-export ~/Downloads/myplaylist.txt

It's nothing fancy, and that's nice. One file path per line, in the order of the playlist.

Now go put that thing in Amazon S3 Glacier before you lose your favorite mixtape!