Spotify TUI is a Spotify client for the terminal, written in Rust.
In conjuction with Spotifyd, a lighteight Unix daemon, you’ll get a fully-featured terminal application that connects to your Spotify Premium account.
There are pre-build libraries for different operating systems. For Arch, you can either use the
yay -S spotifyd-full
Installation takes a while. The program first runs an installation of Rust and then builds the package.
Create a configuration file
[global] # Your Spotify account name. username = bob # Your Spotify account password. password = password123 # backend backend = pulseaudio
If you are uncomfortable with saving your password as plain text, you can use alternatives like a keyring or a command that fetches the password.
Create a systemd user script
[Unit] Description=A spotify playing daemon Documentation=https://github.com/Spotifyd/spotifyd Wants=sound.target After=sound.target Wants=network-online.target After=network-online.target [Service] ExecStart=/usr/bin/spotifyd --no-daemon Restart=always RestartSec=12 [Install] WantedBy=default.target
Then enable and start the script:
systemctl --user enable spotifyd --now
For Arch, use the AUR:
yay -S spotify-tui
Follow the guide from the official docs:
- Go to the Spotify dashboard
- Click Create a Client ID and create an app
- Now click Edit Settings
http://localhost:8889/callbackto the Redirect URIs
- You are now ready to authenticate with Spotify!
- Go back to the terminal
- Enter your Client ID
- Enter your Client Secret
- You will be redirected to an official Spotify webpage to ask you for permissions.
- After accepting the permissions, you’ll be redirected to localhost. If all goes well, the redirect URL will be parsed automatically and now you’re done. If the local webserver fails for some reason you’ll be redirected to a blank webpage that might say something like “Connection Refused” since no server is running. Regardless, copy the URL and paste into the prompt in the terminal.
After you’ve run
spt for the first time, you’ll find a configuration file under
Connect With Spotifyd⌗
Make sure that
spotifyd.service is running:
systemctl --user status spotifyd.service
spt and select a song. Hit
Spotify TUI will now complain that it doesn’t find a device. Press
d and the CLI should show the Spotifyd client. Select it with
Now it should work.