mcpField
S
spoti-cli

spoti-cli

github.com/crafter-stationCreative & media11339 installsUpdated 8w ago
Repository

About spoti-cli

spoti-cli is a skill that guides Spotify CLI use for searching music, generating recommendations, and creating playlists. It supports explicit artist or track requests as well as mood-based and journal-aware playlist workflows.

Key features

  1. 01Search artists and tracks
  2. 02Generate recommendations from seeds and attributes
  3. 03Create and manage playlists
  4. 04Return structured JSON output
  5. 05Support mood-based and journal-aware selection

Use cases

  1. 01Find tracks matching a named artist or song
  2. 02Build a playlist for a mood or activity
  3. 03Create a playlist based on daily journal signals
  4. 04List playlists or add tracks to an existing playlist

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/crafter-station/skills --skill spoti-cli

After installing, type/spoti-cliin Claude Code to confirm it loaded.

Bundled filesreferences/mood-mapping.md

Details

From the project README

spoti-cli

Prerequisites

Check auth: spoti-cli me --json. If it fails:

  1. Install: bun add -g @crafter/spoti-cli
  2. Run spoti-cli auth — it prints the exact dashboard URL, redirect URI (http://127.0.0.1:8888/callback), and API checkbox (Web API) to use
  3. Re-run with spoti-cli auth --client-id <CLIENT_ID> once you have the ID

The CLI walks the user through Spotify dashboard setup. Don't repeat the steps yourself — point them at spoti-cli auth and let them paste the output.

Workflow

1. Parse Intent

Three modes:

  • Explicit: user names artists/tracks → search directly
  • Mood/activity: user describes vibe → read mood-mapping.md
  • Vault-aware: user says "based on my day" → read 02_Journal/daily/{YYYY-MM-DD}.md, extract mood signals from mood-mapping.md
2. Find Seeds
spoti-cli search "Radiohead" --type artist --limit 5 --json
spoti-cli search "Everything In Its Right Place" --type track --limit 3 --json

Extract id fields from results.

3. Get Recommendations
spoti-cli recommend --seed-artists ID1,ID2 --seed-genres ambient --energy 0.3 --valence 0.4 --limit 25 --json

Max 5 seeds total (artists + genres + tracks combined). Tunable attributes in mood-mapping.md.

4. Create Playlist
spoti-cli create "Deep Work — Mar 24" --description "Focus music" --tracks URI1,URI2,... --json

Name contextually: include mood + date. Vault-aware example: "Post-shipping Celebration — Mar 24".

5. Open in Spotify
open "spotify:playlist:{PLAYLIST_ID}" 2>/dev/null || open "https://open.spotify.com/playlist/{PLAYLIST_ID}"

Always open the playlist after creating it. Try Spotify desktop first (URI scheme), fall back to web if desktop isn't available.

6. Report

Return: playlist URL, seed logic summary, track count.

Commands

CommandExample
searchspoti-cli search "query" --type track --limit 10 --json
recommendspoti-cli recommend --seed-genres pop --energy 0.8 --limit 20 --json
createspoti-cli create "Name" --tracks URIs --public --json
playlist listspoti-cli playlist list --limit 10 --json
playlist getspoti-cli playlist get ID --json
playlist addspoti-cli playlist add ID --tracks URIs
mespoti-cli me --json

All commands support --json for structured output.

Comments

Markdown supported