# spogo CLI spec (v0.1.1) One-liner: Spotify power CLI using web cookies; search + playback control. Parser: Kong. Cookies: steipete/sweetcookie (local sweetcookie). Output: human by default; `--plain` or `--json`. Color: on by default; respects `NO_COLOR`, `TERM=dumb`, `--no-color`. Platforms: macOS, Linux, Windows. ## Usage ``` spogo [global flags] [args] ``` ## Global flags - `-h, --help` - `--version` - `-q, --quiet` - `-v, --verbose` - `-d, --debug` - `--json` - `--plain` - `--no-color` - `--config ` default: `os.UserConfigDir()/spogo/config.toml` - `--profile ` default: `default` - `--timeout ` default: `10s` - `--market ` default: account market or `US` - `--language ` default: `en` - `--device ` default: active device - `--engine ` default: `connect` (`applescript` is macOS-only) - `--no-input` ## Commands ### auth - `spogo auth status` - `spogo auth import` - flags: `--browser ` default: `chrome` - `--browser-profile ` - `--cookie-path ` - `--domain ` default `spotify.com` - `spogo auth clear` ### search - `spogo search track [--limit N] [--offset N]` - `spogo search album [--limit N] [--offset N]` - `spogo search artist [--limit N] [--offset N]` - `spogo search playlist [--limit N] [--offset N]` - `spogo search episode [--limit N] [--offset N]` - `spogo search show [--limit N] [--offset N]` ### info - `spogo track info ` - `spogo album info ` - `spogo artist info ` - `spogo playlist info ` - `spogo show info ` - `spogo episode info ` ### playback - `spogo play []` (track/album/playlist/show) - optional: `--type ` for raw IDs - artist URIs play top tracks (starts with the first) - `spogo pause` - `spogo next` - `spogo prev` - `spogo seek ` - `spogo volume <0-100>` - `spogo shuffle ` - `spogo repeat ` - `spogo status` ### queue - `spogo queue add ` - `spogo queue show` - `spogo queue clear` (not supported by Spotify API yet) ### library - `spogo library tracks list [--limit N]` - `spogo library tracks add ` - `spogo library tracks remove ` - `spogo library albums list [--limit N]` - `spogo library albums add ` - `spogo library albums remove ` - `spogo library artists list [--limit N] [--after ]` - `spogo library artists follow ` - `spogo library artists unfollow ` - `spogo library playlists list [--limit N]` ### playlists - `spogo playlist create [--public] [--collab]` - `spogo playlist add ` - `spogo playlist remove ` - `spogo playlist tracks [--limit N]` ### devices - `spogo device list` - `spogo device set ` ## Output contract - stdout: primary results; human or machine modes. - stderr: warnings/errors/logs. - `--plain`: stable, line-oriented, tab-separated fields. - `--json`: stable, documented keys per command. ## Engines - `auto`: connect first; fall back to web for unsupported features or rate limits. - `connect`: internal connect-state endpoints for playback; GraphQL for search/info. - `web`: Web API endpoints; search/info/playback auto-fallback to connect when rate limited. ## Exit codes - `0` success - `1` generic failure - `2` invalid usage/validation - `3` auth/cookies missing or invalid - `4` network/timeouts ## Config / env - Env prefix: `SPOGO_` - Precedence: flags > env > config - Secrets: never via flags; use browser cookies only. - Overrides: - `SPOGO_TOTP_SECRET_URL` (http(s) or `file://...`) - `SPOGO_CONNECT_VERSION` (connect playback client version) ## Examples - `spogo auth import --browser chrome` - `spogo search track "weezer" --limit 5 --plain` - `spogo play spotify:track:7hQJA50XrCWABAu5v6QZ4i` - `spogo device list --json` - `spogo playlist create "Road Trip" --public`