# myx
A lean, beautiful terminal Spotify player โ built in Rust with [ratatui](https://ratatui.rs)
and [librespot](https://github.com/librespot-org/librespot). Streams natively as a
Spotify Connect device, with **album-art-reactive theming**, a live **FFT visualizer**,
**synced lyrics**, and full library browsing โ all in the terminal.
> Requires **Spotify Premium** (Spotify Connect streaming is Premium-only).
## Features
- ๐จ **Album-art-reactive theming** โ the whole UI recolors to the current cover, cross-fading on every track change
- ๐ **Live FFT visualizer** โ a smooth, color-graded spectrum driven by the actual audio
- ๐ค **Time-synced lyrics** โ karaoke scroll via [lrclib](https://lrclib.net)
- ๐ **Full library** โ Home feed, Recently Played, Playlists, Liked Songs, Albums, Artists
- ๐ **Search** the whole catalog โ songs, artists, albums, playlists
- ๐ป **Song radio** โ start a station from any track (via librespot's internal protocol)
- ๐ฏ **Drill-in navigation** โ open an artist โ popular tracks + albums; open albums/playlists
- โก **Context actions** (`a`) โ like, add to queue/playlist, follow, go to artist/album, copy link
- ๐ Shuffle, repeat, volume, and a live queue view
- ๐พ **Session resume** โ reopens on your last track, at your position, in the same context
## Install
```bash
cargo install --path . # or: cargo build --release
```
You'll need your own Spotify app client ID โ free, and takes a minute:
1. Go to the [Spotify developer dashboard](https://developer.spotify.com/dashboard) โ **Create app**
2. Add the redirect URI `http://127.0.0.1:8989/login`
3. Copy the **Client ID**, then either:
```bash
export MYX_CLIENT_ID=<your-client-id>
mkdir -p ~/.config/myx && echo -n "<your-client-id>" > ~/.config/myx/client_id
```
No secret is needed (myx uses OAuth PKCE). Requires **Spotify Premium**.
## Keybinds
```
โฅ / [ ] switch library section โ โ switch view (Now Playing / Lyrics / Queue)
โโ / j k move selection โ play / open
/ search a actions menu
space / p play ยท pause n / b next ยท prev
+ / - volume s shuffle
Esc back q quit
```
## Credits
Built on the shoulders of open source โ see [NOTICE](NOTICE). In short: the streaming
engine adapts pieces of [spotify-player](https://github.com/aome510/spotify-player)
(MIT, ยฉ Thang Pham), the visual language reinterprets
[noodle](https://github.com/wilfredinni/noodle), and it all rides on
[librespot](https://github.com/librespot-org/librespot).
## License
MIT โ see [LICENSE](LICENSE).