Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

spotify-tui

> 开发工具
Open source

Spotify for the terminal written in Rust 🚀

19.3K stars0 likes4 views
WebsiteGitHub

About

Spotify for the terminal written in Rust 🚀

Spotify TUI

A Spotify client for the terminal written in Rust.

The terminal in the demo above is using the Rigel theme.

  • Spotify TUI
    • Installation
      • Homebrew
      • Snap
      • AUR
      • Nix
      • Void Linux
      • Fedora/CentOS
      • Cargo
        • Note on Linux
      • Windows
        • Scoop installer
      • Manual
    • Connecting to Spotify’s API
    • Usage
  • Configuration
    • Limitations
    • Using with spotifyd
    • Libraries used
    • Development
      • Windows Subsystem for Linux
    • Contributors
    • Roadmap
      • High-level requirements yet to be implemented

Installation

The binary executable is spt.

Homebrew

For both macOS and Linux

bash
brew install spotify-tui

To update, run

bash
brew upgrade spotify-tui

Snap

For a system with Snap installed, run

bash
snap install spt

The stable version will be installed for you automatically.

If you want to install the nightly build, run

bash
snap install spt --edge

AUR

For those on Arch Linux you can find the package on AUR here. If however you're using an AUR helper you can install directly from that, for example (in the case of yay), run

bash
yay -S spotify-tui

Nix

Available as the package spotify-tui. To install run:

bash
nix-env -iA nixpkgs.spotify-tui

Where nixpkgs is the channel name in your configuration. For a more up-to-date installation, use the unstable channel. It is also possible to add the package to environment.systemPackages (for NixOS), or home.packages when using home-manager.

Void Linux

Available on the official repositories. To install, run

bash
sudo xbps-install -Su spotify-tui

Fedora/CentOS

Available on the Copr repositories. To install, run

bash
sudo dnf copr enable atim/spotify-tui -y && sudo dnf install spotify-tui

Cargo

Use this option if your architecture is not supported by the pre-built binaries found on the releases page.

First, install Rust (using the recommended rustup installation method) and then

bash
cargo install spotify-tui

This method will build the binary from source.

To update, run the same command again.

Note on Linux

For compilation on Linux the development packages for libssl are required. For basic installation instructions, see install OpenSSL. In order to locate dependencies, the compilation also requires pkg-config to be installed.

If you are using the Windows Subsystem for Linux, you'll need to install additional dependencies.

Windows 10

Scoop installer

First, make sure scoop installer is on your windows box, for instruction please visit scoop.sh

Then open powershell and run following two commands:

bash
scoop bucket add scoop-bucket https://github.com/Rigellute/scoop-bucket
scoop install spotify-tui

After that program is available as: spt or spt.exe

Manual

  1. Download the latest binary for your OS.
  2. cd to the file you just downloaded and unzip
  3. cd to spotify-tui and run with ./spt

Connecting to Spotify’s API

spotify-tui needs to connect to Spotify’s API in order to find music by name, play tracks etc.

Instructions on how to set this up will be shown when you first run the app.

But here they are again:

  1. Go to the Spotify dashboard
  2. Click Create an app
    • You now can see your Client ID and Client Secret
  3. Now click Edit Settings
  4. Add http://localhost:8888/callback to the Redirect URIs
  5. Scroll down and click Save
  6. You are now ready to authenticate with Spotify!
  7. Go back to the terminal
  8. Run spt
  9. Enter your Client ID
  10. Enter your Client Secret
  11. Press enter to confirm the default port (8888) or enter a custom port
  12. You will be redirected to an official Spotify webpage to ask you for permissions.
  13. 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.

And now you are ready to use the spotify-tui 🎉

You can edit the config at anytime at ${HOME}/.config/spotify-tui/client.yml. (for snap ${HOME}/snap/spt/current/.config/spotify-tui/client.yml)

Usage

The binary is named spt.

Running spt with no arguments will bring up the UI. Press ? to bring up a help menu that shows currently implemented key events and their actions. There is also a CLI that is able to do most of the stuff the UI does. Use spt --help to learn more.

Here are some example to get you excited.

…

Configuration

A configuration file is located at ${HOME}/.config/spotify-tui/config.yml, for snap ${HOME}/snap/spt/current/.config/spotify-tui/config.yml (not to be confused with client.yml which handles spotify authentication)

The following is a sample config.yml file:

…

Limitations

This app uses the Web API from Spotify, which doesn't handle streaming itself. So you'll need either an official Spotify client open or a lighter weight alternative such as spotifyd.

If you want to play tracks, Spotify requires that you have a Premium account.

Using with spotifyd

Follow the spotifyd documentation to get set up.

After that there is not much to it.

  1. Start running the spotifyd daemon.
  2. Start up spt
  3. Press d to go to the device selection menu and the spotifyd "device" should be there - if not check these docs

Libraries used

  • tui-rs
  • rspotify

Development

  1. Install OpenSSL
  2. Install Rust
  3. Install xorg-dev (required for clipboard support)
  4. Clone or fork this repo and cd to it
  5. And then cargo run

Windows Subsystem for Linux

You might get a linking error. If so, you'll probably need to install additional dependencies required by the clipboard package

bash
sudo apt-get install -y -qq pkg-config libssl-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev

Contributors

Thanks goes to these wonderful people (emoji key):


Alexander Keliris

💻 📖 🎨 📝 🤔 🚇 🚧 📦 👀

Mickael Marques

💵

Grzegorz Koperwas

📖

Austin Gassert

💻

Calen Robinette

💻

M*C*O

🚇

Andrew Chin

💻

Sam Naser

💻

Micha

💻

neriglissar

💻

Timon

💻

echoSayonara

💻

D-Nice

📖 🚇

Grzegorz Pawlik

💻

Lennart Bernhardt

💻

Arnaud Lefebvre

💻

tem1029

💻

Peter K. Moss

Issues· 306 open

View all issuesOpen on GitHub
  • #1000

    Project Update

    Updated Apr 20, 2026
  • #1165

    Continuation of spotify-tui under active fork: spotatui

    Updated Jan 12, 2026
  • #1162

    installation failed

    Updated Nov 18, 2025
  • #1150

    Spotify auth failed

    Updated Nov 2, 2025
  • #1160

    cannot find derive macro `RustcEncodable` in this scope

    Updated Jul 10, 2025
  • #1161

    packages no longer in homebrew

    Updated Jul 6, 2025
  • #1157

    INVALID_CLIENT: Invalid redirect URI

    Updated May 29, 2025
  • #1111

    spt keeps returning to error when I connect to Sonos

    Updated May 24, 2025
  • #1155

    Unable to setup INVALID_CLIENT

    Updated May 21, 2025
  • #1154

    can't connect to spotify API after spotify API update

    Updated May 4, 2025

> Tags

Rustclirustspotifyspotify-api

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 1, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具