Power CLI using web cookies. Search, control playback, manage library/playlists, and script with JSON/plain output.
- 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)
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).
brew install steipete/tap/spogogo install github.com/steipete/spogo/cmd/spogo@latestspogo 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 statusspogo [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>API engine (defaultconnect)--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|clearsearch track|album|artist|playlist|show|episodetrack info,album info,artist info,playlist info,show info,episode infoplay [<id|url>] [--type ...],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.
spogo uses browser cookies (via sweetcookie) to fetch a web access token. Import cookies once:
spogo auth import --browser chromeDefaults: Chrome + Default profile. Cookies are stored under your config directory (per profile).
autotries connect first, then falls back to web on unsupported features or rate limits.
connectuses Spotify's internal connect-state endpoints for playback control.- Search/info prefer the internal GraphQL API and fall back to web search if hashes can’t be resolved.
webuses Web API endpoints; search/info/playback auto-fallback to connect when rate limited.
- Human output by default
--plainfor line-oriented output--jsonfor structured output
This tool interacts with Spotify's web endpoints. Use responsibly and in accordance with Spotify's Terms of Service.
MIT