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
  • 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 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.
  • 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 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.

Metadata

Release files for mythril-agent-bgm 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mythril-agent-bgm 0.1.13
File Size Uploaded Provenance Actions
mythril_agent_bgm-0.1.13.tar.gz 18.6 MB Without provenance Details for mythril_agent_bgm-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mythril-agent-bgm 0.1.13
File Interpreter ABI Platform Actions
mythril_agent_bgm-0.1.13-py3-none-any.whl Python 3 none any Details for mythril_agent_bgm-0.1.13-py3-none-any.whl

Total release size: 37.3 MB

Release files / mythril_agent_bgm-0.1.13.tar.gz

Download URL mythril_agent_bgm-0.1.13.tar.gz
Size 18.6 MB
Tags Source
SHA-256 checksum
How to use checksums
8901e008a54302fb2c36689b5b9945282868deb10f935ad12c89e48f40e1cb26
BLAKE2b-256 checksum
How to use checksums
d4e7539fd11804f64fda5c1a84659bba9c4309069c916b298bbded887a88337a
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.13-py3-none-any.whl

Download URL mythril_agent_bgm-0.1.13-py3-none-any.whl
Size 18.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7bef14a89eaadda0ad9b29372e7925976530feb9550c0a603e47fbe513bf68eb
BLAKE2b-256 checksum
How to use checksums
d24a7b4198543f9c254554286f928c46f0f41cf6d351981923a4cd012ac29db1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Security for mythril-agent-bgm 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page