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.1.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.1-py3-none-any.whl (18.6 MB view details)

Uploaded Python 3

File details

Details for the file mythril_agent_bgm-0.1.1.tar.gz.

File metadata

  • Download URL: mythril_agent_bgm-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fb1bee03f1053ea155b40ea199579e7f7e829588a063ecf967e84e9736bf98a2
MD5 e98a533d0b9b0a26ed1d555c2ed3b17d
BLAKE2b-256 b93fb95f02cc028baa8e5ef47b4dee3c633be9e15837c67ebff05f4e0a3d3c7f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mythril_agent_bgm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 257aa987951062693fb679d162e787f814313bc6407aec83e2adf53ba209ff5c
MD5 c9b120c8536f3ea55aaf076337580f38
BLAKE2b-256 a3be71c6d84131af5cea26ebfe82b7a27610bbfbb5bb2d1a34a5add83138f976

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