🎧 spogo - Spotify, but make it terminal.
May 10, 2026 · View on GitHub
Power CLI using web cookies. Search, control playback, manage library/playlists, and script with JSON/plain output.
Features
- Search tracks, albums, artists, playlists, shows, episodes
- Playback control: play/pause/next/prev/seek/volume/shuffle/repeat
- Play artists (starts with top tracks)
- Queue management
- Library management (save/remove/follow)
- Playlist management (create/add/remove/list)
- Device selection and status
- Browser cookie import via
sweetcookie --jsonand--plainfor scripting- Colorized human output (respects
NO_COLOR,TERM=dumb,--no-color) - Engine switch:
auto(connect → web),connect(internal endpoints),web(Web API endpoints; search/info/playback fall back to connect on rate limit)
Why Cookies?
Spotify's official API has strict rate limits that make it impractical for agents and automation. By using browser cookies to authenticate with Spotify's internal web API (the same one their web player uses), spogo bypasses these limitations:
- No rate limits - Use the same endpoints as open.spotify.com
- No app registration - No need to create a Spotify Developer app
- Full functionality - Access to everything the web player can do
- Agent-friendly - Perfect for AI assistants and automation scripts
Import your cookies once with sweetcookie and you're good to go (defaults to Chrome).
Install
Homebrew
brew install steipete/tap/spogo
Build from Source
go install github.com/steipete/spogo/cmd/spogo@latest
Quick start
spogo auth import --browser chrome
spogo auth import --browser chrome --browser-profile "Profile 1"
spogo search track "weezer" --limit 5
spogo play spotify:track:7hQJA50XrCWABAu5v6QZ4i
spogo status
Usage
spogo [global flags] <command> [args]
Global flags:
--config <path>config file path--profile <name>profile name--timeout <dur>request timeout (default 10s)--market <cc>market country code--language <tag>language/locale (defaulten)--device <name|id>target device--engine <auto|web|connect|applescript>API engine (defaultconnect,applescriptis macOS-only)--json/--plain--no-color-q, --quiet/-v, --verbose/-d, --debug
Env overrides:
SPOGO_TOTP_SECRET_URLoverride TOTP secret source (http(s) orfile://...)SPOGO_CONNECT_VERSIONoverride connect client version sent to playback endpoints
Commands:
auth status|import|paste|clearsearch track|album|artist|playlist|show|episodetrack info,album info,artist info,playlist info,show info,episode infoplay [<id|url>] [--type ...] [--shuffle],pause,next,prev,seek,volume,shuffle,repeat,statusqueue add|showlibrary tracks|albums|artists|playlistsplaylist create|add|remove|tracksdevice list|set
Full spec: docs/spec.md.
Cookies
spogo uses browser cookies (via sweetcookie) to fetch a web access token. Import cookies once:
spogo auth import --browser chrome
Defaults: Chrome + Default profile. Cookies are stored under your config directory (per profile).
If import still fails, spogo now surfaces browser-store warnings instead of only printing no cookies found.
Manual cookie paste (WSL fallback)
If WSL cookie import/decryption is broken, paste cookies from Chrome DevTools:
- Developer Tools -> Application tab -> Cookies ->
https://open.spotify.com - Copy
sp_dc(required),sp_key(optional),sp_t(recommended for connect playback) - Run:
spogo auth paste
Non-interactive:
printf '%s\n%s\n' "sp_dc=..." "sp_t=..." | spogo auth paste --no-input
Auto engine notes
autotries connect first, then falls back to web on unsupported features or rate limits.
Connect engine notes
connectuses Spotify's internal connect-state endpoints for playback control.- Auth/session data and the last active playback route are cached per profile so repeated playback commands avoid a full Connect state refresh when the route is still valid.
- Search/info prefer the internal GraphQL API and fall back to web search if hashes can’t be resolved.
Web engine notes
webuses Web API endpoints; search/info/playback auto-fallback to connect when rate limited.
Output
- Human output by default
--plainfor line-oriented output--jsonfor structured output
Legal
This tool interacts with Spotify's web endpoints. Use responsibly and in accordance with Spotify's Terms of Service.
License
MIT