From ec61fce85f4ef3a03dbc59010987425462dabb62 Mon Sep 17 00:00:00 2001 From: Kyle Fang Date: Fri, 18 Jul 2025 09:17:14 +0800 Subject: [PATCH] Update README with Claude Code configuration instructions and improve notification format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add detailed setup instructions for ~/.claude/settings.json - Remove duplicate information from notification text - Move project path to the end of the message on its own line 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- README.md | 33 ++++++++++++++++++++++++++++++++- claude-notification-hook.sh | 2 +- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6a63b85..5040b91 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,38 @@ A bash script that sends notifications to [telert.reily.app](https://telert.reil chmod +x claude-notification-hook.sh ``` -4. Configure Claude Code to use this hook by adding it to your settings. +4. Configure Claude Code to use this hook by editing `~/.claude/settings.json`: + + ```json + { + "hooks": { + "Notification": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "TELERT_WEBHOOK_URL= /path/to/claude-notification-hook.sh" + } + ] + } + ], + "Stop": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "TELERT_WEBHOOK_URL= /path/to/claude-notification-hook.sh" + } + ] + } + ] + } + } + ``` + + Replace `` with your actual telert webhook URL and `/path/to/claude-notification-hook.sh` with the full path to where you cloned this repository. ## Usage diff --git a/claude-notification-hook.sh b/claude-notification-hook.sh index 5528a19..8e3a4cc 100755 --- a/claude-notification-hook.sh +++ b/claude-notification-hook.sh @@ -30,7 +30,7 @@ payload=$(cat <