Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openclaw/openclaw --skill sonoscli -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/sonoscli/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/sonoscli/

From the same set45

The whole set →
summarize openclaw Runs a CLI tool to summarize or transcribe web articles, YouTube videos, podcasts, and local PDF documents directly within your AI assistant. Claude Code CX Codex Cursor +1 26,900installs weather openclaw This skill fetches current conditions and forecasts for a city, region, airport code, or coordinates. Use it to check rain and temperature or plan a trip. Claude Code CX Codex Cursor +1 9,300installs gog openclaw Guides an agent using the gog CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Use it when Google Workspace tasks need to run from a terminal. Claude Code CX Codex Cursor +1 8,500installs tmux openclaw Lets an agent work with live tmux sessions: read pane output, send keys and text, wait for a prompt line to show up. Claude Code CX Codex Cursor +1 8,400installs openai-whisper openclaw This skill lets your agent call the Whisper CLI to transcribe audio on your own machine. No API key needed. Claude Code CX Codex Cursor +1 7,100installs nano-pdf openclaw Edit PDF pages with plain text instructions through the nano-pdf CLI. Useful when you need to fix a typo or swap a heading without leaving your terminal. Claude Code CX Codex Cursor +1 7,100installs skill-creator openclaw A skill for writing, repairing and reviewing other skills. It splits behaviour into branches, sets the frontmatter and sorts resources into folders. Useful once your skill folder gets crowded. Claude Code CX Codex Cursor +1 6,700installs coding-agent openclaw This skill sends large coding tasks to Codex, Claude Code, or OpenCode as background workers. Use it for refactors, PR reviews, and issue-to-PR work. Claude Code CX Codex Cursor +1 6,500installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor