npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-rts-sounds

v1.0.2

Published

RTS sound effects plugin for OpenCode - StarCraft, Warcraft III, and C&C Red Alert voice lines on session events

Readme

opencode-rts-sounds

RTS sound effects plugin for OpenCode. Plays iconic voice lines from StarCraft, Warcraft III, and Command & Conquer: Red Alert when things happen in your coding session.

Install

Add opencode-rts-sounds to the plugin array in your OpenCode config file.

The config file is at ~/.config/opencode/opencode.json (global) or opencode.json (project-level).

{
  "plugin": ["opencode-rts-sounds"]
}

OpenCode installs npm plugins automatically at startup. No other steps needed.

From source

git clone https://github.com/spartandingo/opencode-rts-sounds.git
cp -r opencode-rts-sounds/index.js opencode-rts-sounds/themes ~/.config/opencode/plugins/

Themes

Six built-in themes are available:

| Theme | Game | Faction | |---|---|---| | starcraft (default) | StarCraft | Terran SCV + Protoss Advisor | | protoss-zealot | StarCraft | Protoss Zealot + Advisor | | warcraft-human | Warcraft III | Human Peasant | | warcraft-orc | Warcraft III | Orc Peon | | redalert-allied | C&C Red Alert 3 | Allied EVA | | redalert-soviet | C&C Red Alert 3 | Soviet EVA |

Set theme via config file

Create ~/.config/opencode/sounds/config.json:

{
  "theme": "protoss-zealot"
}

Set theme via environment variable

export OPENCODE_RTS_THEME=redalert-soviet

The environment variable overrides the config file.

Switch theme with slash command

Use the /rts-theme command inside OpenCode:

/rts-theme warcraft-orc

Run /rts-theme without an argument to see available themes.

Switch theme via AI

Ask the AI to switch themes naturally — it has access to an rts_set_theme tool:

switch to the red alert soviet theme

Both methods take effect immediately without restarting OpenCode.

Events

StarCraft (Terran)

| Event | Sound | |---|---| | session.created | "SCV good to go, sir" | | session.idle | "Yes sir" / "Affirmative" | | session.compacted | "You must construct additional pylons!" | | session.error | "Not enough minerals" / "Insufficient vespene gas" | | permission.asked | "Whaddya want?" |

StarCraft (Protoss Zealot)

| Event | Sound | |---|---| | session.created | "My life for Aiur!" | | session.idle | Zealot acknowledgments | | session.compacted | "You must construct additional pylons!" | | session.error | "Not enough minerals" / "Insufficient vespene gas" | | permission.asked | Zealot "what" responses |

Warcraft III (Human / Orc)

| Event | Sound | |---|---| | session.created | "Ready to work" | | session.idle | "Job's done!" / "Work complete" | | session.compacted | "We need more food" | | session.error | "Not enough gold" / "Not enough lumber" | | permission.asked | "Yes me lord?" / "What is it?" |

Red Alert 3 (Allied / Soviet)

| Event | Sound | |---|---| | session.created | "Building" | | session.idle | "Construction complete" | | session.compacted | "Insufficient funds" / "Low power" | | session.error | "Cannot deploy here" | | permission.asked | "On hold" / "Select unit" |

Custom Themes

Create your own theme by adding a JSON file to ~/.config/opencode/sounds/themes/.

Example: custom theme with downloadable sounds

Create ~/.config/opencode/sounds/themes/my-theme.json:

{
  "name": "my-theme",
  "label": "My Custom Theme",
  "soundPacks": {
    "my-sounds": {
      "url": "https://example.com/sounds.zip",
      "files": {
        "path/inside/zip/ready.wav": "ready.wav",
        "path/inside/zip/done.wav": "done.wav",
        "path/inside/zip/error.wav": "error.wav",
        "path/inside/zip/waiting.wav": "waiting.wav"
      }
    }
  },
  "eventSounds": {
    "session.created": ["ready.wav"],
    "session.idle": ["done.wav"],
    "session.compacted": ["error.wav"],
    "session.error": ["error.wav"],
    "permission.asked": ["waiting.wav"]
  }
}

Example: custom theme with local sound files

If you already have sound files, skip soundPacks and place your .wav files directly in ~/.config/opencode/sounds/<theme-name>/:

{
  "name": "my-local-theme",
  "label": "My Local Theme",
  "eventSounds": {
    "session.created": ["startup.wav"],
    "session.idle": ["complete.wav"],
    "session.compacted": ["warning.wav"],
    "session.error": ["error.wav"],
    "permission.asked": ["question.wav"]
  }
}

Then place your files in ~/.config/opencode/sounds/my-local-theme/.

Theme format reference

| Field | Type | Required | Description | |---|---|---|---| | name | string | yes | Theme identifier (used as directory name and config key) | | label | string | no | Human-readable display name | | soundPacks | object | no | ZIP archives to download (omit for local-only themes) | | soundPacks.*.url | string | yes | Download URL for the ZIP archive | | soundPacks.*.files | object | yes | Map of "path/in/zip.wav": "local-filename.wav" | | eventSounds | object | yes | Map of OpenCode event types to arrays of sound filenames |

Custom themes with the same name as a built-in theme will override it.

How it works

Sound files are downloaded automatically on first run from The Sounds Resource and cached in ~/.config/opencode/sounds/<theme-name>/. No sound files are distributed with this package. Switching themes downloads a new set of sounds.

Audio playback uses child_process.spawn with platform-native commands -- no additional dependencies required.

Platform support

| Platform | Audio command | Status | |---|---|---| | macOS | afplay (built-in) | Tested | | Linux | paplay (PulseAudio) | Should work |

Migrating from opencode-starcraft

Replace opencode-starcraft with opencode-rts-sounds in your config. The StarCraft theme is the default, so it works identically out of the box.

Credits

  • Sound files from their respective games via The Sounds Resource
  • StarCraft is a trademark of Blizzard Entertainment, Inc.
  • Warcraft is a trademark of Blizzard Entertainment, Inc.
  • Command & Conquer is a trademark of Electronic Arts Inc.
  • Sounds are downloaded on demand and not distributed with this package

License

MIT