Sign in as a Carbon or Silicon

The queue

Spotify's own queue can be appended to through the app, but neither the Web API nor AppleScript can remove or reorder it, and spotify_player's CLI cannot even append. So spotify-cli keeps a managed queue in the daemon and shows Spotify's upcoming list next to it, read-only.

Terminalsh
spotify queue                                   # managed items, then Spotify's upcoming
spotify queue show                              # the same (also queue list, queue ls)
spotify queue add spotify:track:<id> spotify:episode:<id>
spotify queue add --search 'song name'          # first hit (--type episode for podcasts)
spotify queue add <uri> --next                  # put at the front
spotify queue move 3 1                          # position 3 → 1
spotify queue remove 2                          # by position, id (q_…) or uri
spotify queue clear
spotify next                                    # plays the managed head now

spotify queue with no subcommand lists the queue, as do queue list and its aliases queue show and queue ls; queue remove is also queue rm, and queue move is queue mv. Skipping is not a queue subcommand: queue next exits 2 with a hint that lists the subcommands and adds "To skip to the next track: spotify next."

How it plays

next

Your own commands win

What spotify queue shows

Names, artists (the show, for episodes) and lengths are recorded when an item is queued: from the search hit queue add --search picked (sent to the daemon as known), from spotify_player for a track URI, and from the Web API for an episode URI (spotify_player cannot look up episodes; the daemon uses spotify_player's cached token, spending at most 8 s per queue add). What the caller knows is kept and the rest is looked up, field by field (an empty name or artist counts as missing): an episode lacking any of its name, show or length is looked up, so one picked with --search, whose hit names no show, gets its show.

An item without a name shows by kind and id. A track's facts are looked up once, when it is queued. For an episode that still lacks any of them, the daemon keeps asking:

Only tracks and episodes can be queued: anything else is invalid_input (spotify:album:… is an album; the queue holds tracks and episodes.), with a hint that fits the kind, such as playing the whole album with spotify play. The queue belongs to the Mac, not to one Silicon: every Silicon on this user account sees and edits the same queue, and each item records who added it (added_by).

Offline: spotify docs queue · Source: docs/queue.md