Closed2
Claude Code Hooksで通知音設定(Mac)

claude
コマンドを叩いて /hooks
スラッシュコマンドを実行。
Notification, Stopイベントに対して以下のコマンドを設定。
afplay /System/Library/Sounds/Glass.aiff
最後に User Settings
を選択。
~/.claude/settings.json
はこうなる:
~/.claude/settings.json
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "afplay /System/Library/Sounds/Glass.aiff"
}
]
}
]
}
}

memo item2 で通知センターに通知するように
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Codeが許可を求めています\" with title \"Claude Code\" subtitle \"確認待ち\" sound name \"Glass\"'"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"タスクが完了しました\" with title \"Claude Code\" subtitle \"処理終了\" sound name \"Hero\"'"
}
]
}
]
}
}
このスクラップは2ヶ月前にクローズされました