Package Exports
- opencode-sfx
Readme
opencode-sfx
OpenCode plugin that plays Warcraft worker voice lines for key agent moments, inspired by classic RTS feedback sounds.
Bundled voice packs:
peon(Orc worker)peasant(Human worker)
Installation
Add it to your OpenCode config, OpenCode will download/manage it for you:
{
"plugin": ["opencode-sfx"]
}Default Event Mapping
This maps closely to the Claude hook setup you shared:
| OpenCode event | Claude analog | Default sound (peon) |
|---|---|---|
| plugin load | SessionStart |
PeonReady1.ogg |
tui.command.execute (prompt.submit) |
UserPromptSubmit |
PeonYes3.ogg |
permission.ask and session.error |
Notification |
PeonWhat3.ogg |
session.idle |
Stop |
PeonBuildingComplete1.ogg |
Configuration
Optional config file:
~/.config/opencode/opencode-sfx.json
Minimal example:
{
"voicePack": "peon"
}Full example:
{
"enabled": true,
"voicePack": "peasant",
"playerCommand": "afplay",
"playerArgs": [],
"events": {
"sessionStart": true,
"promptSubmit": true,
"notification": true,
"stop": true
},
"sounds": {
"sessionStart": "/absolute/path/to/start.ogg",
"promptSubmit": "custom/prompt.ogg",
"notification": "/absolute/path/to/notification.ogg",
"stop": "/absolute/path/to/stop.ogg"
}
}Config notes:
- If
playerCommandis omitted, the plugin auto-detects a player:- macOS:
afplay - Linux:
paplay, thenaplay, thenffplay
- macOS:
- Relative paths in
soundsare resolved from~/.config/opencode/. - Any sound not overridden in
soundsfalls back to the selectedvoicePack.
Asset Source
Bundled clips come from:
See assets/README.md for exact file list.
License
Plugin code is MIT (LICENSE).
Game audio remains property of its original rights holders.