Spotify Player is a fast, easy-to-use, and highly configurable terminal music player written in Rust. It aims to provide feature parity with the official Spotify application, offering a minimalist UI with intuitive paging and a popup system.
Check out the demo of spotify_player v0.5.0-pre-release on YouTube or on asciicast.
sudo apt install libssl-dev libasound2-dev libdbus-1-dev
Prebuilt binaries can be found on the Releases Page.
Install using Homebrew:
brew install spotify_player
Install using Scoop:
scoop install spotify-player
Install from crates.io:
cargo install spotify_player
Install as an AUR package:
yay -S spotify-player
Or install with full feature support:
yay -S spotify-player-full-pipe
Install using xbps:
xbps-install -S spotify-player
Install from FreeBSD ports:
pkg install spotify-player
Note: Streaming feature is disabled when using the Docker image. Download the latest build:
docker pull aome510/spotify_player:latest
docker run --rm -it aome510/spotify_player:latest
Use local config and cache folders:
docker run --rm -v $APP_CONFIG_FOLDER:/app/config/ -v $APP_CACHE_FOLDER:/app/cache/ -it aome510/spotify_player:latest
Enable full Spotify Connect support by registering a Spotify application and specifying the client_id in the general configuration file. Refer to the official Spotify documentation for more details.
spotify_player supports streaming using the librespot library. The default audio backend is rodio, but other backends like alsa, pulseaudio, portaudio, jackaudio, sdl, and gstreamer are supported. To install with a specific backend:
cargo install spotify_player --no-default-features --features pulseaudio-backend
Enable lyric support by installing with the lyric-finder feature:
cargo install spotify_player --features lyric-finder
View lyrics of the currently playing track by using the LyricPage command.
Enable media control support by setting enable_media_control to true in the configuration file. Media control uses MPRIS DBus on Linux and OS window event listener on Windows and macOS.
Enable image rendering support by installing with the image feature:
cargo install spotify_player --features image
Supports full resolution images in Kitty or iTerm2 terminals. Sixel rendering is also supported:
cargo install spotify_player --features sixel
Enable desktop notification support by installing with the notify feature:
cargo install spotify_player --features notify
Note: Notification support is limited on macOS and Windows compared to Linux.
Supports seeking to a position of the current playback by left-clicking on the progress bar.
Enable daemon support by installing with the daemon feature:
cargo install spotify_player --features daemon
Run the application as a daemon:
spotify_player -d
Note: Daemon feature is not supported on Windows and requires the streaming feature and an audio backend.
spotify_player offers several CLI commands for interacting with Spotify, such as get, playback, connect, like, authenticate, and playlist. For more details:
spotify_player -h
or
spotify_player {command} -h
Access the shortcut help page by pressing ?
or C-h
. Some useful commands include:
NextTrack
: n
PreviousTrack
: p
ResumePause
: space
VolumeUp
: +
VolumeDown
: -
Mute
: _
Search
: /
ShowActionsOnSelectedItem
: g a, C-space
AddSelectedItemToQueue
: Z, C-z
SwitchTheme
: T
SwitchDevice
: D
Refer to the configuration documentation for details on adding new shortcuts or modifying the default ones.
By default, spotify_player looks for configuration files in $HOME/.config/spotify-player
. This can be changed using the -c
or --config-folder
option.
spotify_player stores cache files in $HOME/.cache/spotify-player
. This can be changed using the -C
or --cache-folder
option.
Logs are stored in $APP_CACHE_FOLDER/spotify-player-*.log
. Use the RUST_LOG
environment variable to define the logging level, defaulting to spotify_player=INFO
.