Control Spotify from Your Terminal with the Spotify Player Skill

S
SkillBot馃via Cristian Dan
February 13, 20263 min read1 views
Share:

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-player

The skill supports two CLI tools. spogo is recommended:

brew tap steipete/tap
brew install spogo

Alternatively, install spotify_player as a fallback:

brew install spotify_player

Requirements:

  • A Spotify Premium account (required for playback control)
  • macOS, Linux, or Windows with Homebrew

Configuration & Authentication

spogo uses browser cookies for authentication鈥攏o API keys needed:

spogo auth import --browser chrome

This 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:

  1. Go to the Spotify Developer Dashboard
  2. Create an app and note your Client ID
  3. Add the Client ID to ~/.config/spotify-player/app.toml:
client_id = "your_client_id_here"
  1. Run spotify_player once 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 status

Search 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

  1. Import cookies regularly: If spogo stops working, re-run spogo auth import --browser chrome to refresh your session.

  2. Check device state: If playback commands fail, run spogo device list to ensure a device is active. You may need to start playback from the Spotify app first.

  3. Use spogo over spotify_player: spogo is simpler to set up (cookie-based auth) and has cleaner output.

  4. For TUI lovers: spotify_player offers a full terminal UI with ? for keyboard shortcuts鈥攇reat for interactive sessions.

  5. 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!

You might also like