sonoscli — Claude Code skill: control Sonos speakers
Wires the sonos binary into your agent so it can find speakers on the LAN, set volume, group rooms and start playback.
npx skills add openclaw/openclaw --skill sonoscli -a claude-codeWhat sonoscli does
The skill installs the sonos binary and documents the commands your agent should reach for. Discovery is sonos discover, status is sonos status --name "Kitchen", playback is sonos play|pause|stop, volume is sonos volume set 15 --name "Kitchen". Grouping runs through sonos group join|unjoin|party|solo; queue and favorites have their own subcommands.
Spotify search goes over SMAPI: sonos smapi search --service "Spotify" --category tracks "query". That part is optional and needs SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET. The binary itself comes from the Go module github.com/steipete/sonoscli/cmd/sonos@latest, so Go has to be present.
Two failures come up often. no route to host on macOS means Local Network permission is missing for the parent process — node under launchd, Terminal, or Visual Studio Code. bind: operation not permitted usually means the agent runs in a sandbox with no network access. Worth installing if you actually have Sonos hardware and run your agent on the same network; skip it otherwise.
What it helps with
- find every Sonos speaker on the local network
- drop the volume in one room
- join speakers into a group or split them apart
- queue up a track from Spotify by name
- inspect and clear the playback queue
Example prompts for the agent
- run sonos discover and list the speakers you find
- pause playback in the Kitchen
- open a favorite playlist in the living room
How to install sonoscli
1Skills CLI (Vercel)
npx skills add openclaw/openclaw --skill sonoscli -a claude-code2Manually: put the files in place
~/.claude/skills/sonoscli/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/sonoscli/
1Skills CLI (Vercel)
npx skills add openclaw/openclaw --skill sonoscli -a codex2Manually: put the files in place
.agents/skills/sonoscli/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add openclaw/openclaw --skill sonoscli -a cursor2Manually: put the files in place
.cursor/skills/sonoscli/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install openclaw/openclaw sonoscli2Manually: put the files in place
.github/skills/sonoscli/SKILL.md1Skills CLI (Vercel)
npx skills add openclaw/openclaw --skill sonoscli -a gemini-cli2Platform CLI
gemini skills install https://github.com/openclaw/openclaw --path skills/sonoscliManually: put the files in place
.devin/skills/sonoscli/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add openclaw/openclaw --skill sonoscli -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set45
The whole set →Similar
Questions about sonoscli
How do I install sonoscli in Claude Code?
Run npx skills add openclaw/openclaw --skill sonoscli -a claude-code. The skill lands at ~/.claude/skills/sonoscli/SKILL.md.
What does sonoscli do?
It controls Sonos speakers on your local network: discovery, status, play/pause/stop, volume, grouping, favorites and queue. Everything runs through the sonos binary.
Why does `sonos discover` fail with `no route to host`?
On macOS the parent process needs Local Network permission — node, Terminal, or Visual Studio Code. Running inside a sandbox with network access also works.
Source text
SKILL.md · MIT
---
name: sonoscli
description: "Control Sonos speakers (discover/status/play/volume/group)."
homepage: https://sonoscli.sh
metadata:
{
"openclaw":
{
"emoji": "🔊",
"requires": { "bins": ["sonos"] },
"install":
[
{
"id": "go",
"kind": "go",
"module": "github.com/steipete/sonoscli/cmd/sonos@latest",
"bins": ["sonos"],
"label": "Install sonoscli (go)",
},
],
},
}
---
# Sonos CLI
Use `sonos` to control Sonos speakers on the local network.
## Quick start
- `sonos discover`
- `sonos status --name "Kitchen"`
- `sonos play|pause|stop --name "Kitchen"`
- `sonos volume set 15 --name "Kitchen"`
## Common tasks
- Grouping: `sonos group status|join|unjoin|party|solo`
- Favorites: `sonos favorites list|open`
- Queue: `sonos queue list|play|clear`
- Spotify search (via SMAPI): `sonos smapi search --service "Spotify" --category tracks "query"`
## Notes
- If SSDP fails, specify `--ip <speaker-ip>`.
- Spotify Web API search is optional and requires `SPOTIFY_CLIENT_ID/SECRET`.
- If there is an error, check the troubleshooting section and offer advice if there is a decent match.
## Troubleshooting
### `sonos discover` - `no route to host`
- On error `Error: write udp4 0.0.0.0:64326->239.255.255.250:1900: sendto: no route to host (Command exited with code 1)`
- Note that the port number after `0.0.0.0:` is ephemeral and will change and the netmask may not match exactly either
- The `sendto: no route to host` should stay consistent
- Advise the user that in `direct` (no Docker sandbox) mode on Mac OS that Settings -> Privacy & Security -> Local Network will need to be enabled for the top-level host parent process of the Gateway
- `node` if running via `launchd`
- `Terminal` if running the gateway directly in the terminal
- `Visual Studio Code` if running via terminal in VS Code
- An alternative option is to use `sandbox` (docker container) with network access allowed for that sandbox
### `sonos discover` - `bind: operation not permitted`
- On error `Error: listen udp4 0.0.0.0:0: bind: operation not permitted`
- Advise the user that they may be running via a Codex or other sandbox that does not permit network access (this can be replicated by running `sonos discover` within a Codex CLI session with sandbox enabled and not approving the escalation request)
© openclaw · MIT · openclaw/openclaw