Reference

Command Reference

Command Reference

Hand-written index of every spogo subcommand. The fully normative spec lives in spec.md; this page is the readable browse.

For deeper guides, see Auth, Playback, Library, Queue, Devices, Engines, and Output.

#Global flags

Apply to every command.

FlagDefaultPurpose
-h, --helpShow contextual help.
--versionPrint the spogo version.
--config <path>platform defaultPath to a config file.
--profile <name>defaultNamed profile (separate cookies + config).
--timeout <dur>10sHTTP timeout for any single request.
--market <cc>account market or USTwo-letter market code.
--language <tag>enLanguage/locale.
`--device <nameid>`activeTarget a specific Connect device.
--engine <name>connectauto / connect / web / applescript.
--jsonoffJSON output.
--plainoffPlain (TSV) output.
--no-colorautoDisable color in human output.
-q, --quietoffSuppress non-essential stderr.
-v, --verboseoffVerbose stderr.
-d, --debugoffDebug stderr (HTTP traces).
--no-inputauto when not a TTYRefuse interactive prompts.

Env overrides: every global flag has a SPOGO_<NAME> env equivalent. Two extras:

EnvPurpose
SPOGO_TOTP_SECRET_URLOverride TOTP secret source (http(s) or file://).
SPOGO_CONNECT_VERSIONOverride Connect client version sent to playback endpoints.

#auth

Cookie management. See Auth.

CommandPurpose
spogo auth statusShow stored cookie state for the current profile.
spogo auth import [--browser <name>] [--browser-profile <name>] [--cookie-path <file>] [--domain <host>]Pull cookies from a browser store.
spogo auth paste [--cookie-path <file>] [--domain <suffix>] [--path <path>]Read cookies from stdin (interactive prompts unless --no-input).
spogo auth clearDelete stored cookies for the current profile.

Browse the catalog. Each subcommand takes a query plus --limit N and --offset N.

CommandReturns
spogo search track <query>Tracks.
spogo search album <query>Albums.
spogo search artist <query>Artists.
spogo search playlist <query>Playlists.
spogo search show <query>Podcast shows.
spogo search episode <query>Podcast episodes.

#info

Fetch a single item by ID, URI, or URL.

CommandReturns
`spogo track info <idurl>`One track.
`spogo album info <idurl>`One album with track listing.
`spogo artist info <idurl>`One artist + top tracks.
`spogo playlist info <idurl>`One playlist's metadata.
`spogo show info <idurl>`One show with episodes.
`spogo episode info <idurl>`One episode.

#playback

Drive what's playing. See Playback.

CommandPurpose
`spogo play [<idurl>] [--type <kind>] [--shuffle]`Resume, or start a track / album / playlist / show / artist.
spogo pausePause current playback.
spogo nextSkip to the next item.
spogo prevPrevious (restart current if past ~3s).
`spogo seek <msmm:ss>`Seek within the current item.
spogo volume <0-100>Set device volume.
`spogo shuffle <onoff>`Toggle shuffle.
`spogo repeat <offtrackcontext>`Set repeat mode.
spogo statusPrint currently playing item + device.

#queue

Up-next list. See Queue.

CommandPurpose
`spogo queue add <idurl>`Append one item to the queue.
spogo queue showPrint currently playing + queued items.
spogo queue clearNot supported by Spotify's API; use spogo play <something> to replace the context.

#library

Saved tracks, albums, followed artists, owned/followed playlists. See Library.

CommandPurpose
spogo library tracks list [--limit N]List saved tracks.
`spogo library tracks add <idurl...>`Save tracks.
`spogo library tracks remove <idurl...>`Unsave tracks.
spogo library albums list [--limit N]List saved albums.
`spogo library albums add <idurl...>`Save albums.
`spogo library albums remove <idurl...>`Unsave albums.
spogo library artists list [--limit N] [--after <artist-id>]List followed artists.
`spogo library artists follow <idurl...>`Follow artists.
`spogo library artists unfollow <idurl...>`Unfollow artists.
spogo library playlists list [--limit N]List owned/followed playlists.

#user

Read-only listening data from Spotify's web endpoints.

CommandPurpose
`spogo user top-tracks [--period long_termmedium_termshort_term] [--limit N] [--offset N]`Show Spotify top tracks by affinity ranking.
`spogo user history [--period long_termmedium_termshort_term] [--limit N] [--after <ms>] [--before <ms>]`Show recently played tracks available from Spotify.
  • Top tracks are Spotify affinity rankings, not play counts.
  • long_term = years of listening data; medium_term = about 6 months; short_term = about 4 weeks.
  • Recently played is not a full archive. spogo paginates backward until it reaches --limit (max 200), the selected period, or Spotify's retained history. medium_term, short_term, and --after are local lower-bound filters.

#playlist

Mutate playlists. See Library.

CommandPurpose
spogo playlist create <name> [--public] [--collab]Create a new playlist.
spogo playlist add <playlist> <track...>Append tracks.
spogo playlist remove <playlist> <track...>Remove tracks.
spogo playlist tracks <playlist> [--limit N]List a playlist's items.

<playlist> accepts a playlist ID, URI, URL, or owned-playlist name.

#device

Connect devices. See Devices.

CommandPurpose
spogo device listList Connect-visible devices.
`spogo device set <nameid>`Transfer playback to a device.

#Exit codes

CodeMeaning
0Success
1Generic failure
2Invalid usage / validation
3Auth / cookies missing or invalid
4Network / timeouts

See Output for the full output contract.