Sonos CLI for Openclaw

A robust Go-based CLI for discovering, controlling, and grouping Sonos speakers directly from your terminal or AI environment.

steipete
v1.0.0
Jan 5, 2026
56
88.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install sonoscli

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install sonoscli using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Sonos CLI?

Sonos CLI provides a comprehensive interface for interacting with Sonos audio hardware via the command line. This skill for Openclaw Skills enables users to perform complex actions like speaker discovery, volume adjustments, and playback control with simple commands. It is particularly useful for developers looking to integrate smart home audio into their existing automation scripts or local network management tools.

By utilizing the sonos binary, users can bridge the gap between their developer environment and their physical audio setup. Whether you need to quickly mute a speaker or set up a synchronized party group across multiple rooms, this tool offers the precision and speed of a CLI application.

Sonos CLI Use Cases

  • Automating music playback based on specific triggers or schedules.
  • Programmatic control of volume and playback during development or focus sessions.
  • Managing multi-room speaker groups for synchronized home audio.
  • Querying speaker status to integrate into system monitoring tools or dashboards.

How Sonos CLI Works

  1. The tool initiates a discovery process using SSDP to find all active Sonos speakers on the local subnet.
  2. Users target specific speakers by name or IP address to issue playback or volume commands.
  3. The CLI communicates with the Sonos UPnP API to execute requested actions such as play, pause, or skip.
  4. For music searches, the tool utilizes SMAPI (Sonos Music API) to browse services like Spotify directly through the command line.

Sonos CLI Setup

To use this within your Openclaw Skills workflow, you must have Go installed. Run the following command to install the binary:

go install github.com/steipete/sonoscli/cmd/sonos@latest

After installation, verify connectivity by running:

sonos discover

If speakers are not found automatically, you can target them directly using the --ip flag.

Sonos CLI Data Schema & Taxonomy

Command Component Description
discover Scans the local network for Sonos devices
--name Target speaker identifier string (e.g., "Kitchen")
--ip Direct IP address for manual connection
favorites List or open saved Sonos favorite stations
smapi search Executes music searches via specific service providers
queue Management commands for listing, playing, or clearing the active queue

Sonos CLI Advanced Features

  • Group management including join, unjoin, solo, and party mode for multi-speaker synchronization.
  • Integration with Spotify Web API using optional SPOTIFY_CLIENT_ID and SECRET for enhanced search capabilities.
  • Full queue manipulation including clearing and specific track playback.
  • Manual IP override capabilities for complex network environments where SSDP discovery might fail.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*