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
- Cline CLI (runtime hooks)
- CodeBuddy Code
- WorkBuddy AI
Note: hooks are written to
~/.workbuddy-ai/settings.json(overseas edition) or~/.workbuddy/settings.json. - GitHub Copilot CLI
- Cursor Agent
- Gemini CLI
- OpenCode (plugin-based)
- DeepSeek Harness (plugin-based)
Note: restart
dsh webafter setup to activate the plugin. - Pi Coding Agent (extension-based)
Note: run
/reloadin pi (or restart pi) after setup to activate the extension. - Qoder
Note: hooks are written to
~/.qoder/settings.json. Restart Qoder after setup (hook config does not hot-reload). - ZCode
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 # Manage AI tool integrations (hook / unhook)
bgm enable # Enable automatic BGM (global switch on)
bgm disable # Disable automatic BGM (global switch off)
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.
Metadata
Release files for mythril-agent-bgm 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mythril_agent_bgm-0.1.12.tar.gz | 18.6 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mythril_agent_bgm-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.2 MB
Release files / mythril_agent_bgm-0.1.12.tar.gz
| Download URL | mythril_agent_bgm-0.1.12.tar.gz |
|---|---|
| Size | 18.6 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
22048f29d22a9fa4e6f4c0c862a1244085d5b902f7b203e9e8b1e02633542e43
|
|
BLAKE2b-256 checksum How to use checksums |
d53ac7f55e43b256f26c0395f5effaba10fd12618cc8f2d3757ca4a1769b6413
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / mythril_agent_bgm-0.1.12-py3-none-any.whl
| Download URL | mythril_agent_bgm-0.1.12-py3-none-any.whl |
|---|---|
| Size | 18.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
95a7579569adebc9dd28a8f0c61f08f1f1d3366a6a900adb5be6ea28c5f46985
|
|
BLAKE2b-256 checksum How to use checksums |
5ac42d68294480421e48980485bd5412f4bbfdd93cc80352d51e1778ba86843f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|