By betacar
Plays elevator music in the background while Claude Code is thinking. Random non-repeat track rotation, OS-aware playback, /claude-player:music slash controls, and an optional now-playing status line.
Elevator music for Claude Code. Plays a random lounge-jazz track in the background while Claude is thinking, rotates tracks if work runs long, stops the moment Claude finishes, and never repeats the same track back-to-back.
[Opus 4.7] 📁 claude-player │ ♪ Bossa Nova Background Music Version 60s
In Claude Code:
/plugin marketplace add <git-url-of-this-repo>
/plugin install claude-player@claude-player
Restart Claude Code. From your next prompt, music starts one second after you hit enter and stops when Claude finishes responding.
git clone <git-url-of-this-repo>
claude --plugin-dir ./claude-player
Music plays automatically while Claude is working. Control it with the bundled slash command:
/claude-player:music start # enable the hook
/claude-player:music stop # disable the hook (and silence)
/claude-player:music skip # jump to the next random track
/claude-player:music now # what's playing right now
/claude-player:music history # last 10 tracks played
/claude-player:music status # full state dump
/claude-player:music toggle # flip enabled ↔ disabled
The disabled state persists across sessions until you start again.
Plugin settings.json can't configure Claude Code's main status line (the format only supports agent and subagentStatusLine), so this is a one-time manual step. Add the following block to your ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bash \"$HOME/.claude/plugins/cache/claude-player/claude-player/bin/elevator-music-statusline\"",
"refreshInterval": 1
}
}
After restarting Claude Code, the status bar will show the prettified current track with a rotating music glyph (🎵 ♫ ♬ ♪), 🎼 cueing up… during the 1-second pre-roll, or 🔇 elevator-music off while disabled (toggle via /claude-player:music stop).
| Env var | Default | Effect |
|---|---|---|
ELEVATOR_MUSIC_TRACKS_DIR | <plugin-root>/tracks | Directory scanned for audio files |
ELEVATOR_MUSIC_STATE_DIR | ~/.claude/elevator-music | Where PID files, history, and the disabled flag live |
ELEVATOR_MUSIC_START_DELAY | 1.0 | Seconds to wait before starting the first track |
To swap in your own music, drop .mp3/.wav/.m4a/.flac/.ogg files into any directory and point ELEVATOR_MUSIC_TRACKS_DIR at it.
afplay. No setup needed.mpg123, ffplay, mpv, or paplay on PATH.ffplay, mpg123, or mpv on PATH (a PowerShell + MediaPlayer fallback exists but is single-shot, not looped).python3 (or jq) is recommended for the hook to parse Claude Code's JSON payloads; both are present by default on macOS.
Three Claude Code hooks drive the behavior:
UserPromptSubmit spawns a detached background bash loop. It sleeps a cancellable second, then picks a random track that isn't the last one played and launches the OS-native audio player. When the player exits (track ends), the loop picks another one.Stop and SubagentStop send SIGTERM to the loop. A trap inside the loop kills the active player child instantly. If Stop fires inside the 1-second pre-roll, no audio is ever produced — fast Claude responses stay silent.State lives in ~/.claude/elevator-music/: a PID file for the loop, a separate child-PID file for the active player (this is what the statusline checks), the last-played track filename, a timestamped history.log, and a disabled flag.
The bundled tracks are royalty-free lounge-jazz and bossa-nova clips downloaded from Pixabay. Replace them with your own via ELEVATOR_MUSIC_TRACKS_DIR if you prefer different mood music.
MIT — see LICENSE.
No model invocation
Executes directly as bash, bypassing the AI model
Runs pre-commands
Contains inline bash commands via ! syntax
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub betacar/claude-player --plugin claude-playerMulti-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.
Unified status line for Claude Code with multi-CLI (Claude, Codex, Gemini, z.ai) usage monitoring, context, rate limits, and cost tracking
Harness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Complete collection of battle-tested Claude Code configs from an Anthropic hackathon winner - agents, skills, hooks, and rules evolved over 10+ months of intensive daily use