360 Secure SkillHub
360 安全技能中心

Sonos Music Search

这是一款命令行工具,核心功能包括通过Brave Search API查找Spotify曲目,指定Sonos音箱播放,以及查看当前播放曲目;具备音箱发现超时保护和默认中度安全搜索机制。典型场景为无需打开APP,直接通过命令快速播放指定音乐。需依赖Node.js、Brave搜索API密钥、同一局域网的Sonos音箱及关联的Spotify账号,输入为命令行参数,输出为音乐播放或当前曲目信息。

terrycarter1985
terrycarter1985
热度 31.51
最近更新 2026-05-11 17:47:44
分类:生活依赖:代码执行 / 第三方 API应用场景:自动化脚本 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sonos-music-search
Metadata
name
sonos-music-search-skill
description
Search for music via Brave Search and play it on your Sonos speakers.
homepage
https://clawhub.com/skills/sonos-music-search
metadata
{"aren":{"emoji":"🎵","requires":{"env":["BRAVE_API_KEY"],"bins":["node"],"network":true}}}

Sonos Music Search Skill

Search for music on Spotify via Brave Search and play it on your Sonos speakers — right from the command line.

Features

  • 🔍 Uses Brave Search API to find Spotify tracks
  • 🔊 Plays found tracks on your specified Sonos speaker
  • 🎶 View currently playing track
  • ⏱️ Discovery timeout protection (won't hang on missing speakers)
  • 🛡️ Safe search defaults to moderate

Prerequisites

  • Node.js >= 18
  • Brave Search API key — Get one here
  • Sonos speaker on the same local network
  • Spotify account linked to your Sonos system

Installation

npm install

Configuration

Set your Brave Search API key:

export BRAVE_API_KEY=your-api-key

Usage

Play a track

node src/index.js play "Living Room" "pink floyd comfortably numb"

View currently playing track

node src/index.js current "Living Room"

Scripts

Command Description
npm start Run the CLI
npm run format Format JS and Markdown files
npm run format:check Check formatting without writing

License

MIT