Giter VIP home page Giter VIP logo

spotify-cli-mac's Introduction

๐ŸŽถ Spotify Client for Mac OS X ๐ŸŽถ

A nodejs app to control Spotify without leaving your terminal. Only works with Mac Os as it relies on AppleScript behind the scenes to communicate with the Spotify app.

Installation

npm install spotify-cli-mac -g

Client will be available under the alias spotify

Set-up

In order to use the client, you'll need to set Spotify Credentials. You can do this by going to developer dashboard and then creating a new application.

Once you have created a new Spotify Application, just run the Spotify CLI with spotify token command to set your tokens.

Demo

asciicast

Usage

spotify

Commands:

search|s <type> [query...]  Search for a <track (t) | artist (ar) | album (al) | playlist (p) > (searches tracks by default)
playlist|pl [username]      Get user's public playlists, by default use username in config.json
recommend|rec               Recommend other songs based on the song currently playing.

info|i                      Display information about the current track along with player status
play [uri]                  Continue playing current track or play the track with the provided URI
pause                       Pause the current track
next|n                      Play the next track in the queue
back|b                      Play the previous track
mute|m                      Mute player
unmute|u                    Unmute player
volume|v                    Display player volume
+ [deltaVolume]             Turn the volume up by given amount (0-100), default:10
- [deltaVolume]             Turn the volume down by given amount (0-100), default:10
p                           Toggle play/pause
replay|r                    Replay current track
position|pos [newPosition]  Get or set player position [mm:ss], e.g: pos 1:23
quit|q                      Quit Spotify :(
open|o                      Open Spotify :)
shuffle|ts                  Toggle shuffle on/off
repeat|tr                   Toggle repeat on/off
share|sh [type]             Display share <uri|url> and copy value to clipboard
token|tk                    Change Client Spotify tokens
user|me                     Set Spotify Username
lyrics|ly                   Display the lyrics of currently playing track

Options:

-h, --help     output usage information
-V, --version  output the version number

Displaying Lyrics

In order to be able to use the lyrics command, you will need to get a Client Access Token for the Genius API. Sign up for API access here: https://genius.com/api-clients

Once you have your client access token, edit the ~/.spotify-cli-config.json with GeniusAPIClientKey key

Example

{
  "spotifyClientID": "XXXXXXX",
  "spotifyClientSecret": "XXXXXXX",
  "spotifyUsername": "XXXXXXX",
  "GeniusAPIClientKey": "XXXXXXX"
}

Displaying Album artwork

Album artwork will also be displayed if you're using iTerm 2.9+.

Contributions and feedback are welcome and encouraged!

spotify-cli-mac's People

Contributors

ersel avatar jriordan22849 avatar quaddepo avatar meain avatar aterranova-bv avatar dylansmith avatar nick-gottschlich avatar hooliowobbits avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.