Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ersel/spotify-cli-mac
🎶 A nodejs app to control Spotify without leaving your terminal. 🎶
https://github.com/ersel/spotify-cli-mac
cli mac nodejs spotify
Last synced: 2 months ago
JSON representation
🎶 A nodejs app to control Spotify without leaving your terminal. 🎶
- Host: GitHub
- URL: https://github.com/ersel/spotify-cli-mac
- Owner: ersel
- License: mit
- Created: 2017-01-06T22:34:48.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T17:32:00.000Z (about 2 years ago)
- Last Synced: 2024-04-14T15:48:36.840Z (9 months ago)
- Topics: cli, mac, nodejs, spotify
- Language: JavaScript
- Homepage:
- Size: 214 KB
- Stars: 173
- Watchers: 5
- Forks: 28
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- open-source-mac-os-apps - Spotify-Cli-Mac - Control Spotify without leaving your terminal. :notes: ![javascript_icon] (Applications / Music)
- open-source-mac-os-apps - Spotify-Cli-Mac - Control Spotify without leaving your terminal. :notes: ![javascript_icon] (Applications / Music)
README
# :notes: Spotify Client for Mac OS X :notes:
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](https://developer.spotify.com/dashboard/applications) 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](https://asciinema.org/a/APkHEAAV5OEMtwH50kiz0Kkwk.svg)](https://asciinema.org/a/APkHEAAV5OEMtwH50kiz0Kkwk)# Usage
spotify
Commands:search|s [query...] Search for a (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 and copy value to clipboard
token|tk Change Client Spotify tokens
user|me Set Spotify Username
lyrics|ly Display the lyrics of currently playing trackOptions:
-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-clientsOnce you have your client access token, edit the `~/.spotify-cli-config.json` with `GeniusAPIClientKey` key
Example
```json
{
"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!*