{
  "markdown": "# Claude Code Music\n\nAn intelligent coding DJ plugin for Claude Code. Adjusts your Spotify music based on coding mood, activity, and preferences — automatically.\n\n```\n> /music focus\n  Now playing: Awake - Tycho (focus mode)\n\n> ugh this bug is killing me\n  [Claude helps fix the bug]\n  ...switched to something calmer\n\n> it works! let's ship it!\n  [Claude helps deploy]\n  🔊 \"Finished: deploy to production. The time is 3:45 PM\"\n  ...hype track incoming\n```\n\n## What it Does\n\n- **Mood-based music** — `/music focus`, `/music hype`, `/music chill`, `/music debug`, `/music flow`, `/music refactor`\n- **Automatic mood detection** — detects frustration, triumph, and deep focus from your prompts and adjusts music silently\n- **Audio announcements** — speaks the time, current song, and \"Finished: task name\" aloud when you complete work\n- **Session-aware** — auto-plays music when you start coding (if enabled)\n- **Celebrates with you** — hype track + voice announcement when you ship something\n- **Learns your taste** — `/music-setup` analyzes your Spotify history and builds personalized preferences\n- **Status line** — shows `♫ Song - Artist | 14:32` at the bottom of Claude Code\n\n## Quick Start\n\n### 1. Get Spotify API credentials\n\n1. Go to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard)\n2. Create an app, set redirect URI to `http://127.0.0.1:8888/callback`\n3. Copy your Client ID and Client Secret\n\n### 2. Set environment variables\n\n```bash\nexport SPOTIFY_CLIENT_ID=\"your_client_id\"\nexport SPOTIFY_CLIENT_SECRET=\"your_client_secret\"\n```\n\nAdd these to your `~/.zshrc` or `~/.bashrc` so they persist.\n\n### 3. Install the plugin\n\n**Option A: Plugin Marketplace (recommended)**\n\nInside Claude Code, run:\n\n```\n/install claude-code-music@claude-code-music\n```\n\nIf the marketplace isn't registered yet, add it once to `~/.claude/settings.json`:\n\n```json\n{\n  \"extraKnownMarketplaces\": {\n    \"claude-code-music\": {\n      \"source\": { \"source\": \"github\", \"repo\": \"shdowofdeath/claude-code-music\" },\n      \"autoUpdate\": true\n    }\n  }\n}\n```\n\n**Option B: Direct install**\n\n```bash\ncd your-project\ngit clone https://github.com/shdowofdeath/claude-code-music.git .claude-code-music\n```\n\nThe plugin is auto-discovered by Claude Code. No MCP server, no Node.js, no npm — just bash and curl.\n\n### 4. Run setup\n\nOpen Claude Code and run:\n\n```\n/music-setup\n```\n\nThe wizard will:\n- Authenticate with Spotify (opens browser for one-time OAuth)\n- Learn your music taste from your listening history\n- Walk you through preference setup\n- Play a test track to confirm it works\n\n### Status Line (optional)\n\nSee the current song at the bottom of Claude Code:\n\n```json\n// Add to .claude/settings.json\n{\n  \"statusLine\": {\n    \"command\": \"scripts/now-playing.sh\",\n    \"interval\": 10\n  }\n}\n```\n\nOutput: `♫ Song Name - Artist | 14:32`\n\n## Commands\n\n| Command | What it does |\n|---------|-------------|\n| `/music-setup` | First-time setup wizard |\n| `/music focus` | Deep focus (ambient, classical, post-rock) |\n| `/music hype` | Ship-it energy (synthwave, electronic, d&b) |\n| `/music chill` | Casual vibes (indie, acoustic, dream-pop) |\n| `/music debug` | Calming debug music (lo-fi, jazz, chillhop) |\n| `/music refactor` | Structured cleaning (classical, jazz, piano) |\n| `/music flow` | In the zone (trance, progressive, techno) |\n| `/music pause` | Pause playback |\n| `/music skip` | Next track |\n| `/music status` | What's playing |\n| `/music surprise` | Random mood, creative pick |\n| `/music taste` | Update your preferences |\n\n## How it Works\n\n### No MCP Server\n\nUnlike most Spotify integrations, this plugin doesn't use an MCP server. It uses a lightweight bash script (`scripts/spotify.sh`) that calls the Spotify API directly with `curl`. Claude runs the script via Bash when it needs to search, play, pause, or get recommendations.\n\nThis means:\n- **Zero Node.js dependencies** — no `npm install`, no `node_modules`\n- **No background server** — nothing to crash or fail silently\n- **Just bash + curl + python3** — tools already on your machine\n\n### Mood Detection\n\nThe plugin passively reads your prompts and adjusts music when it detects strong signals:\n\n- **\"ugh this bug is killing me\"** → switches to calming lo-fi\n- **\"it works! let's ship it!\"** → drops a hype track\n- **\"let me think about this architecture\"** → shifts to ambient focus\n\nOnly acts on strong signals. Only when music is already playing. No annoying interruptions.\n\n### Audio Announcements\n\nUses text-to-speech (macOS `say` / Linux `espeak`) to announce:\n\n| Event | What you hear |\n|-------|-------------|\n| Song change | \"Now playing: Song by Artist\" |\n| Task complete | \"Finished: authentication feature\" |\n| Time check | \"The time is 3:45 PM\" |\n\n**Enabled by default.** Disable with `audio_enabled: false` in preferences or during `/music-setup`.\n\nVoice is configurable (macOS) — set `audio_voice: Daniel` in preferences. Run `say -v '?'` to see all voices.\n\n### Preferences\n\nStored in `.claude/claude-code-music.local.md` (created by `/music-setup` or `/music taste`):\n\n```yaml\n---\nauto_play: false\naudio_enabled: true\naudio_voice: Samantha\ndefault_mood: chill\nfocus_genres: [ambient, electronic, classical, post-rock]\ndebug_genres: [lo-fi, chillhop, jazz, downtempo]\nhype_genres: [electronic, synthwave, drum-and-bass, indie-rock]\nno_lyrics_during_focus: true\npreferred_energy: medium\n---\n```\n\nEdit the file directly anytime — changes take effect immediately.\n\n## Architecture\n\n```\nclaude-code-music/\n├── .claude-plugin/\n│   └── plugin.json              # Plugin manifest\n├── commands/\n│   ├── music.md                 # /music command\n│   └── music-setup.md           # /music-setup wizard\n├── hooks/\n│   └── hooks.json               # Session start, mood detection, celebrations\n├── scripts/\n│   ├── spotify.sh               # Spotify API client (curl-based, ~300 lines)\n│   ├── now-playing.sh           # Status line (♫ Song - Artist | HH:MM)\n│   └── speak.sh                 # TTS announcements\n├── skills/\n│   └── music/\n│       ├── SKILL.md             # Main DJ brain\n│       └── references/\n│           └── preferences-template.md\n└── STATUSLINE.md                # Status line setup guide\n```\n\n`scripts/spotify.sh` handles everything: OAuth login, token refresh, and all Spotify API calls. Tokens are cached at `~/.spotify-mcp/tokens.json` so you only authenticate once.\n\n## Requirements\n\n- Claude Code\n- Spotify account (free or premium)\n- Spotify desktop app running on any device\n- Spotify API credentials ([get them here](https://developer.spotify.com/dashboard))\n- bash, curl, python3 (pre-installed on macOS and most Linux)\n\n## License\n\nApache License 2.0\n",
  "bytes": 6652,
  "sha": "b9372d5db0fa9a5903a47ed81b8eb47b1633dfe0c360a53ef9843e69b92fc515",
  "repo_slug": "shdowofdeath/claude-code-music",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_shdowofdeath_claude_code_music_claude_co_567ceaac/readme"
}