Skip to main content

mythril-agent-bgm

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:

  • work music loops when the agent is actively working
  • done cue 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.

  1. bgm setup - install hooks/plugins for detected AI tools
  2. bgm select - choose a BGM profile (default or your custom profile)
  3. 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
  • GitHub Copilot CLI
  • Cursor Agent
  • Gemini CLI
  • OpenCode (plugin-based)
  • DeepSeek Harness (plugin-based) Note: restart dsh web after setup to activate the plugin.
  • Pi Coding Agent (extension-based) Note: run /reload in pi (or restart pi) after setup to activate the extension.

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 profiles
  • selection.json - selected profile and enable/disable state
  • sounds/ - user .mp3 files (flat directory, no subdirectories)
  • bgm_player.pid - daemon process ID
  • bgm_player.log - daemon log file

Customize Audio

  1. Copy .mp3 files into your user sounds/ directory.
  2. Edit your user config.json:
{
  "my_collection": {
    "work": ["my_song.mp3", "another.mp3"],
    "done": ["done.mp3"],
    "notification": ["ping.mp3"]
  }
}
  1. Run bgm select and choose my_collection.

Notes:

  • profile names are arbitrary (my_collection is 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.log
  • bgm_player.pid

Uninstall

pip uninstall mythril-agent-bgm

Optional: remove your user config directory manually.

Development

See docs/Dev.md.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mythril_agent_bgm-0.1.11.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.11.tar.gz
Algorithm Hash digest
SHA256 97a7fc8358ed9415f7880827c3257787ead5982d0052cf37f745ca044ab9149e
MD5 d90ba80238ed6d55226b155536756ac5
BLAKE2b-256 a21a49f4d9ec4451e5ff49611949c571fda265db03cfac95f76c6ac34e724ab7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mythril_agent_bgm-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 f899d9b48087addb211b097e300a1d0d3246ea936a2142ebca5f99e568ac8b5f
MD5 39b4a631d173487b2e93e33b5f7deda9
BLAKE2b-256 d2a313381c1f9884d5895714180cb4e96d0771096f15de4e43ab4d2e028082c1

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 Sentry Error logging StatusPage Status page