User Guide
Overview
Section titled “Overview”Welcome to the Warcraft II Notifications Plugin for OpenCode! This guide will help you get started, configure the plugin to your preferences, and troubleshoot common issues.
Table of Contents
Section titled “Table of Contents”- Quick Start
- Installation
- Configuration
- Using the Plugin
- Sound Factions
- Customization
- Troubleshooting
- FAQ
Installation
Section titled “Installation”Prerequisites
Section titled “Prerequisites”- OpenCode: Latest version
- Operating System: macOS or Linux
- Audio: Working audio output
Installation Steps
Section titled “Installation Steps”Option 1: Global Installation (Recommended)
Section titled “Option 1: Global Installation (Recommended)”-
Edit your OpenCode configuration:
Terminal window # macOS/Linuxnano ~/.config/opencode/opencode.json -
Add the plugin:
{"$schema": "https://opencode.ai/config.json","plugin": ["@pantheon-ai/opencode-warcraft-notifications"]} -
Save and restart OpenCode:
Terminal window opencode
Option 2: Project-Specific Installation
Section titled “Option 2: Project-Specific Installation”-
Create project configuration:
Terminal window mkdir -p .opencodenano .opencode/opencode.json -
Add the plugin:
{"$schema": "https://opencode.ai/config.json","plugin": ["@pantheon-ai/opencode-warcraft-notifications"]} -
Restart OpenCode in your project:
Terminal window cd /path/to/your/projectopencode
Verification
Section titled “Verification”After installation, the plugin will:
- Download from npm registry
- Copy sound files to your system
- Activate automatically
Check installation:
# macOSls -la ~/Library/Application\ Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/
# Linuxls -la ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/You should see alliance/ and horde/ directories with WAV files.
Configuration
Section titled “Configuration”Configuration Files
Section titled “Configuration Files”The plugin supports two configuration files:
- Project-specific:
.opencode/plugin.json(in your project) - Global:
~/.config/opencode/plugin.json(user-wide)
Priority: Project-specific > Global > Defaults
Basic Configuration
Section titled “Basic Configuration”Create a plugin.json file:
{ "@pantheon-ai/opencode-warcraft-notifications": { "faction": "both", "soundsDir": "/custom/path/to/sounds" }}Configuration Options
Section titled “Configuration Options”faction
Section titled “faction”Type: string
Options: "alliance", "horde", "both"
Default: "both"
Choose which faction sounds to play:
{ "@pantheon-ai/opencode-warcraft-notifications": { "faction": "alliance" }}Examples:
"alliance": Only Alliance sounds (humans, elves, dwarves, knights, mages)"horde": Only Horde sounds (orcs, trolls, ogres, death knights, dragons)"both": Random mix of both factions (default)
soundsDir
Section titled “soundsDir”Type: string
Default: Platform-specific (see below)
Customize where sound files are stored:
{ "@pantheon-ai/opencode-warcraft-notifications": { "soundsDir": "/custom/sounds/path" }}Default Locations:
- macOS:
~/Library/Application Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/ - Linux:
~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/
showDescriptionInToast
Section titled “showDescriptionInToast”Type: boolean
Default: true
Control whether toast notifications are shown when the session goes idle:
{ "@pantheon-ai/opencode-warcraft-notifications": { "showDescriptionInToast": true }}Examples:
true(default): Shows in-app toast with voice line as title (e.g., “Yes, milord?” with your session summary)false: Sound-only mode (no visual notification)
Toast Notification Example:
- Title: “Yes, milord?” (Warcraft II voice line)
- Message: “Created notification system with sound descriptions”
- Duration: 4 seconds
- Appearance: Info-style toast in OpenCode interface
Configuration Examples
Section titled “Configuration Examples”Example 1: Alliance Only (Global)
Section titled “Example 1: Alliance Only (Global)”File: ~/.config/opencode/plugin.json
{ "@pantheon-ai/opencode-warcraft-notifications": { "faction": "alliance" }}Example 2: Horde Only (Project)
Section titled “Example 2: Horde Only (Project)”File: .opencode/plugin.json
{ "@pantheon-ai/opencode-warcraft-notifications": { "faction": "horde" }}Example 3: Custom Sound Directory
Section titled “Example 3: Custom Sound Directory”File: ~/.config/opencode/plugin.json
{ "@pantheon-ai/opencode-warcraft-notifications": { "soundsDir": "/home/user/my-warcraft-sounds", "faction": "both" }}Example 4: Silent Mode (Sound Only, No Toast)
Section titled “Example 4: Silent Mode (Sound Only, No Toast)”File: .opencode/plugin.json
{ "@pantheon-ai/opencode-warcraft-notifications": { "faction": "both", "showDescriptionInToast": false }}Example 5: Full Configuration
Section titled “Example 5: Full Configuration”File: ~/.config/opencode/plugin.json
{ "@pantheon-ai/opencode-warcraft-notifications": { "soundsDir": "/custom/sounds", "faction": "alliance", "showDescriptionInToast": true }}Environment Variables
Section titled “Environment Variables”You can also use environment variables:
# Custom sound directoryexport SOUNDS_DATA_DIR=/custom/sounds/path
# Enable debug loggingexport DEBUG_OPENCODE=1Configuration Validation
Section titled “Configuration Validation”The plugin automatically validates your configuration when it loads. If your configuration has errors, you’ll see a detailed error message explaining what needs to be fixed.
Valid configuration values:
faction: Must be"alliance","horde", or"both"soundsDir: Must be a string path (if provided)showDescriptionInToast: Must be a boolean (trueorfalse)
If you encounter validation errors, see the Troubleshooting Guide for solutions.
For IDE autocomplete support and schema details, see the Schema Validation Guide.
Using the Plugin
Section titled “Using the Plugin”How It Works
Section titled “How It Works”When Sounds Play
Section titled “When Sounds Play”The plugin plays sounds when:
- Your OpenCode session goes idle
- You stop typing or interacting with OpenCode
- A task completes and OpenCode becomes idle
What You’ll Hear
Section titled “What You’ll Hear”Depending on your faction setting:
Alliance Sounds:
- “Yes, my lord?” (Human)
- “For the Alliance!” (Knight)
- “Your eminence?” (Elf)
- “Aye, laddie!” (Dwarf)
- “What is it?” (Mage)
- “Work complete!” (Peasant)
Horde Sounds:
- “Zug zug!” (Orc)
- “Lok tar!” (Orc)
- “Yes, master?” (Death Knight)
- Dragon roars (Dragon)
- “Huh, what?” (Ogre)
- “D’you call me?” (Troll)
- “Orc work completed!” (Special)
Toast Notifications
Section titled “Toast Notifications”Along with the sound, you’ll see an in-app toast notification showing:
- Title: The Warcraft II voice line (e.g., “Yes, milord?” or “Work, work.”)
- Message: Summary of your last session activity
- Duration: 4 seconds
- Style: Info-style notification in OpenCode
Example:
- Sound plays:
human_selected1.wav - Toast appears:
- Title: “Yes, milord?”
- Message: “Created notification system with sound descriptions”
You can disable toast notifications by setting showDescriptionInToast: false in your configuration.
Sound Factions
Section titled “Sound Factions”Alliance
Section titled “Alliance”The noble Alliance forces include:
Human Units
Section titled “Human Units”- Peasants: Workers and builders
- Footmen: Basic infantry
- Knights: Mounted warriors
- Mages: Spellcasters
Sound Count: 10 selected + 8 acknowledge = 18 sounds
Elven Archers
Section titled “Elven Archers”- Ranged attackers with elegant voices
Sound Count: 4 selected + 4 acknowledge = 8 sounds
Dwarven Demolition Squad
Section titled “Dwarven Demolition Squad”- Explosive experts with Scottish accents
Sound Count: 2 selected + 5 acknowledge = 7 sounds
- Naval units
Sound Count: 4 selected + 3 acknowledge = 7 sounds
Special
Section titled “Special”- Completion sounds: “Work complete!”, “Jobs done!”
Sound Count: 2 sounds
Total Alliance Sounds: ~50 sounds
The mighty Horde forces include:
- Basic warriors with iconic “Zug zug!” and “Lok tar!”
Sound Count: 6 selected + 4 acknowledge = 10 sounds
Death Knights
Section titled “Death Knights”- Dark spellcasters
Sound Count: 2 selected + 3 acknowledge = 5 sounds
Dragons
Section titled “Dragons”- Powerful flying units with roars
Sound Count: 1 selected + 2 acknowledge = 3 sounds
Goblin Sappers
Section titled “Goblin Sappers”- Explosive units
Sound Count: 4 selected + 4 acknowledge = 8 sounds
- Large, powerful units
Sound Count: 4 selected + 3 acknowledge = 7 sounds
Ogre-Mages
Section titled “Ogre-Mages”- Spellcasting ogres
Sound Count: 4 selected + 3 acknowledge = 7 sounds
Trolls
Section titled “Trolls”- Axe-throwing units
Sound Count: 3 selected + 3 acknowledge = 6 sounds
Horde Ships
Section titled “Horde Ships”- Naval units
Sound Count: 4 selected + 3 acknowledge = 7 sounds
Special
Section titled “Special”- Completion sound: “Orc work completed!”
Sound Count: 1 sound
Total Horde Sounds: ~50 sounds
Customization
Section titled “Customization”Changing Factions
Section titled “Changing Factions”You can change factions at any time:
-
Edit your configuration:
Terminal window nano ~/.config/opencode/plugin.json -
Update faction setting:
{"@pantheon-ai/opencode-warcraft-notifications": {"faction": "horde"}} -
Restart OpenCode:
Terminal window opencode
Custom Sound Directory
Section titled “Custom Sound Directory”If you want to use a custom location for sounds:
-
Create your custom directory:
Terminal window mkdir -p /custom/sounds/path -
Copy sounds to custom location:
Terminal window # macOScp -r ~/Library/Application\ Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/* /custom/sounds/path/# Linuxcp -r ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/* /custom/sounds/path/ -
Update configuration:
{"@pantheon-ai/opencode-warcraft-notifications": {"soundsDir": "/custom/sounds/path"}}
Adding Custom Sounds
Section titled “Adding Custom Sounds”You can add your own WAV files:
-
Navigate to sound directory:
Terminal window # macOScd ~/Library/Application\ Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/# Linuxcd ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/ -
Add your WAV files:
Terminal window cp /path/to/your/custom.wav . -
Ensure proper naming:
- Alliance sounds: Start with
human_,knight_,elf_,dwarf_,mage_,peasant_, orship_ - Horde sounds: Start with
orc_,death_knight_,dragon_,goblin_sapper_,ogre_,troll_, orhorde_ship_
- Alliance sounds: Start with
Note: Custom sounds must follow the naming convention to be recognized by the plugin.
Troubleshooting
Section titled “Troubleshooting”Sound Not Playing
Section titled “Sound Not Playing”Problem: No sound when session goes idle
Solutions:
-
Check if sound files exist:
Terminal window # macOSls -la ~/Library/Application\ Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/# Linuxls -la ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/ -
Test audio playback manually:
Terminal window # macOSafplay ~/Library/Application\ Support/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/human_selected1.wav# Linuxcanberra-gtk-play --file ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/alliance/human_selected1.wav -
Check audio output:
- Ensure volume is not muted
- Test with system sounds
- Check audio device settings
-
Reinstall plugin:
Terminal window # Remove plugin cacherm -rf ~/.cache/opencode/node_modules/@pantheon-ai/opencode-warcraft-notifications# Restart OpenCodeopencode
Wrong Faction Playing
Section titled “Wrong Faction Playing”Problem: Horde sounds play when Alliance is configured
Solutions:
-
Check configuration:
Terminal window cat ~/.config/opencode/plugin.jsoncat .opencode/plugin.json -
Verify faction setting:
{"@pantheon-ai/opencode-warcraft-notifications": {"faction": "alliance" // Should match your preference}} -
Check configuration priority:
- Project config (
.opencode/plugin.json) overrides global - Ensure you’re editing the correct file
- Project config (
-
Restart OpenCode:
Terminal window opencode
No Notification Showing
Section titled “No Notification Showing”Problem: Sound plays but no notification appears
Solutions:
macOS:
-
Check notification permissions:
- System Preferences > Notifications
- Find “Script Editor” or “Terminal”
- Enable notifications
-
Test notifications:
Terminal window osascript -e 'display notification "Test" with title "OpenCode"'
Linux:
-
Install notification tools:
Terminal window # Ubuntu/Debiansudo apt-get install libnotify-bin# Fedorasudo dnf install libnotify# Archsudo pacman -S libnotify -
Test notifications:
Terminal window notify-send 'OpenCode' 'Test notification'
Plugin Not Loading
Section titled “Plugin Not Loading”Problem: Plugin doesn’t activate
Solutions:
-
Check OpenCode configuration:
Terminal window cat ~/.config/opencode/opencode.json -
Verify plugin entry:
{"plugin": ["@pantheon-ai/opencode-warcraft-notifications"]} -
Check plugin installation:
Terminal window ls -la ~/.cache/opencode/node_modules/@pantheon-ai/opencode-warcraft-notifications/ -
Reinstall plugin:
Terminal window rm -rf ~/.cache/opencode/node_modules/@pantheon-ai/opencode-warcraft-notificationsopencode
Configuration Not Loading
Section titled “Configuration Not Loading”Problem: Custom configuration is ignored
Solutions:
-
Validate JSON syntax:
Terminal window cat ~/.config/opencode/plugin.json | jq . -
Check file permissions:
Terminal window ls -la ~/.config/opencode/plugin.jsonchmod 644 ~/.config/opencode/plugin.json -
Verify plugin name:
- Must be exactly:
@pantheon-ai/opencode-warcraft-notifications - Check for typos
- Must be exactly:
-
Enable debug logging:
Terminal window DEBUG_OPENCODE=1 opencode
General Questions
Section titled “General Questions”Q: Does this work on Windows?
Section titled “Q: Does this work on Windows?”A: Not yet.
Note: Windows support is planned for a future release. Currently supported: macOS and Linux.
Q: Can I use my own sound files?
Section titled “Q: Can I use my own sound files?”A: Yes! You can add custom WAV files to the sound directory. Make sure they follow the naming convention (see Adding Custom Sounds).
Q: How much disk space do the sounds use?
Section titled “Q: How much disk space do the sounds use?”A: Approximately 50-60 MB for all sounds (both factions).
Q: Does the plugin require internet access?
Section titled “Q: Does the plugin require internet access?”A: No. All sounds are bundled with the plugin. No network access is required after installation.
Q: Can I disable the plugin temporarily?
Section titled “Q: Can I disable the plugin temporarily?”A: Yes. Remove the plugin from your opencode.json configuration and restart OpenCode.
Configuration Questions
Section titled “Configuration Questions”Q: Can I have different factions for different projects?
Section titled “Q: Can I have different factions for different projects?”A: Yes! Use project-specific configuration (.opencode/plugin.json) to set different factions per project.
Q: What happens if I set both project and global configuration?
Section titled “Q: What happens if I set both project and global configuration?”A: Project configuration takes priority over global configuration.
Q: Can I use environment variables instead of configuration files?
Section titled “Q: Can I use environment variables instead of configuration files?”A: Yes. You can use SOUNDS_DATA_DIR to override the sound directory location.
Technical Questions
Section titled “Technical Questions”Q: How does the plugin detect idle sessions?
Section titled “Q: How does the plugin detect idle sessions?”A: The plugin listens for OpenCode’s session.idle event, which is triggered when you stop interacting with the IDE.
Q: Can I see which sound is playing?
Section titled “Q: Can I see which sound is playing?”A: Enable debug mode with DEBUG_OPENCODE=1 to see detailed logging including which sound file is selected.
Q: Does the plugin affect OpenCode performance?
Section titled “Q: Does the plugin affect OpenCode performance?”A: No. The plugin has minimal performance impact (< 10MB memory, < 50ms response time).
Q: How do I update the plugin?
Section titled “Q: How do I update the plugin?”A: See the Maintenance - Updates section in the Deployment Guide for update instructions.
Troubleshooting Questions
Section titled “Troubleshooting Questions”Q: Why do I hear a system sound instead of Warcraft sounds?
Section titled “Q: Why do I hear a system sound instead of Warcraft sounds?”A: This happens when the plugin can’t find the sound files. The plugin falls back to system sounds. Check if sound files exist in the data directory.
Q: Can I test the plugin without waiting for idle?
Section titled “Q: Can I test the plugin without waiting for idle?”A: Currently, the plugin only triggers on idle events. You can test sound playback manually using afplay (macOS) or canberra-gtk-play (Linux).
Q: Where can I report bugs?
Section titled “Q: Where can I report bugs?”A: Report bugs on GitHub Issues.
Getting Help
Section titled “Getting Help”Documentation
Section titled “Documentation”- README: Quick start and overview
- API Documentation: Technical API reference
- Architecture: System design and components
- Development Guide: For contributors
- Deployment Guide: Installation and operations
Community
Section titled “Community”- GitHub Issues: Bug reports and feature requests
- GitHub Discussions: Questions and community support
Contact
Section titled “Contact”- Email: support@pantheon-ai.com
- GitHub: @pantheon-org
Tips and Tricks
Section titled “Tips and Tricks”Tip 1: Quick Faction Switch
Section titled “Tip 1: Quick Faction Switch”Create shell aliases for quick faction switching:
# Add to ~/.bashrc or ~/.zshrcalias wc-alliance='echo "{\"@pantheon-ai/opencode-warcraft-notifications\":{\"faction\":\"alliance\"}}" > ~/.config/opencode/plugin.json'alias wc-horde='echo "{\"@pantheon-ai/opencode-warcraft-notifications\":{\"faction\":\"horde\"}}" > ~/.config/opencode/plugin.json'alias wc-both='echo "{\"@pantheon-ai/opencode-warcraft-notifications\":{\"faction\":\"both\"}}" > ~/.config/opencode/plugin.json'Tip 2: Project-Specific Factions
Section titled “Tip 2: Project-Specific Factions”Use different factions for different types of projects:
# Frontend projects: Alliancecd ~/projects/frontend-appecho '{"@pantheon-ai/opencode-warcraft-notifications":{"faction":"alliance"}}' > .opencode/plugin.json
# Backend projects: Hordecd ~/projects/backend-apiecho '{"@pantheon-ai/opencode-warcraft-notifications":{"faction":"horde"}}' > .opencode/plugin.jsonTip 3: Backup Your Configuration
Section titled “Tip 3: Backup Your Configuration”Keep a backup of your configuration:
cp ~/.config/opencode/plugin.json ~/.config/opencode/plugin.json.backupTip 4: Share Sounds Across Projects
Section titled “Tip 4: Share Sounds Across Projects”Use a shared sound directory for multiple projects:
# Create shared directorymkdir -p ~/shared-warcraft-sounds
# Copy soundscp -r ~/.local/share/opencode/storage/plugin/@pantheon-ai/opencode-warcraft-notifications/sounds/* ~/shared-warcraft-sounds/
# Configure all projects to use shared directoryecho '{"@pantheon-ai/opencode-warcraft-notifications":{"soundsDir":"~/shared-warcraft-sounds"}}' > ~/.config/opencode/plugin.jsonDocument Version: 1.0
Last Updated: 2025-11-10
Maintained By: Pantheon AI Team
“Work complete!” - Warcraft II Peasant
”Zug zug!” - Warcraft II Orc