Gem Version Build Status

Interacts with the currently running music player. Supports iTunes Mac, iTunes Windows, Spotify Mac, Rdio Mac, MPD, Rhythmbox, Amarok and XMMS2.


$ gem install anyplayer

Use it in your terminal

$ anyplayer artist     # artist of the current track
New Order
$ anyplayer track      # name of the current track
Blue Monday
$ anyplayer album
Power, Corruption & Lies
$ anyplayer next       # changes track forward
$ anyplayer prev       #               backward
$ anyplayer playpause  # pauses if it is playing, plays if it's paused
$ anyplayer play
$ anyplayer pause
$ anyplayer voldown    # put the volume somewhat up
$ anyplayer volup      #                         down
$ anyplayer volume     # prints the volume percentage
$ anyplayer vote       # votes to go to next song (default number of votes is 5)
$ anyplayer name
$ anyplayer launched && echo "a player is running" || echo "nothing running"
a player is running

Or in Ruby

In your Gemfile:

# Interact with the current music player
gem "anyplayer"

In your code:

require "anyplayer"
player =

player.launched? # => true # => Rythmbox
player.artist # => "The Avalanches"
player.track # => "Frontier Psychiatrist"
# …

Or in a browser

With the So Nice Web interface:

So Nice Screenshot


All contributions are welcome! Head to the Github issues to report bugs, questions or code. Also, check out

Here a few useful commands while developping:

$ ruby -Ilib bin/anyplayer  # Use the anyplayer command-line from source
$ bin/rake test             # Launch tests
$ bin/rake install          # Install from source
$ bin/rake console          # Launch console