๐ AI Done Hooks
April 8, 2026 ยท View on GitHub
Get notified when your AI coding assistant finishes generating code
Tired of staring at your screen waiting for Claude, Cursor, or Windsurf to finish? Get instant audio/visual notifications when AI completes its response.
Inspired by USB-Clawd but software-only - no hardware required!
๐ฏ Features
- ๐ Sound notifications when AI finishes
- ๐ฃ๏ธ Voice announcements (macOS)
- ๐ฌ Desktop notifications
- โก Works with Cursor, Windsurf, Kiro, and other AI IDEs
- ๐จ Customizable sounds and messages
- ๐ Zero dependencies - uses built-in OS features
๐ Quick Start
For Kiro
- Create or edit
~/.kiro/hooks/ai-done.json:
{
"name": "AI Done Notification",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
}
- That's it! Next time Kiro finishes, you'll hear a sound.
For Cursor
- Create or edit
~/.cursor/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
]
}
]
}
}
- Restart Cursor or run
/reload
For Windsurf
- Create or edit
~/.windsurf/settings.json:
{
"hooks": {
"onComplete": {
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
}
}
- Restart Windsurf
๐ฆ Installation by OS
macOS
Option 1: Simple Sound
# Copy the config
mkdir -p ~/.kiro/hooks
curl -o ~/.kiro/hooks/ai-done.json https://raw.githubusercontent.com/dinakars777/ai-done-hooks/main/configs/kiro-macos-sound.json
Option 2: Voice Announcement
curl -o ~/.kiro/hooks/ai-done.json https://raw.githubusercontent.com/dinakars777/ai-done-hooks/main/configs/kiro-macos-voice.json
Option 3: Desktop Notification + Sound
curl -o ~/.kiro/hooks/ai-done.json https://raw.githubusercontent.com/dinakars777/ai-done-hooks/main/configs/kiro-macos-full.json
Linux
# Install notification sound (if not present)
sudo apt-get install sound-theme-freedesktop
# Copy the config
mkdir -p ~/.kiro/hooks
curl -o ~/.kiro/hooks/ai-done.json https://raw.githubusercontent.com/dinakars777/ai-done-hooks/main/configs/kiro-linux.json
Windows
# Create directory
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.kiro\hooks"
# Download config
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/dinakars777/ai-done-hooks/main/configs/kiro-windows.json" -OutFile "$env:USERPROFILE\.kiro\hooks\ai-done.json"
๐จ Customization
Change the Sound (macOS)
Available system sounds:
Glass.aiff- Gentle chime (default)Ping.aiff- Quick pingHero.aiff- TriumphantSubmarine.aiff- Sonar pingTink.aiff- Metallic tinkPop.aiff- Bubble popPurr.aiff- Soft purr
Browse all: ls /System/Library/Sounds/
Custom Sound File
{
"name": "AI Done - Custom Sound",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "afplay ~/sounds/my-custom-sound.aiff"
}
}
Voice Announcements
{
"name": "AI Done - Voice",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "say 'Code generation complete!'"
}
}
Fun voice messages:
"say 'Your code is ready, master'""say 'Beep boop, task complete'""say 'I have finished thinking'""say -v Samantha 'All done!'"
Desktop Notification + Sound
{
"name": "AI Done - Full Notification",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "osascript -e 'display notification \"AI has finished generating code\" with title \"Kiro\" sound name \"Glass\"'"
}
}
๐ฏ Advanced Usage
Different Sounds for Success vs Error
Create two hooks:
Success (ai-done-success.json):
{
"name": "AI Done - Success",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "afplay /System/Library/Sounds/Hero.aiff"
}
}
Error (ai-done-error.json):
{
"name": "AI Done - Error",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "afplay /System/Library/Sounds/Basso.aiff"
}
}
Only Notify for Long Tasks
Add a delay check (requires custom script):
#!/bin/bash
# ~/scripts/notify-if-long.sh
DURATION=\$1
if [ $DURATION -gt 10 ]; then
afplay /System/Library/Sounds/Glass.aiff
fi
Send to Slack/Discord
{
"name": "AI Done - Slack",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "curl -X POST -H 'Content-type: application/json' --data '{\"text\":\"AI finished!\"}' YOUR_WEBHOOK_URL"
}
}
Trigger Physical Device
If you have a smart light or USB device:
{
"name": "AI Done - Smart Light",
"version": "1.0.0",
"when": {
"type": "agentStop"
},
"then": {
"type": "runCommand",
"command": "curl http://192.168.1.100/api/light/flash"
}
}
๐ง Troubleshooting
Sound Not Playing (macOS)
-
Check if sound file exists:
ls /System/Library/Sounds/Glass.aiff -
Test sound manually:
afplay /System/Library/Sounds/Glass.aiff -
Check permissions:
chmod +x ~/.kiro/hooks/ai-done.json
Hook Not Triggering
-
Verify hook file location:
ls -la ~/.kiro/hooks/ -
Check JSON syntax:
cat ~/.kiro/hooks/ai-done.json | jq . -
Restart your AI IDE
Linux: No Sound
Install audio player:
# Ubuntu/Debian
sudo apt-get install sox
# Fedora
sudo dnf install sox
# Arch
sudo pacman -S sox
Then use play command instead of afplay.
๐จ Pre-made Configs
All configs are in the configs/ directory:
kiro-macos-sound.json- Simple sound notificationkiro-macos-voice.json- Voice announcementkiro-macos-full.json- Notification + soundkiro-linux.json- Linux notificationkiro-windows.json- Windows notificationcursor-macos.json- Cursor on macOSwindsurf-macos.json- Windsurf on macOS
๐ค Contributing
Have a cool notification idea? Submit a PR!
Ideas we'd love to see:
- Integration with smart home devices
- Haptic feedback (if possible)
- Custom notification sounds
- Platform-specific optimizations
๐ License
MIT
๐ Related Projects
- USB-Clawd - Physical notification device (hardware)
- moody - macOS menu bar mood indicator
- git-time-machine - Visual git reflog browser
Star this repo if it saves you from staring at loading spinners! โญ