Media & StreamingDocumentedScanned
spotify-applescript
Control Spotify desktop app via AppleScript.
Share:
Installation
npx clawhub@latest install spotify-applescriptView the full skill documentation and source below.
Documentation
Spotify AppleScript Control
Control the Spotify desktop app using AppleScript. Works reliably with the macOS Spotify app without API rate limits or OAuth.
Requirements
- Spotify desktop app installed and running on macOS
- No setup required - just works
Quick Start
# Play a playlist
spotify play "spotify:playlist:665eC1myDA8iSepZ0HOZdG"
spotify play ""
# Play an episode
spotify play "spotify:episode:5yJKH11UlF3sS3gcKKaUYx"
spotify play ""
# Play a track
spotify play "spotify:track:7hQJA50XrCWABAu5v6QZ4i"
# Playback control
spotify pause # Toggle play/pause
spotify next # Next track
spotify prev # Previous track
spotify status # Current track info
# Volume control
spotify volume 50 # Set volume (0-100)
spotify mute # Mute
spotify unmute # Unmute
Spotify CLI Wrapper
The spotify command is a wrapper script at {baseDir}/spotify.sh
Commands
| Command | Description | Example |
play | Play track/album/playlist/episode | spotify play spotify:track:xxx |
pause | Toggle play/pause | spotify pause |
next | Next track | spotify next |
prev | Previous track | spotify prev |
status | Show current track info | spotify status |
volume <0-100> | Set volume | spotify volume 75 |
mute | Mute | spotify mute |
unmute | Unmute | spotify unmute |
URI Formats
Accepts both Spotify URIs and open.spotify.com URLs:
spotify:track:7hQJA50XrCWABAu5v6QZ4i-spotify:playlist:665eC1myDA8iSepZ0HOZdG-spotify:episode:5yJKH11UlF3sS3gcKKaUYx-spotify:album:xxx-spotify:artist:xxxThe script auto-converts URLs to URIs. ## Direct AppleScript Commands For more control, use AppleScript directly: __CODE_BLOCK_1__ ## Available Properties __CODE_BLOCK_2__ ## Examples ### Agent Usage When the user says: - "Play my power hour playlist" → extract playlist URI and runspotify play- "Pause the music" → runspotify pause- "Next track" → runspotify next- "What's playing?" → runspotify status### Play a specific episode __CODE_BLOCK_3__ ### Get full track info __CODE_BLOCK_4__ ## Installation The skill is self-contained. To make thespotifycommand available system-wide: __CODE_BLOCK_5__ Or add the skill directory to PATH. ## Troubleshooting **"Spotify got an error"** - Make sure Spotify desktop app is running - Spotify must be launched at least once to accept AppleScript commands **Play command does nothing** - Verify the URI format is correct - Try playing from Spotify app first to ensure the content exists **No audio** - Check system volume and Spotify app volume - Ensure correct output device is selected in Spotify preferences ## Limitations - Requires Spotify desktop app to be running - macOS only (uses AppleScript) - Cannot search or browse library (use web interface or app for discovery) - Cannot manage playlists (add/remove tracks) For playlist management and search, use the web interface or consider thespotify-player` skill (requires OAuth setup).