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

age-of-opencode

v1.1.4

Published

Age of Empires II sound effects for OpenCode - wololo your way through coding sessions

Downloads

720

Readme

Age of OpenCode

Age of Empires II sound effects for OpenCode. Wololo your way through coding sessions.

This is an OpenCode port of the original age-of-claude plugin for Claude Code, structured after opencode-warcraft-notifications and event-matched with opencode-notifier.

What it does

Plays a different Age of Empires II sound effect on each key OpenCode lifecycle event:

| Event | Sound | |-------|-------| | Client connected | Game startup / Claude startup sound | | Session started | Game startup sound | | Permission prompt | Priest "Wololo" (you are being converted to approve) | | Question tool invoked | "I need food" / "Gold please" / "Give me some stone" (the agent needs input) | | Assistant response complete | Random villager work / "yes" / satisfaction sound | | Subagent complete | Villager "ready" training complete sound | | Plan exit | "Yes!" / "Aww yeah!" / "Attack them now!" | | User message | Silence (minimal interruption) | | User cancelled | "Get out!" / "No!" / "I'm weak, please don't kill me" | | Session error | Random soldier death sound / crowd wailing |

46 authentic AoE II .wav files are bundled in data/sounds/.

Requirements

  • OpenCode (Bun-based runtime)
  • A working audio backend on your platform:
    • macOS: afplay (built-in)
    • Linux: paplay, aplay, or ffplay (one of)
    • Windows: PowerShell (built-in) — partial support, your mileage may vary

Installation

From npm

Add the package name to your OpenCode config:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["age-of-opencode"]
}

Restart OpenCode. Done.

From a local checkout

Clone the repository into your OpenCode plugin directory. OpenCode auto-loads files placed directly in ~/.config/opencode/plugin/ (singular) globally, or in .opencode/plugin/ per-project.

git clone https://github.com/Stijnvandenbroek/age-of-opencode.git ~/.config/opencode/plugin/age-of-opencode

Then add a tiny loader file so OpenCode picks up the plugin from its subdirectory:

~/.config/opencode/plugin/age-of-opencode-loader.ts

export { AgeOfOpencodePlugin } from './age-of-opencode/index.ts';

Restart OpenCode and you should hear the startup sound on your next session.

Note: the directory is plugin (singular), not plugins. OpenCode only scans the singular directory for auto-loaded plugin files. If your plugin is silent, double-check the path and look for a service=plugin path=...age-of-opencode-loader.ts loading plugin line in the latest log file under ~/.local/share/opencode/log/.

Configuration

The plugin reads a couple of environment variables — no config file is required.

| Variable | Effect | |----------|--------| | AGE_OF_OPENCODE_DISABLE | Set to 1 to silence the plugin without uninstalling it. | | AGE_OF_OPENCODE_VOLUME | Float between 0.0 and 1.0. Default 0.3. Currently honored on macOS via afplay -v. | | AGE_OF_OPENCODE_DEBUG | Set to 1 to enable debug logging to the OpenCode log file. |

Example:

AGE_OF_OPENCODE_VOLUME=0.5 opencode

Supported events

This plugin handles the following OpenCode events (matching those in opencode-notifier):

| SDK Event | Plugin Event | When it fires | |-----------|--------------|---------------| | client_connected | client_connected | Shortly after plugin startup | | session.created | session_started | New top-level session created | | permission.asked | permission | Permission prompt shown | | tool.execute.before (question) | question | Question tool invoked | | session.idle | complete / subagent_complete | Assistant response complete | | tool.execute.before (plan_exit) | plan_exit | Plan ready for review | | message.updated (role=user) | user_message | User sends a message | | session.error (MessageAbortedError) | user_cancelled | User cancelled the session | | session.error (other) | error | Session encountered an error |

Note: session.idle from the SDK maps to complete for top-level sessions and subagent_complete for subagent sessions, with a 350ms debounce.

How it works

OpenCode loads the plugin at startup and the plugin subscribes to SDK events via the standard event hook, plus the permission.ask and tool.execute.before hooks. When an event fires, the plugin picks a matching sound at random from a thematic pool and plays it using your platform's audio player (afplay on macOS, paplay/aplay on Linux). Playback uses await and will block the event handler briefly, but sounds are short (under 5 seconds) so the impact is minimal. Missing audio binaries result in silence — no errors are thrown.

Project structure

.
├── index.ts                # re-exports the plugin
├── src/
│   └── plugin.ts           # main plugin: event handler + sound dispatch
└── data/
    └── sounds/             # 46 bundled AoE II .wav files

Acknowledgments

License

MIT — see LICENSE.

The bundled .wav files originate from Age of Empires II (Ensemble Studios / Microsoft) and are included for personal, non-commercial use only.