Sonos speaker control CLI for discovery, playback, grouping, queue management, favorites, scenes, and Spotify handoff.
$brew install steipete/tap/sonoscli
Agent Compatibility
JSON Output
Agent Skill
MCP Support
AI Analysis
sonoscli is a local-network Sonos control CLI for discovering speakers, reading playback state, and changing what a room or group is doing. It covers day-to-day speaker control plus higher-level operations like queue management, favorites, scenes, and Sonos-side music-service search.
What It Enables
- Discover speakers, inspect playback and group state, and watch live transport or rendering events from the shell.
- Play, pause, skip, change volume or mute, switch to TV or line-in, and regroup rooms without opening the Sonos app.
- List and manipulate queues, open favorites, save and reapply room scenes, and search linked music services or Spotify for playable items.
Agent Fit
- Global
--format plain|json|tsvsupport plus JSON responses for many action commands make it workable in scripts and follow-up parsing. - Coordinator-aware targeting, discovery, and topology handling reduce Sonos-specific edge cases an agent would otherwise need to reimplement.
- It fits best for local automations on the same LAN; linked-service auth, firewall prompts for
watch, and speaker reachability limit unattended use.
Caveats
- Requires access to the same local network as the Sonos system, with speakers reachable on TCP port
1400. watchopens a local callback server, and some SMAPI searches need a one-time DeviceLink or AppLink flow through the Sonos-linked service.