Get native macOS notifications when Claude Code needs your attention - questions, permissions, idle timeouts, and task completions.
- Different sounds for different notification types (Glass, Sosumi, Purr, Hero)
- Persistent alerts for urgent notifications (questions, permissions)
- Auto-dismiss banners for task completions
- Click to focus - clicking notification brings your terminal to front
- Auto-detects terminal - Works with Ghostty, Zed, iTerm2, Terminal.app, VS Code, Kitty, WezTerm
- Notification grouping - Prevents notification spam
- Smart skip - Won't notify if terminal is already focused
| Event | Sound | Style | When |
|---|---|---|---|
| Question | Glass | Persistent | Claude asks you something |
| Permission | Sosumi | Persistent | Claude needs tool approval |
| Idle | Purr | Persistent (once) | Waiting 60+ seconds |
| Task Done | Hero | Banner | Task completed |
| Subagent Done | Hero | Banner | Background agent finished |
brew install terminal-notifiermkdir -p ~/.claude
curl -o ~/.claude/notify.sh https://gist.githubusercontent.com/YOUR_USERNAME/GIST_ID/raw/notify.sh
chmod +x ~/.claude/notify.shOr manually create ~/.claude/notify.sh with the content from notify.sh.
Edit ~/.claude/settings.json and add the hooks configuration. If the file doesn't exist, create it.
If you already have a settings.json, merge the hooks section from settings-hooks.json into your existing file.
If you don't have one, you can use the hooks file as a starting point:
# Only if you don't have settings.json yet:
cp ~/.claude/settings.json ~/.claude/settings.json.backup 2>/dev/null
curl -o /tmp/hooks.json https://gist.githubusercontent.com/YOUR_USERNAME/GIST_ID/raw/settings-hooks.json
# Then manually merge the hooks into your settings.json- Open System Settings → Notifications
- Find terminal-notifier and enable notifications
- Set Alert Style to Alerts (for persistent notifications)
- Enable Play sound for notifications
# Exit current session
/exit
# Start new session
claudeTest the notification script directly:
# Test question notification
~/.claude/notify.sh "Test question" "Claude Code" "question"
# Test permission notification
~/.claude/notify.sh "Test permission" "Claude Code" "permission"
# Test done notification
~/.claude/notify.sh "Test done" "Claude Code" "done"Edit ~/.claude/notify.sh and modify the sound names. Available macOS sounds:
# List all available sounds
ls /System/Library/Sounds/
# Preview a sound
afplay /System/Library/Sounds/Glass.aiffEdit the case "$TERM_PROGRAM" section in notify.sh to add your terminal's bundle identifier:
# Find your terminal's bundle ID
osascript -e 'id of app "YourTerminalName"'- Check System Settings → Notifications → terminal-notifier is enabled
- Make sure Focus/Do Not Disturb is off
- Check "Play sound for notifications" is enabled in notification settings
- Verify sound name exists:
ls /System/Library/Sounds/
- The script auto-detects your terminal from
$TERM_PROGRAMenvironment variable - If your terminal isn't detected, add it to the case statement in
notify.sh
- Set Alert Style to Alerts (not Banners) in System Settings → Notifications → terminal-notifier
Based on community best practices from:
MIT - Feel free to use, modify, and share!