AI CLI Background Music Player - Plays work music in loop and done music when finished
Project description
mythril-agent-bgm
A cross-platform CLI tool that plays background music during AI-assisted work sessions and integrates with AI tools.
Install
pip install mythril-agent-bgm
# Upgrade
pip install -U mythril-agent-bgm
This installs the bgm CLI command.
Quick Start
Running any bgm command for the first time auto-creates ~/.config/mythril-agent-bgm/ with a starter config.
bgm setup— install AI tool integration hooks (e.g. Claude, Cursor Agent)bgm select— pick a configuration (defaultuses built-in music;my_collectionuses your own)bgm enable— enable BGM (auto-starts music when AI starts working)
Customize with your own audio
- Copy your
.mp3files into~/.config/mythril-agent-bgm/sounds/(no subdirectories) - Edit
~/.config/mythril-agent-bgm/config.jsonand change"my_collection"→ your files:
{
"my_collection": {
"work": ["my_song.mp3", "another.mp3"],
"done": ["done.mp3"]
}
}
- Run
bgm selectand pickmy_collection
Rename my_collection to anything you like — it's just a key.
CLI 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 music
bgm toggle # Toggle play/stop
bgm select # Choose configuration
bgm setup # Setup AI tool integration
bgm cleanup # Remove AI tool integration
bgm enable # Enable BGM
bgm disable # Disable BGM
Editor Integration
Neovim
keymap.set("n", "<F10>", function()
vim.fn.jobstart("bgm toggle")
end, { desc = "Toggle AI BGM" })
Vim
nnoremap <F10> :call system('bgm toggle')<CR>
Troubleshooting
# Check pygame
pip show pygame
# View daemon log
cat ~/.config/mythril-agent-bgm/bgm_player.log
# Force kill if music won't stop
ps aux | grep bgm
kill <pid>
rm ~/.config/mythril-agent-bgm/bgm_player.pid
Uninstall
# Remove the package
pip uninstall mythril-agent-bgm
# Remove user data (optional)
rm -rf ~/.config/mythril-agent-bgm
Development
See docs/Dev.md for the development guide.
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.2.tar.gz.
File metadata
- Download URL: mythril_agent_bgm-0.1.2.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 |
5534742a37310956adfc1658352459fd4e38d60ee42a9510e1ce31ee39599e17
|
|
| MD5 |
c2958d9ad4e9db74a270b9203edb427e
|
|
| BLAKE2b-256 |
3e1dcfc7169d44272295e86cb6b88445e7abab1327112526576d2f77f71fd76e
|
File details
Details for the file mythril_agent_bgm-0.1.2-py3-none-any.whl.
File metadata
- Download URL: mythril_agent_bgm-0.1.2-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 |
93de8a79a2d85e205a9f1bb02566b7aefbc49f8eafbb0870b55376979abf2f67
|
|
| MD5 |
fff81f98da8b361b0b5ddfce4ac2c663
|
|
| BLAKE2b-256 |
57369bff2bd6cfdcfa9fe8154b7ad849400e84f3696c385b7d5cb347a4035c32
|