Manage Claude Code buddy companion — switch species/rarity, rename, mute/unmute, apply bones-swap patch. Full TUI with live preview. 18 species × 5 rarities. Supports both native and npm installations.
When the user invokes /buddy-manager, launch the interactive TUI in a dedicated window.
Script path: <SCRIPTS_DIR>/buddy.py
python "<SCRIPTS_DIR>/buddy.py" setup
This updates skill.md paths for this machine, adds alias buddy-manager=... (and export PYTHONUTF8=1 on Windows) to ~/.bashrc. After running, user must source ~/.bashrc.
Windows — Run via Bash tool:
powershell.exe -File "<SCRIPTS_DIR>/launch_buddy.ps1"
Mac/Linux — Run via Bash tool:
bash "<SCRIPTS_DIR>/launch_buddy.sh"
Both scripts check for an existing "Buddy Manager" window first:
On Windows, buddy.py also handles singleton detection via FindWindowW('Buddy Manager').
✓ marks current species[COMMON] [UNCOMMON] [RARE] [EPIC] [LEGENDARY], ✓ marks current rarity| Key | Button | Action |
|---|---|---|
| S | [S] Save | Save selection; takes effect immediately if bones-swap active |
| R | [R] Reset | Revert preview to current saved buddy |
| U | [U] Reload | Reload buddy_config.json without closing TUI (for manual edits) |
| A | [A] Data Update / [A] Updating... | Fetch fresh data from API for all 90 species×rarity combos; all-or-nothing write |
| P | [P] Patch | Apply / verify bones-swap patch to claude executable (native or npm) |
| M | [M] Buddy OFF / [M] Buddy ON | Toggle companion speech bubble (mute/unmute) |
| Q | [Q] Quit | Exit TUI |
Check stdout. Handle signal if present:
PATCH_READY:<exe_path>First-time bones-swap patch was applied to a native binary. Kill ALL Claude instances so the patched exe loads:
import subprocess, sys
if sys.platform == 'win32':
subprocess.run(['taskkill', '/F', '/IM', 'claude.exe'], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)