# spotify_player

> Terminal Spotify client with streaming, Spotify Connect remote control, synced lyrics, audio visualization, daemon mode, and CLI commands. Requires Premium.

Stars: 7.3k · Language: Rust · License: MIT · Categories: Network

- Repository: https://github.com/aome510/spotify-player
- Page: https://www.trmn.sh/tools/spotify-player

## Install

- Homebrew: `brew install spotify_player`
- Cargo: `cargo install spotify_player --locked`
- Arch Linux: `pacman -S spotify-player`

## Overview

spotify_player is a terminal music player for Spotify, written in Rust. It aims for feature parity with the official Spotify application and uses a paging and popup system for navigation. It requires a Spotify Premium account and authenticates through the Spotify Web API using the OAuth 2.0 authorization code flow with PKCE, so no client secret is stored.

It can stream audio directly from the terminal through a librespot session, or act as a remote control for other devices via Spotify Connect. Other documented features include synced lyrics, audio visualization, image rendering, desktop notifications, cross-platform media control, mouse support, and fuzzy search. The application can also run as a daemon, and a set of CLI commands is available. The `spotify_player authenticate` command forces fresh logins for all required credentials, which is useful before a daemon or headless launch.

By default it uses ncspot's client ID for Web API access. The README recommends registering a custom client ID to avoid shared rate limits (429 responses). With a custom client configured, requests that get a 4xx response are retried once through ncspot. Configuration is file-based, with documented options such as `client_id`, `login_redirect_uri`, and `api_rate_limit_retries`. Linux builds need openssl, alsa-lib (streaming), and libdbus (media control). Prebuilt binaries, Docker images (streaming disabled), and packages for several platforms are available. It suits terminal users who want a Spotify client with scripting and headless options.

### Installation

```bash
# via Homebrew
brew install spotify_player
```

```bash
# via Cargo
cargo install spotify_player --locked
```

```bash
# via Arch Linux
pacman -S spotify-player
```

![spotify-player playing an album with the audio visualizer](https://media.trmn.sh/cached/34e914f95960a7bfa50681f256f5ee1a614a767b08d284a9c0b7aa5b478bbd50.gif)

## Alternatives

- [sshx](https://www.trmn.sh/tools/sshx.md): Shares a terminal session over the web with a single command, with real-time cursors, an infinite canvas of windows, and end-to-end encryption. (Rust, 7.7k stars)
- [dog](https://www.trmn.sh/tools/dog.md): Command-line DNS client with colorful output, JSON support, and DNS-over-TLS/HTTPS protocols (Rust, 6.7k stars)
- [miniserve](https://www.trmn.sh/tools/miniserve.md): Single-binary, cross-platform CLI HTTP file server with auth, uploads, TLS, WebDAV, QR codes, and on-the-fly tar.gz/zip directory downloads. (Rust, 8.0k stars)
- [trippy](https://www.trmn.sh/tools/trippy.md): Network analysis tool combining traceroute and ping functionality for diagnosing networking issues (Rust, 8.1k stars)
- [xh](https://www.trmn.sh/tools/xh.md): HTTP client that reimplements HTTPie's syntax with focus on improved performance and speed. (Rust, 8.2k stars)

---

Canonical: https://www.trmn.sh/tools/spotify-player
