Elevator music for your Claude Code tasks! Automatically plays background music while Claude is working, because coding is better with a soundtrack.
- 🎵 Automatic playback during Claude Code sessions (via hooks)
- ⌨️ Easy control with ESC, Q, or Ctrl+C to stop
- 🎲 Random music selection from your collection
- 🖥️ Cross-platform support (macOS with
afplay) - 🎯 Zero dependencies beyond Python standard library
For automatic music during all Claude Code sessions:
-
Find the full path to your
claude_muzak.py:pwd # Copy this path
-
Add hooks to
~/.claude/settings.json:{ "hooks": { "UserPromptSubmit": { "command": "python3 /full/path/to/claude_muzak.py hook start" }, "SessionEnd": { "command": "python3 /full/path/to/claude_muzak.py hook stop" } } } -
Restart Claude Code and enjoy automatic elevator music! 🎵
- MP3 - Most common format
- M4A - iTunes/Apple Music format
- WAV - Uncompressed audio
- AAC - Advanced Audio Codec
- FLAC - Lossless compression
- OGG - Open source format
- macOS (uses built-in
afplaycommand) - Python 3.6+ (no additional packages needed)
- Audio files in the
muzakfiles/directory
- Curate your playlist: Add calm, non-distracting background music
- Volume control: Use your system volume controls
- Multiple formats: Mix different audio formats in the same folder
- Test first: Run
python3 claude_muzak.py startbefore setting up hooks
Music won't start?
- Check that
muzakfiles/directory exists and contains audio files - Verify you're on macOS (required for
afplay) - Try:
ls muzakfiles/to see your audio files
ESC key not working?
- Try the Q key or Ctrl+C instead
- The script uses raw keyboard input for maximum compatibility
Hook not working?
- Double-check the full path in your settings.json
- Restart Claude Code after adding hooks
- Test the command manually first
MIT License - Feel free to fork, modify, and share!
Now get back to coding with your personal elevator music! 🎵