mirror of
https://github.com/zhigang1992/claude-code-notification.git
synced 2026-01-12 16:14:35 +08:00
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:
33
README.md
33
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=<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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user