Minimal OCaml CLI program for controlling the spotify desktop client. Supported platforms:
- Linux (via DBus)
- Mac OSX (via osascript)
The easiest way to install is with opam, an OCaml package manager:
opam install spotify-cli
spotify-cli now-playing spotify-cli play-pause spotify-cli previous spotify-cli next spotify-cli play-album <search-string> spotify-cli play-artist <search-string> spotify-cli play-track <search-string>
play-track search for the supplied name using
the spotify metadata API, and play the first result (if any).
search-string doesn't have to match the album or track title exactly - in
fact you will probably get better results if you specify the artist name along
with the album or track name e.g.
spotify-cli play-album "sepultura arise"