• Stars
    star
    177
  • Rank 214,761 (Top 5 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🎢 A nodejs app to control Spotify without leaving your terminal. 🎢

🎢 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!

More Repositories

1

stoic-thoughts

Picks a random quote from a list of 400 quotes by Seneca, Epictetus and Marcus Aurelius.
Shell
25
star
2

chipper

A static analysis tool to examine ES6 imports/CommonJS requires across your codebase πŸ”¬
JavaScript
13
star
3

country-code-info

A JavaScript module to get country information in various standards.
JavaScript
9
star
4

dotfiles

Shell
3
star
5

social-feed-example

JavaScript
2
star
6

time-tracker-slack-gsheets

JavaScript
2
star
7

the-art-of-worldly-wisdom

πŸ“œ 300 maxims from Baltasar Gracian's The Art of Worldly Wisdom, 1647 πŸ“œ
Shell
2
star
8

7-deadly-sins-of-react

slides for my talk at ContainerDays Hamburg 2019
JavaScript
2
star
9

twitter-clone

JavaScript
2
star
10

teaching-sim

JavaScript
1
star
11

git-example-1

1
star
12

cy-student-roster

1
star
13

hello-world

1
star
14

react-demo

JavaScript
1
star
15

express-middleware-example

JavaScript
1
star
16

ersel.github.io

My personal blog
HTML
1
star
17

payful-landing

CSS
1
star
18

git-lecture-demo

JavaScript
1
star
19

shopping-cart-kata

JavaScript
1
star
20

django-testing-101

views, mock, httpretty and test coverage
Python
1
star
21

ReadNow

A chrome extension which opens first item on your ReadLater bookmark list. Use together with ReadLater app.
JavaScript
1
star
22

SpotifyHelper

Chrome extension: Opens spotify URLs in the native app, closes the web player tab inside your Chrome instance.
JavaScript
1
star
23

shopping-basket-kata

JavaScript
1
star
24

catching-falling-knives

Analyze biggest daily decliners on NYSE and NASDAQ
Python
1
star
25

twilio-hacker-news-calling

A sample Django App to showcase various way to mock external dependencies.
Python
1
star
26

github-workflow

1
star