复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-sonoscli-6b3ce62bdc50 ,按照其中的说明把「sonoscli」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use sonos to control Sonos speakers on the local network.
sonos discoversonos status --name "Kitchen"sonos play|pause|stop --name "Kitchen"sonos volume set 15 --name "Kitchen"sonos group status|join|unjoin|party|solosonos favorites list|opensonos queue list|play|clearsonos smapi search --service "Spotify" --category tracks "query"--ip <speaker-ip>.SPOTIFY_CLIENT_ID/SECRET.sonos discover - no route to hostError: write udp4 0.0.0.0:64326->239.255.255.250:1900: sendto: no route to host (Command exited with code 1)
0.0.0.0: is ephemeral and will change and the netmask may not match exactly eithersendto: no route to host should stay consistentdirect (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 launchdTerminal if running the gateway directly in the terminalVisual Studio Code if running via terminal in VS Codesandbox (docker container) with network access allowed for that sandboxsonos discover - bind: operation not permittedError: listen udp4 0.0.0.0:0: bind: operation not permittedsonos discover within a Codex CLI session with sandbox enabled and not approving the escalation request)