spotify-cli

spotify-cli / Docs

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.

spotify queue                                   # managed items, then Spotify's upcoming
spotify queue add spotify:track:<id> spotify:episode:<id>
spotify queue add --search 'song name'          # first hit
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

How it plays

Only tracks and episodes can be queued (invalid_input otherwise; play whole albums 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