I'm the kind of person that enjoys reading lyrics of some songs while I listen to music. I'm also the kind of person that enjoys listening to music with lyrics while working. Also, the kind of person that spends a lot of time inside a terminal. So I decided to do a little lyrics client to use inside a pane of my tmux sessions. I've been using it for a while, but hadn't released it because I never got to writing tests for it.

If you're into music with lyrics in the terminal, give it a spin. The easiest way to install is through rubygems

gem install lyricli

Lyricli uses an engine system that allows it to extract your current song from different places. Since I'm an iTunes+Rdio kind of guy, those are the included ones. Lyricli is usable in the form of the lrc command. To get lyrics for a song you can do it in several ways. The most basic is to call it with the artist and the song as the arguments. For example:

lrc "Of Montreal" "An Eluardian Instance"

The easiest and most useful way though, is by using the included sources. To see what engines are available, call lyricli with the -l or --list-sources. For now it should just display itunes and rdio. You can enable a source by calling lyricli with the -e or --enable flags. For example:

lrc -e rdio

Depending on the source, this will give you certain instructions to enable the source. For example, rdio asks you to authorize the app, displays the URL and an input for the authorization code. Once your engine is set up, you can just call lrc while listening to music, and it will automatically find the lyrics for your current song. (You could just use watch -n 10 lrc and have an auto-updating lyric pane inside tmux or screen.) If you want to disable a source you can call lyricli with the -d or --disable flags, with the source name as parameter. Additionally you can use -r or --reset flags, again with the name of the source to clean up all the stored settings.

That's about it. I hope it's as useful to you as it has been to me. In my laptop I usually have a vim window with a small sidebar where I run lyricli, while at work I use it as a narrow column that sits between vim and two regular zsh windows (yay! screen real estate!) .

Check out the code on github and let me know what you think. If you need a new source, feel free to let me know, if I have a way to I'll do my best to; or you can try creating one yourself. It's really easy, and you can check the included rdio and itunes files to check how it's done.