Crates.io | spotifyctl |
lib.rs | spotifyctl |
version | 0.3.0 |
source | src |
created_at | 2023-08-10 16:41:26.58613 |
updated_at | 2023-08-10 16:41:26.58613 |
description | A simple tool to control spotify from the command line. |
homepage | |
repository | https://github.com/borisfaure/spotifyctl |
max_upload_size | |
id | 941171 |
size | 63,596 |
A simple tool to control spotify from the command line. Based on rspotify.
SpotifyCtl has few commmands:
get
: Display the currently playing track or episode.previous
: Restart the current track or skip to the previous track.next
: Skip to the next track.play-pause
: Pause or resume playback.SpotifyCtl is written in Rust. First, one need to Install a rust toolchain. And then run:
cargo install --path .
Client Id
and a Client Secret
. Note them down.Redirect URI
. I suggest using
https://localhost:8888/callback
. This URI do not need to be accessible.spotifyctl
.export RSPOTIFY_CLIENT_ID=ef0fbc0adc633de52214e7a211a13310
export RSPOTIFY_CLIENT_SECRET=08c77cdf9a8df31ffac2cd03eff0a748
export RSPOTIFY_REDIRECT_URI=https://localhost:8888/callback
spotifyctl get
in a terminal. This should start a browser when you
will to let your spotify user accept to connect to your new spotify app.spotifyctl get
.spotifyctl
will store a renewable token
on the disk and you will not have to authenticate using a browser again.spotifyctl
command whenever you want, but always with the
previously defined environment variables.