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 <name|id>activeTarget a specific Connect device.
--engine <name>connectauto / connect / web / applescript.
--auth <name>cookiesWeb API auth: cookies / oauth.
--spotify-client-id <id>profilePublic Spotify application client ID.
--spotify-redirect-uri <uri>profileRegistered loopback OAuth redirect URI.
--jsonoffJSON output.
--plainoffPlain (TSV) output.
--no-colorautoDisable color in human output.
-q, --quietoffSuppress human result output; JSON/plain and errors remain.
-v, --verboseoffAccepted; currently no additional tracing.
-d, --debugoffAccepted; currently no additional tracing.
--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.

#completion

Print shell completion scripts. This command does not read Spotify auth or profile configuration.

CommandPurpose
spogo completion bashPrint Bash shell initialization.
spogo completion zshPrint Zsh shell initialization.
spogo completion fishPrint fish shell completions.

Load completions for the current session:

# Bash
source <(spogo completion bash)

# Zsh
source <(spogo completion zsh)

# fish
spogo completion fish | source

To enable them permanently, add the appropriate command to ~/.bashrc, ~/.zshrc, or ~/.config/fish/config.fish.

#auth

Cookie and official Spotify OAuth 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.
spogo auth oauth login [--client-id <id>] [--redirect-uri <uri>] [--no-open] [--wait-timeout <dur>]Run Authorization Code with PKCE and cache refresh credentials.
spogo auth oauth statusShow non-secret local OAuth cache metadata.
spogo auth oauth clearDelete the OAuth token cache and restore cookie auth selection.

Use -- before positional text that begins with a dash, for example spogo search track -- --no-input. Global flags remain valid before or after the command.

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.

Web API search and Connect's Web API fallback read Spotify's plural result containers (tracks, albums, artists, playlists, shows, episodes); CLI search types stay singular.

#info

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

CommandReturns
spogo track info <id|url>One track.
spogo album info <id|url>Album metadata.
spogo artist info <id|url>Artist metadata.
spogo playlist info <id|url>One playlist's metadata.
spogo show info <id|url>Show metadata.
spogo episode info <id|url>One episode.

#playback

Drive what's playing. See Playback.

CommandPurpose
spogo play [<id|url>] [--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 <ms|mm:ss>Seek within the current item.
spogo volume <0-100>Set device volume.
spogo shuffle <on|off>Toggle shuffle.
spogo repeat <off|track|context>Set repeat mode.
spogo statusPrint currently playing item, album, and device.

#queue

Up-next list. See Queue.

CommandPurpose
spogo queue add <id|url>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 <id|url...>Save tracks.
spogo library tracks remove <id|url...>Unsave tracks.
spogo library albums list [--limit N]List saved albums.
spogo library albums add <id|url...>Save albums.
spogo library albums remove <id|url...>Unsave albums.
spogo library artists list [--limit N] [--after <artist-id>]List followed artists.
spogo library artists follow <id|url...>Follow artists.
spogo library artists unfollow <id|url...>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_term|medium_term|short_term] [--limit N] [--offset N]Show Spotify top tracks by affinity ranking.
spogo user history [--period long_term|medium_term|short_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 follow <id|uri|url>Save a playlist to your library without changing visibility.
spogo playlist unfollow <id|uri|url>Remove a playlist from your library.
spogo playlist following <id|uri|url>Check membership (--plain: true/false; --json: following boolean).
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, or URL. Names are not resolved; capture the ID returned by playlist create --json.

#device

Connect devices. See Devices.

CommandPurpose
spogo device listList Connect-visible devices.
spogo device set <name|id>Transfer playback to a device.

#Exit codes

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

See Output for the full output contract.