Skip to main content

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.

  1. bgm setup — install AI tool integration hooks (e.g. Claude, Cursor Agent)
  2. bgm select — pick a configuration (default uses built-in music; my_collection uses your own)
  3. bgm enable — enable BGM (auto-starts music when AI starts working)

Customize with your own audio

  1. Copy your .mp3 files into ~/.config/mythril-agent-bgm/sounds/ (no subdirectories)
  2. Edit ~/.config/mythril-agent-bgm/config.json and change "my_collection" → your files:
{
  "my_collection": {
    "work": ["my_song.mp3", "another.mp3"],
    "done": ["done.mp3"]
  }
}
  1. Run bgm select and pick my_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

mythril_agent_bgm-0.1.2.tar.gz (18.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mythril_agent_bgm-0.1.2-py3-none-any.whl (18.6 MB view details)

Uploaded Python 3

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

Hashes for mythril_agent_bgm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5534742a37310956adfc1658352459fd4e38d60ee42a9510e1ce31ee39599e17
MD5 c2958d9ad4e9db74a270b9203edb427e
BLAKE2b-256 3e1dcfc7169d44272295e86cb6b88445e7abab1327112526576d2f77f71fd76e

See more details on using hashes here.

File details

Details for the file mythril_agent_bgm-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for mythril_agent_bgm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 93de8a79a2d85e205a9f1bb02566b7aefbc49f8eafbb0870b55376979abf2f67
MD5 fff81f98da8b361b0b5ddfce4ac2c663
BLAKE2b-256 57369bff2bd6cfdcfa9fe8154b7ad849400e84f3696c385b7d5cb347a4035c32

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page