JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 25
  • Score
    100M100P100Q83407F
  • License MIT

OpenCode plugin that plays Warcraft-style sound effects for session events

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 playerCommand is omitted, the plugin auto-detects a player:
    • macOS: afplay
    • Linux: paplay, then aplay, then ffplay
  • Relative paths in sounds are resolved from ~/.config/opencode/.
  • Any sound not overridden in sounds falls back to the selected voicePack.

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.