Skip to content

Command Reference

Running sonos with no subcommand launches the interactive TUI when stdout is a terminal. With a subcommand it runs that command and exits.

CommandDescription
sonos playStart playback
sonos pausePause playback
sonos stopStop playback
sonos nextSkip to next track
sonos prevSkip to previous track
sonos seek <H:MM:SS>Seek to position in current track
sonos mode <mode>Set play mode

normal, repeat, repeat-one, shuffle, shuffle-no-repeat

Terminal window
sonos mode shuffle --group "Living Room"
CommandDescription
sonos volume <0-100>Set volume level
sonos muteMute playback
sonos unmuteUnmute playback
sonos bass <-10..10>Set bass level (speaker only)
sonos treble <-10..10>Set treble level (speaker only)
sonos loudness <on|off>Set loudness compensation (speaker only)
Terminal window
sonos volume 50 --group "Kitchen"
sonos bass 3 --speaker "Beam"
CommandDescription
sonos speakersList all speakers with state and volume
sonos groupsList all groups with playback state
sonos statusShow current track, state, and volume
CommandDescription
sonos joinAdd a speaker to a group
sonos leaveRemove a speaker from its group
CommandDescription
sonos queueShow the playback queue
sonos queue add <uri>Add a URI to the queue
sonos queue clearClear the queue
CommandDescription
sonos sleep <duration>Set sleep timer (e.g., 30m, 1h, 90m) or cancel
Terminal window
sonos sleep 45m --group "Bedroom"
sonos sleep cancel
CommandDescription
sonos config aliasList all aliases
sonos config alias <name> <alias>Assign a short alias to a speaker or group
sonos config alias <name>Clear that name’s alias
Terminal window
sonos config alias "Living Room" lr
sonos volume 40 --speaker lr
FlagDescription
--help, -hShow help
--version, -VPrint version
--quiet, -qSuppress all non-error stdout output
--verbose, -vIncrease log verbosity; repeatable (-v info, -vv debug, -vvv trace)
--no-inputDisable interactive prompts
--speaker <name>, -sTarget a specific speaker by friendly name or alias
--group <name>, -gTarget a group by name or alias