A TypeScript-based notification system for Claude Code that provides real-time voice and desktop notifications for various hook events - completely self-contained with no external dependencies.
Now with improved activity tracking!
- 🔊 Audio Notifications: Cross-platform sound alerts for Claude Code events
- 🖥️ Desktop Notifications: Native OS notifications (Windows, macOS, Linux)
- 🎯 Context-Aware: Different notifications based on file types and operations
- 🎭 Voice Packs: Support for multiple voice personalities (Alfred, Jarvis, etc.)
- 🔒 Fully Local: No external services required - everything runs on your machine
- 🔧 TypeScript: Type-safe implementation with modern tooling
-
Install dependencies:
npm install
-
Add audio files (optional):
- Place
.wavfiles in.claude/hooks/audio-notifications/sounds/alfred/ - See the audio files README for required files
- System works without audio files (will log "Sound file not found")
- Place
-
Use Claude Code normally - notifications will trigger automatically!
The system listens to three main Claude Code hook events:
-
Task Completion (
stopevent)- Voice: "Task complete" sound
- Desktop: Native OS notification with "Task Complete" message
-
Tool Usage (
pre_tool_useevent)- Voice: Contextual sounds based on operation
- Desktop: Silent by default (configurable)
-
User Input Required (
notificationevent)- Voice: "Permission needed" sound
- Desktop: Native OS notification with "Action Required" message
Run the included test script to verify everything is working:
npm testOr test individual components:
# Test desktop notification
echo {"hook":"stop","event":"stop"} | tsx .claude/hooks/desktop-notifications/handler.ts
# Test voice notification
echo {"hook":"stop","event":"stop"} | tsx .claude/hooks/audio-notifications/handler.tsEdit .claude/settings.json:
{
"env": {
"VOICE_PACK": "jarvis" // Change from "alfred" to "jarvis"
}
}Edit notification behavior in .claude/hooks/desktop-notifications/notification-mapping.json:
sound: Enable/disable notification soundtimeout: How long notification stays visible (seconds)messages: Array of random messages to display
- Add entries to
.claude/hooks/audio-notifications/sound-mapping.json - Place corresponding
.wavfiles in the sounds directory - Restart Claude Code
- Uses Windows native notifications
- Supports notification sounds via Windows API
- Uses macOS Notification Center
- Supports custom notification sounds
- Uses
notify-send(must be installed) - Install:
sudo apt-get install libnotify-bin(Ubuntu/Debian)
Voice Notifications: Desktop Notifications:
Claude Event → Handler.ts → Claude Event → Handler.ts →
Sound Mapping → Play Audio Notification Mapping → OS Native Notification
- No desktop notifications on Linux? Install
libnotify-bin - No audio on Windows? Ensure audio files are in
.wavformat - No audio on Linux? Install
alsa-utilsorpulseaudio-utils - Notifications not appearing? Check OS notification settings
This project is open source and available under the MIT License.