Spotify Cli
Skill by shawnpana
Why use this skill?
Control your Spotify playback from the Linux terminal with the Spotify CLI skill. Easily search, play, pause, and manage tracks with simple commands.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/shawnpana/spotify-cliWhat This Skill Does
The Spotify CLI skill is a powerful automation tool designed to bridge the gap between your command line interface and your Spotify account. It allows users to control their Spotify playback environment directly from a Linux-based terminal, such as a Raspberry Pi or a desktop workstation. By leveraging the official Spotify Web API and the spotipy Python library, this skill provides a seamless interface for searching, queuing, and controlling playback state without needing to switch windows or use the official Spotify desktop application.
Installation
Installation is a multi-step process. First, ensure Python 3 is installed. You must install the spotipy library via pip3 install spotipy --break-system-packages. Next, visit the Spotify Developer Dashboard to create an application and retrieve your Client ID and Secret, ensuring the redirect URI is set to http://127.0.0.1:8888/callback. Save these credentials into ~/.config/spotify-cli/config. Finally, move the script to /usr/local/bin/spotify and ensure it is executable. On your first command execution, follow the browser-based OAuth authentication flow to finalize permissions.
Use Cases
This skill is perfect for home automation enthusiasts using a Raspberry Pi as a media controller, software developers who prefer terminal-driven workflows, or anyone looking to minimize context switching during their workday. It enables background control of music, allowing you to pause or skip tracks while working in an IDE or terminal, and provides a quick way to audit what is currently playing without leaving your active project.
Example Prompts
- "OpenClaw, find and play 'Bohemian Rhapsody' by Queen."
- "What track is currently playing on my Spotify?"
- "OpenClaw, pause my music and skip to the next track."
Tips & Limitations
You must have the Spotify app running on another connected device to act as the output target. When interacting with an AI agent, always prioritize the search command first to ensure accuracy; playing blindly can lead to incorrect song selection due to fuzzy matching. Keep your environment variables secure and never expose your client secret in public repositories.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-shawnpana-spotify-cli": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-read, file-write, external-api