AI CLI Background Music Player - Plays work music in loop and done music when finished
Project description
mythril-agent-bgm
English | 中文
"AI fatigue is real." - Siddhant Khare
mythril-agent-bgm is a cross-platform CLI tool that adds audio feedback to AI-assisted coding sessions.
It plays looped work music while the agent is active, plays a done cue when work finishes, and stops
automatically at session end.
Why
AI coding sessions are productive but mentally expensive. This tool helps by turning invisible state changes into simple audio cues:
workmusic loops when the agent is actively workingdonecue plays when a task finishes- playback stops automatically when the session ends
This reduces constant status-checking and makes long sessions less draining.
Install
pip install mythril-agent-bgm
# Upgrade
pip install -U mythril-agent-bgm
This installs the bgm command.
Quick Start
On first run, any bgm command initializes your user config directory with starter files.
bgm setup- install hooks/plugins for detected AI toolsbgm select- choose a BGM profile (defaultor your custom profile)bgm enable- enable automatic BGM behavior
Optional quick check:
bgm play work 0
bgm stop
Supported Integrations
- Claude Code
- Cursor Agent
- Gemini CLI
- OpenCode (plugin-based)
bgm setup only configures tools detected on your machine.
Config Paths
- macOS/Linux:
~/.config/mythril-agent-bgm/ - Windows:
%APPDATA%\mythril-agent-bgm\
Important files:
config.json- custom BGM profilesselection.json- selected profile and enable/disable statesounds/- user.mp3files (flat directory, no subdirectories)bgm_player.pid- daemon process IDbgm_player.log- daemon log file
Customize Audio
- Copy
.mp3files into your usersounds/directory. - Edit your user
config.json:
{
"my_collection": {
"work": ["my_song.mp3", "another.mp3"],
"done": ["done.mp3"],
"notification": ["ping.mp3"]
}
}
- Run
bgm selectand choosemy_collection.
Notes:
- profile names are arbitrary (
my_collectionis only an example) - user audio files override built-in files when names are the same
- only bare filenames are supported (no nested paths)
Common Commands
bgm play work 0 # Loop work music indefinitely
bgm play work 3 # Play work music 3 times
bgm play done # Play done music once
bgm play notification # Play notification sound
bgm stop # Stop current playback daemon
bgm toggle # Toggle play/stop
bgm select # Choose profile
bgm setup # Configure integrations
bgm cleanup # Remove integration changes
bgm enable # Enable automatic BGM
bgm disable # Disable automatic BGM
Troubleshooting
# Verify pygame is installed
pip show pygame
# Stop active playback
bgm stop
If issues continue, inspect files in your config directory:
bgm_player.logbgm_player.pid
Uninstall
pip uninstall mythril-agent-bgm
Optional: remove your user config directory manually.
Development
See docs/Dev.md.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mythril_agent_bgm-0.1.4.tar.gz.
File metadata
- Download URL: mythril_agent_bgm-0.1.4.tar.gz
- Upload date:
- Size: 18.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95331a4299ecfd115dd3613165d1d53247c17cee4664e7d7bb89a344a6985413
|
|
| MD5 |
3d39b8b8592d807276a2063c1933a830
|
|
| BLAKE2b-256 |
5b5c0cfa163b88f94a778a6c3d20247f1fc6086ddf3cec049dbf2dfd01d7f004
|
File details
Details for the file mythril_agent_bgm-0.1.4-py3-none-any.whl.
File metadata
- Download URL: mythril_agent_bgm-0.1.4-py3-none-any.whl
- Upload date:
- Size: 18.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6981cf234d2613ff79f6c796b0e5ad627bf0361364c8f3250807a3d842445acb
|
|
| MD5 |
9c32dc0c48f57838f84b9053116577db
|
|
| BLAKE2b-256 |
72a15d82964e75cb1f1cc3c3317e5c7179273408cc3b6a17b1250fd73ae2f1f1
|