Update README with Claude Code configuration instructions and improve notification format

- 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 <noreply@anthropic.com>
This commit is contained in:
Kyle Fang
2025-07-18 09:17:14 +08:00
parent 4a473fbf8f
commit ec61fce85f
2 changed files with 33 additions and 2 deletions

View File

@@ -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=<YOUR_WEBHOOK_URL> /path/to/claude-notification-hook.sh"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "TELERT_WEBHOOK_URL=<YOUR_WEBHOOK_URL> /path/to/claude-notification-hook.sh"
}
]
}
]
}
}
```
Replace `<YOUR_WEBHOOK_URL>` with your actual telert webhook URL and `/path/to/claude-notification-hook.sh` with the full path to where you cloned this repository.
## Usage

View File

@@ -30,7 +30,7 @@ payload=$(cat <<EOF
"event": "Claude Code - $project_name",
"channel": "Terminal",
"emoji": "👋",
"text": "$project_path: $message",
"text": "$message\n\n$project_path",
"notify": true
}
EOF