Skip to content
Open-source Spotify CLI

Control Spotify
from the command line

Play music, search Spotify, and manage your library. Use it yourself or call it from an agent.

$ spotify queue add "bohemian rhapsody"
{ "status": "added_to_queue",
  "items": [{ "name": "Bohemian Rhapsody",
    "artist": "Queen", "album": "A Night at the Opera" }] }
$ spotify track save 4uLU6hMCjMI75M1A2tKUQC
{ "status": "saved",
  "items": [{ "name": "Never Gonna Give You Up", "artist": "Rick Astley" }] }

JSON Output

Every command returns JSON for agents, scripts, and automation. No parsing needed.

Names, Not IDs

Turns Spotify IDs into track, artist, and album names that people and agents can read.

Predictable Errors

Results go to stdout and errors to stderr, with an exit code for each error type.

PKCE Sign-in

Sign in through your browser without a client secret. Tokens refresh automatically and stay local.

MIT Licensed. Not affiliated with or endorsed by Spotify AB.