| name | spotify |
| description | Control Spotify playback on macOS via CLI. Play, pause, skip, adjust volume, and search for artists, albums, or playlists. Use this skill when the user wants to play music, control Spotify, search for songs, or says 'play [artist/song]', 'skip this track', 'turn up the volume.' Also trigger for 'spotify', 'music playback', 'what song is this', or any macOS music control request.
|
| author | G-HunterAi |
| license | MIT |
| version | 1.0.0 |
| tags | ["music","spotify","playback","macos"] |
| platforms | ["macos"] |
| category | integration |
| emoji | 🎧 |
| metadata | {"clawdbot":{"emoji":"🎧","requires":{"bins":["spotify"],"os":"darwin"},"install":[{"id":"brew","kind":"brew","packages":["shpotify"],"bins":["spotify"],"label":"Install spotify CLI (brew)"}]}} |
Spotify CLI
Control Spotify on macOS. No API key required.
When to Use
- Playing, pausing, or skipping tracks
- Adjusting Spotify volume
- Getting current playback status
- Playing artists, albums, or playlists by Spotify URI
- Shuffle and repeat controls
When NOT to Use
- Accessing Spotify on non-macOS platforms
- Searching for music (use Spotify app directly or API)
- Managing account settings
- When Spotify desktop app is not running
Commands
spotify play
spotify pause
spotify next
spotify prev
spotify stop
spotify vol up
spotify vol down
spotify vol 50
spotify status
Play by Name
- Search web for Spotify URL:
"Daft Punk" site:open.spotify.com
- Get ID from URL:
open.spotify.com/artist/4tZwfgrHOc3mvqYlEYSvVi → ID is 4tZwfgrHOc3mvqYlEYSvVi
- Play with AppleScript:
osascript -e 'tell application "Spotify" to play track "spotify:artist:4tZwfgrHOc3mvqYlEYSvVi"'
osascript -e 'tell application "Spotify" to play track "spotify:album:4m2880jivSbbyEGAKfITCa"'
osascript -e 'tell application "Spotify" to play track "spotify:track:2KHRENHQzTIQ001nlP9Gdc"'
Error Handling
| Error | Cause | Solution |
|---|
Command not found: spotify | shpotify CLI not installed | Run brew install shpotify |
Spotify is not running | App is closed or minimized | Launch Spotify desktop app |
Invalid track URI | Malformed Spotify URI | Verify URI format: spotify:type:id |
403 Forbidden | Free tier account attempting restricted action | Use Spotify Premium or adjust command |
Works Well With
- apple-music — Switch between music services
- music-generation — Generate and queue audio for playback
Notes
- macOS only - uses AppleScript
- Spotify desktop app must be running
- Works with Sonos via Spotify Connect
- No authentication needed (uses local AppleScript)