Control an existing Spotify session without leaving the terminal.🎵

Spotify CLI

Description

Control an existing Spotify session without leaving the terminal.

  • Support for Linux, MacOS, and Windows
  • Download once, and keep up to date with spotify update
  • Control playback for music and podcasts
  • Play and queue songs by name
  • Command aliases and autocompletion

Installation

Get the latest version here.

Usage

Aliases

spotify back spotify b
spotify next spotify n
spotify play spotify p
spotify pause spotify p
spotify queue spotify q
spotify status spotify s
Comments
  • Add 'play --playlist' support. Issue #27

    Add 'play --playlist' support. Issue #27

    Fixes issue #27

    Upgraded root spotify module from v0.5.0 => v0.6.0. Added --playlist flag to the play function that takes a playlist name and plays it.

    Tests have been updated to reflect upgrade from spotify v0.5.0 -> v0.6.0 New tests required for additional features.

  • Error: Player command failed: No active device found

    Error: Player command failed: No active device found

    When I try to play music I get the error:

    Error: Player command failed: No active device found
    

    Probably because I have more than one device connected to Spotify.

    Searching on google I've found: https://github.com/spotify/web-api/issues/1325 which suggest to make the request with https://api.spotify.com/v1/me/player/play?device_id="+this._device_id

    I've been looking on the source code to add this option, but I have no experience with cobra and I also don't know where the request is made to test if this change could work. Could you tell me where I can change it? So I can report if that change works for me (and hope for other users with more than one device)

  • Login fails

    Login fails

    Hello!

    I've tried to login but when accept permission, redirect a localhost url

    Captura de Pantalla 2021-07-07 a la(s) 17 05 48

    and in my apps tab spotify cli is shown

    Captura de Pantalla 2021-07-07 a la(s) 17 07 48

    I've already tried to remove app and try again, the problem is still there

    Hope you can help me!

  • Cannot login

    Cannot login

    Concerns spotify version 1.9.0

    After what seems a successful login, I get an error when I try to execute a command like status. I tried it both in Windows and in WSL2. Same result.

    Windows 10 I run spotify login, the browser opens on Spotify login page for Spotify CLI, I login and get a success page in the browser. The cli does not seem to be happy:

    spotify login
    Error: You are not logged in: Run "spotify login"
    Usage:
      spotify login [flags]
    
    Flags:
      -h, --help   help for login
    

    Any suggestions?

  • Does this require spotify premium to work?

    Does this require spotify premium to work?

    I can see the status of my account, the current playing song and so on. But none of the commands actually work. The play pause commands don't have any effect on the Spotify app. Pausing does show "Paused ..." in command prompt but spotify doesn't pause.

  • Incomplete installation information

    Incomplete installation information

    Hello @brianstrauch. I downloaded the amd version of the spotify-cli from the link you provided in the README section. However, there is no further instruction as to how to install it on my system (macOS 12.0.1). Would it be possible to have detailed instructions on the installation?

    Thank you very much!

  • Version auto-updating. Issue #30

    Version auto-updating. Issue #30

    Resolve issue https://github.com/brianstrauch/spotify-cli/issues/30 Add ldflags for sets application version (https://goreleaser.com/customization/build/)

    example for dev environment:

    $ goreleaser release --snapshot --skip-publish --rm-dist
    $ ./spotify-cli --version
    
    spotify version v1.9.2-SNAPSHOT-0ebcff2
    commit: 0ebcff245e7d750ead4a11e0b1ce50f9c9beb40a
    built at: 2021-07-20T20:11:53Z
    

    How to use. (example: https://goreleaser.com/quick-start/) example:

    • just create new tag: git tag -a v1.9.3 -m "new best features"
    • then push: git push origin v1.9.3 And goreleaser auto sets version for app.
  • Add lint job to Github actions and fixed lint errors

    Add lint job to Github actions and fixed lint errors

    I just add a new Github action for Go lint in the test.yml. For more info on how golangci-lint works you can check https://golangci-lint.run/usage/quick-start/.

    There were a few lint errors that have been fixed but I'm not quite sure about these fixes.

    Fixed next lint errors: internal/login/login.go:122:19: Error return value of server.Shutdown is not checked (errcheck) main.go:30:23: Error return value of viper.SafeWriteConfig is not checked (errcheck) main.go:31:20: Error return value of viper.ReadInConfig is not checked (errcheck) main.go:63:14: Error return value of root.Execute is not checked (errcheck) internal/play/play.go:52:3: ineffectual assignment to err (ineffassign) internal/common.go:51:10: SA1015: using time.Tick leaks the underlying ticker, consider using it only in endless functions, tests and the main package, and use time.NewTicker here (staticcheck)

  • ClientID in the code

    ClientID in the code

    Hey! I don't know if I am repeating or not, but is it should be here? https://github.com/brianstrauch/spotify-cli/blob/8d5d257d6a6da61de44b53ef4a888c1cb7f3527a/internal/common.go#L11

  • Added autocompletion for bash, zsh, fish and powershell

    Added autocompletion for bash, zsh, fish and powershell

    The pull request contains the code for autocompletion. I only know how to source it for zsh and bash(not a huge fan of windows and didn't used fish yet):

    Bash:

    source <(spotify completion bash)
    

    Zsh:

    source <(spotify completion zsh)
    
  • Play

    Play "Liked Songs" playlist

    It seems that the only way to accomplish this is to hit the following endpoint and play songs individually from the returned list. Any other ideas?

    https://developer.spotify.com/documentation/web-api/reference/#endpoint-get-users-saved-tracks

Are you programming and suddenly your stomach is rumbling? No problem, order your Ifood without leaving your favorite text editor ❤️

vim-ifood Você ta programando e de repente bateu aquela fome? Sem problemas, peça seu Ifood sem sair do seu editor de texto favorito ❤️ Are you progra

Jun 2, 2022
Visp is a Vi-like Spotify client for terminal users.
Visp is a Vi-like Spotify client for terminal users.

Visp Visp is an interactive console client for Spotify, written in Go. Its interface is similar to Vim, and aims to be fast, configurable, and practic

Dec 31, 2022
Spotify lyrics in your terminal.

sptlrx Spotify lyrics in your terminal. Features Timesynced lyrics in your terminal. Fully compatible with spotifyd. Works well with long lines & Unic

Jan 1, 2023
A spotify shell client in go.

libman Libman is an interactive spotify shell. Features Control your spotify playback. Edit playlists. Fully complies to the spotify web api terms of

Oct 16, 2022
Go package and server app for retrieving time-stamped lyrics from Spotify.

lyricsapi Go package and server app for retrieving time-stamped lyrics from Spotify. Usage Use as package go get github.com/raitonoberu/lyricsapi pack

Nov 18, 2022
Spotify clone server for golang
Spotify clone server for golang

Spotify-clone-server Written by ?? rasulov-emirlan ?? sultanaliev-s ?? Howe to use this server ?? create repository called "database" right next to th

Aug 31, 2022
Command-line tool to customize the official Spotify client. Supports Windows, MacOS and Linux.
Command-line tool to customize the official Spotify client. Supports Windows, MacOS and Linux.

Command-line tool to customize the official Spotify client. Supports Windows, MacOS and Linux. Features Change colors whole UI Inject CSS for advanced

Jan 2, 2023
Experimenting with the spotify api

experimenting with the spotify api trying to learn file structuring in Go as well as put some hours in, in the language preps for a backend service I

Dec 11, 2021
For productivity addicts who enjoys coding while listening to Spotify
For productivity addicts who enjoys coding while listening to Spotify

?? nvim-spotify For productivity addicts who enjoys coding while listening to Sp

Dec 30, 2022
Convert your Youtube Playlists into Spotify Playlists

yt2spotify Description This is an application that allow a Spotify user to migra

Dec 28, 2021
Spoti2wall: Set the Spotify album cover you are currently playing as your wallpaper

?? spoti2wall Set the Spotify album cover you are currently playing as your wall

Dec 5, 2022
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration
Reads from existing Cloud Providers (reverse Terraform) and generates your infrastructure as code on Terraform configuration

TerraCognita Imports your current Cloud infrastructure to an Infrastructure As Code Terraform configuration (HCL) or/and to a Terraform State. At Cycl

Dec 30, 2022
A simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager.

ssmh This is a simple CLI tool that outputs the history of connections to Amazon EC2 instances using AWS Session Manager. Installation brew install mi

Dec 10, 2021
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.
Stonks is a terminal based stock visualizer and tracker that displays realtime stocks in graph format in a terminal.

Stonks is a terminal based stock visualizer and tracker. Installation Requirements: golang >= 1.13 Manual Clone the repo Run make && make install Pack

Dec 16, 2022
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.
GC2 is a Command and Control application that allows an attacker to execute commands on the target machine using Google Sheet and exfiltrate data using Google Drive.

GC2 GC2 (Google Command and Control) is a Command and Control application that allows an attacker to execute commands on the target machine using Goog

Dec 13, 2022
A CLI to control firecracker

firecracker-ctl A CLI to control firecracker Short introduction Starting a VM Note: x86 guest # Download Kernel + RootFS

Oct 31, 2021
Simple command line tool to control TP-Link HS100 and HS110 Devices

tplink-hs1x-cli A simple app to control TPLink HS100 and HS110 devices. Sometimes it is just easier to use a simple cli tool to turn the lights on and

Nov 9, 2021
Command line interface for control iTunes
Command line interface for control iTunes

iTunes CLI Command line interface for control iTunes Description You can control iTunes operations from command line. Equipments macOS Sierra or later

Sep 30, 2022