You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quick reference guide for common tasks and commands
Installation & Setup
Install Plugin
// ~/.config/opencode/opencode.json or .opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@pantheon-ai/opencode-warcraft-notifications"]
}
Configure Faction
// ~/.config/opencode/plugin.json or .opencode/plugin.json
{
"@pantheon-ai/opencode-warcraft-notifications": {
"faction": "alliance"// or "horde" or "both"
}
}
# 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
Testing Specific Modules
# Test specific file
bun test src/sounds.test.ts
# Test with pattern
bun test --test-name-pattern="faction"# Verbose output
bun run test:verbose
Documentation
# Navigate to docs directorycd docs
# Install dependencies
bun install
# Start dev server
bun run dev
# Build documentation
bun run build
# Preview build
bun run preview
import{getRandomSoundPathFromFaction}from'./sounds.js';// Get random sound from factionconstsoundPath=getRandomSoundPathFromFaction('alliance');// Returns: '/path/to/data/alliance/human_selected1.wav'// Get random sound from both factionsconstanySoundPath=getRandomSoundPathFromFaction('both');
interfaceWarcraftNotificationConfig{/** Which faction sounds to use */faction?: 'alliance'|'horde'|'both';/** Custom directory for sound files */soundsDir?: string;}
# Test audio manually
afplay /System/Library/Sounds/Glass.aiff
# Check permissions
ls -la ~/Library/Application\ Support/opencode/
Linux Audio Issues
# Test audio manually
canberra-gtk-play --id=message
# Install audio tools if missing
sudo apt-get install libcanberra-gtk-module
Platform-Specific Commands
macOS
# 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/
Linux
# 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/
Git Workflow
Create Feature Branch
git checkout main
git pull upstream main
git checkout -b feature/your-feature-name