Skip to content
Open Source CLI

Control Spotify
from your AI Agent

Secure, agent (and human) friendly CLI for playback, search, playlists, and library management. JSON output. PKCE auth.

$ 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" }] }

Agent-Friendly

Every command outputs structured JSON — perfect for LLM agents, scripts, and automation pipelines. No parsing needed.

Enriched Output

Spotify's API returns opaque IDs. We resolve them to names, artists, and albums — readable by both humans and AI agents.

Structured Errors

Structured JSON to stdout, errors to stderr. Machine-readable exit codes for every failure type.

Secure PKCE Auth

No client secret needed. Browser-based OAuth with PKCE, automatic token refresh, and secure local storage.

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