1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Claude Code] 作業が終わったら音だけでなくバナー通知を出す

Last updated at Posted at 2025-07-08

はじめに

Claude Codeで作業が完了したときに音で知らせる設定について書かれた記事は多数ありますが、デスクトップ通知を表示する方法についての情報があまり見当たらなかったため、この記事を書きます。
オフィスで仕事をしている場合は自分のPCから通知音をむやみに出しづらいですよね。そんなとき画面にバナー通知が出ると嬉しいです。

設定方法

Claude Code の /hooks に MacOS 向けの terminal-notifier コマンドを指定して、作業完了時にデスクトップ通知を表示します。

terminal-notifier のインストール

※ homebrew はあらかじめ入っている前提

brew install terminal-notifier

Claude Code の設定

いずれかの設定ファイルに設定を記載します。

  • ユーザー全体設定: ~/.claude/settings.json
  • プロジェクト共有設定: .claude/settings.json
  • プロジェクト個人設定: .claude/settings.local.json

具体的な記載は以下です。

{
  "hooks": {
    "Notification": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "terminal-notifier -title 'Claude Code' -message '確認して!' -sound default"
          }
        ]
      }
    ]
  }
}

これで ClaudeCode の作業が完了もしくはこちらの承認待ちになった際、以下のような通知が来ます。

image.png

.claude/settings.json を直接編集するのではなく、ClaudeCode を起動して /hooks コマンドから指示の通りに入力する方法でも設定可能です。

  • /hooks コマンド実行
  • Notification - When notifications are sent を選択
  • + Add new hook… を選択
  • 任意のコマンドを入力

通知設定

MacOSの設定で terminal-notifer からの通知を許可しておく必要があります。

image.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?