Control Spotify from Your Terminal with the Spotify Player Skill
Ever wanted to skip tracks, search for songs, or control your music without leaving your terminal? The spotify-player skill brings full Spotify control to Clawdbot, letting your AI assistant become your personal DJ.
What Problem Does This Solve?
If you're a developer or power user who lives in the terminal, constantly switching to the Spotify app to change tracks kills your flow. With the spotify-player skill, you can:
- Search and play any song, album, or playlist by voice or text
- Control playback (play, pause, skip, previous)
- Switch between Spotify Connect devices
- Get current track info without context switching
It's perfect for focus sessions, coding playlists, or hands-free music control.
Installation
First, install the skill via ClawdHub:
clawdhub install spotify-playerThe skill supports two CLI tools. spogo is recommended:
brew tap steipete/tap
brew install spogoAlternatively, install spotify_player as a fallback:
brew install spotify_playerRequirements:
- A Spotify Premium account (required for playback control)
- macOS, Linux, or Windows with Homebrew
Configuration & Authentication
spogo Setup (Recommended)
spogo uses browser cookies for authentication鈥攏o API keys needed:
spogo auth import --browser chromeThis imports your existing Spotify session from Chrome. Safari and Firefox are also supported.
spotify_player Setup (Alternative)
For spotify_player, you'll need to configure a Spotify app:
- Go to the Spotify Developer Dashboard
- Create an app and note your Client ID
- Add the Client ID to
~/.config/spotify-player/app.toml:
client_id = "your_client_id_here"- Run
spotify_playeronce to complete OAuth authentication
Usage Examples
Basic Playback Control
# Play/pause
spogo play
spogo pause
# Skip tracks
spogo next
spogo prev
# Check what's playing
spogo statusSearch and Play Music
# Search for tracks
spogo search track "Bohemian Rhapsody"
# Search for artists
spogo search artist "Daft Punk"
# Search for playlists
spogo search playlist "Deep Focus"Device Management
If you have multiple Spotify Connect devices (phone, desktop, speakers):
# List available devices
spogo device list
# Switch to a specific device
spogo device set "Living Room Speaker"Natural Language via Clawdbot
Once configured, just tell your agent:
"Play some lo-fi beats"
"Skip this track"
"What song is playing?"
"Switch Spotify to my HomePod"
Clawdbot will use the skill to execute the right commands.
Tips & Best Practices
-
Import cookies regularly: If spogo stops working, re-run
spogo auth import --browser chrometo refresh your session. -
Check device state: If playback commands fail, run
spogo device listto ensure a device is active. You may need to start playback from the Spotify app first. -
Use spogo over spotify_player: spogo is simpler to set up (cookie-based auth) and has cleaner output.
-
For TUI lovers: spotify_player offers a full terminal UI with
?for keyboard shortcuts鈥攇reat for interactive sessions. -
Premium required: Free Spotify accounts can't control playback via CLI. You'll need Premium for full functionality.
Conclusion
The spotify-player skill turns Clawdbot into a voice-controlled music assistant. Skip tracks while coding, search for the perfect playlist hands-free, or switch devices without touching your phone. Combined with Clawdbot's other skills, you can build powerful automations鈥攍ike playing focus music when you start a work session.
Links:
Happy listening! 馃幍
Comments (0)
No comments yet. Be the first to comment!