Skip to content

Quick Reference

// ~/.config/opencode/opencode.json or .opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@pantheon-ai/opencode-warcraft-notifications"]
}
// ~/.config/opencode/plugin.json or .opencode/plugin.json
{
"@pantheon-ai/opencode-warcraft-notifications": {
"faction": "alliance" // or "horde" or "both"
}
}
{
"@pantheon-ai/opencode-warcraft-notifications": {
"soundsDir": "/custom/path/to/sounds",
"faction": "both"
}
}

Terminal window
# Install dependencies
bun install
# Run tests
bun test
# Run tests with coverage
bun test --coverage
# Watch mode
bun test --watch
# Type checking
bun run type-check
# Linting
bun run lint
# Format code
bun run format
# Check formatting
bun run format:check
# Clean build artifacts
bun run clean
# Build
bun run build
# Development mode
bun run dev
Terminal window
# Test specific file
bun test src/sounds.test.ts
# Test with pattern
bun test --test-name-pattern="faction"
# Verbose output
bun run test:verbose
Terminal window
# Navigate to docs directory
cd docs
# Install dependencies
bun install
# Start dev server
bun run dev
# Build documentation
bun run build
# Preview build
bun run preview

FileLocationPurpose
OpenCode Config~/.config/opencode/opencode.jsonGlobal OpenCode configuration
Plugin Config~/.config/opencode/plugin.jsonGlobal plugin configuration
Project OpenCode Config.opencode/opencode.jsonProject-specific OpenCode config
Project Plugin Config.opencode/plugin.jsonProject-specific plugin config
PlatformDefault Location
macOS~/Library/Application Support/opencode/storage/plugin/opencode-warcraft-notifications/sounds/
Linux~/.local/share/opencode/storage/plugin/opencode-warcraft-notifications/sounds/
Windows%APPDATA%\opencode\storage\plugin\opencode-warcraft-notifications\
<data-directory>/
├── alliance/
│ ├── human_selected1.wav
│ ├── human_acknowledge1.wav
│ ├── elf_selected1.wav
│ ├── dwarf_selected1.wav
│ ├── knight_selected1.wav
│ ├── mage_selected1.wav
│ ├── peasant_selected1.wav
│ ├── ship_selected1.wav
│ ├── work_completed.wav
│ └── jobs_done.wav
└── horde/
├── orc_selected1.wav
├── orc_acknowledge1.wav
├── death_knight_selected1.wav
├── dragon_selected1.wav
├── goblin_sapper_selected1.wav
├── ogre_selected1.wav
├── ogre_mage_selected1.wav
├── troll_selected1.wav
├── horde_ship_selected1.wav
└── orc_work_completed.wav

VariablePurposeDefault
DEBUG_OPENCODEEnable debug loggingfalse
SOUNDS_DATA_DIROverride data directoryPlatform-specific
SOUNDS_BASE_URLLegacy: Base URL for downloadsN/A (bundled)
Terminal window
# Enable debug mode
DEBUG_OPENCODE=1 opencode
# Custom data directory
SOUNDS_DATA_DIR=/custom/path opencode

import { getRandomSoundPathFromFaction } from './sounds.js';
// Get random sound from faction
const soundPath = getRandomSoundPathFromFaction('alliance');
// Returns: '/path/to/data/alliance/human_selected1.wav'
// Get random sound from both factions
const anySoundPath = getRandomSoundPathFromFaction('both');
import { loadPluginConfig } from './plugin-config.js';
// Load plugin configuration
const config = await loadPluginConfig('@pantheon-ai/opencode-warcraft-notifications');
// Returns: { faction?: 'alliance' | 'horde' | 'both', soundsDir?: string }
import { soundExists } from './sounds.js';
// Check if sound exists
const exists = await soundExists('human_selected1.wav', 'alliance');
// Returns: boolean
import { installBundledSoundsIfMissing } from './bundled-sounds.js';
// Install bundled sounds if missing
await installBundledSoundsIfMissing('/custom/data/dir');

{
"@pantheon-ai/opencode-warcraft-notifications": {
"faction": "both",
"soundsDir": "/custom/path/to/sounds"
}
}
interface WarcraftNotificationConfig {
/** Which faction sounds to use */
faction?: 'alliance' | 'horde' | 'both';
/** Custom directory for sound files */
soundsDir?: string;
}

Configuration is validated using Zod:

const WarcraftNotificationConfigSchema = z.object({
soundsDir: z.string().optional(),
faction: z.enum(['alliance', 'horde', 'both']).optional(),
});

Terminal window
# Check sound files exist
ls -la ~/.local/share/opencode/storage/plugin/opencode-warcraft-notifications/sounds/
# Reinstall plugin
cd ~ && sed -i.bak '/"@pantheon-ai\/opencode-warcraft-notifications"/d' .cache/opencode/package.json
rm -rf .cache/opencode/node_modules/@pantheon-ai/opencode-warcraft-notifications
opencode
Terminal window
# Verify configuration file
cat ~/.config/opencode/plugin.json
# Check for validation errors
DEBUG_OPENCODE=1 opencode
Terminal window
# Test audio manually
afplay /System/Library/Sounds/Glass.aiff
# Check permissions
ls -la ~/Library/Application\ Support/opencode/
Terminal window
# Test audio manually
canberra-gtk-play --id=message
# Install audio tools if missing
sudo apt-get install libcanberra-gtk-module

Terminal window
# Play sound
afplay /path/to/sound.wav
# Show notification
osascript -e 'display notification "message" with title "title"'
# Check data directory
ls -la ~/Library/Application\ Support/opencode/storage/plugin/opencode-warcraft-notifications/sounds/
Terminal window
# Play sound
canberra-gtk-play --id=message
# Show notification
notify-send 'title' 'message'
# Check data directory
ls -la ~/.local/share/opencode/storage/plugin/opencode-warcraft-notifications/sounds/

Terminal window
git checkout main
git pull upstream main
git checkout -b feature/your-feature-name
Terminal window
# Stage changes
git add .
# Commit with conventional commit message
git commit -m "feat(sounds): add rare sound category"
# Push to fork
git push origin feature/your-feature-name
  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes
  • refactor: Code refactoring
  • test: Test changes
  • chore: Maintenance tasks
  • perf: Performance improvements

WorkflowTriggerPurpose
PR ValidationPull requestRun tests and linting
Smart Version BumpPush to mainDetermine version bump
Release & PublishVersion bump PR mergedCreate release and publish
Auto-Merge BotPR approvedAuto-merge approved PRs
Cleanup Merged BranchesBranch mergedDelete merged branches
Cleanup Old ReleasesScheduleRemove old releases
Deploy DocsPush to mainDeploy documentation
Terminal window
# Trigger workflow manually (GitHub CLI)
gh workflow run smart-version-bump.yml
# View workflow runs
gh run list
# View workflow details
gh run view <run-id>


ShortcutAction
/Focus search
Ctrl/Cmd + KOpen command palette
EscClose search/modals

“Work complete!” - Warcraft II Peasant
”Zug zug!” - Warcraft II Orc

Last Updated: 2025-11-11