- Добавляем в ~/.claude/settings.json:
{
...
"hooks": {
"PostToolUse": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/Users/username/.claude/notify.sh"
}
]
}
],
"Notification": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "/Users/username/.claude/notify-approval.sh"
}
]
}
],
"Stop": [
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Code session completed\" with title \"Claude Code\" sound name \"Glass\"'"
}
]
}
]
},
...
}-
Кладем файлы в /Users/username/.claude/
-
Делаем их исполняемыми
chmod +x /Users/username/.claude/notify.sh
chmod +x /Users/username/.claude/notify-approval.shНе забыть: System Preferences —> Notifications —> iTerm —> Show previews: заменяем Default на Always