Grooveshark in your terminal.
Uses socket.io to pass messages back and forth between an open Grooveshark instance in Google Chrome and your terminal. In order to achieve this, an instance of a socket.io server is spawned as a daemon, serving as the middle-ware between the Chrome Extension and the CLI client.
Don't limit controlling Grooveshark to just your terminal! You can use any client to connect to the socket.io server to pass commands to Grooveshark (Android app, iOS app, etc).
Install
CLI
Install with npm: npm install -g grooveshark-cli
Chrome Extension
git clone git@github.com:L1fescape/grooveshark-cli-chrome.git
Load the Chrome Extension:
- Open
chrome://extensions
in Chrome - Click
Load Unpacked Extension
- Navigate to where you cloned the Grooveshark CLI Chrome Extension repo
Open
That's it!
Example
grooveshark start-server
grooveshark restore
grooveshark queue
grooveshark play
grooveshark status
grooveshark stop
grooveshark stop-server
API
grooveshark start-server
Starts the server component as a daemon if it's not running already.
grooveshark stop-server
WARNING: Currently doesn't work. Kill with ps ax | grep node; kill -9 [process id]
. Super sorry, can't find a way to kill a forever daemon right now.
Stops the server daemon if it's currently running.
grooveshark play [song index]
Starts playing a song or resumes playback. If an index in the queue is included, play song at that index.
grooveshark pause
Pauses currently playing song.
grooveshark stop
Stops playback.
grooveshark next
Plays next song in queue if there is one.
grooveshark prev
Plays previous song in queue if there is one.
grooveshark vol [volume level]
Sets the volume level of the player (0-100)
grooveshark mute
Toggles mute.
grooveshark clear
Clears current queue.
grooveshark restore
Restores previous queue if there is one to restore.
Todo
- Find a better way to start and stop the socket.io server. Currently no way to detect if it is already running or not.
- Make
stop-server
actually do what it's supposed to do. - Status can accept a format string that returns the status of the player in the format passed in.
- Document Server API so it's easier for people to write clients to connect and use it.
Contributing
If you see a bug, raise an issue via GitHub or better yet, submit a pull request!
If there's an issue with the Chrome Extension, open an issue in the Grooveshark CLI Chrome Extension repo.
All feedback and suggestions welcome.
License
MIT License • © Andrew Kennedy