Send Claude Code hook notifications to ntfy.sh
Project description
claude-code-ntfy-notification-hook
A Claude Code hook that forwards Notification events to an ntfy.sh topic as push notifications.
Installation
pip install claude-code-ntfy-notification-hook
Usage
Configure Claude Code to call send-ntfy-claude-notification as a hook for Notification events. In your Claude Code settings (.claude/settings.json or ~/.claude/settings.json):
{
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "send-ntfy-claude-notification my-ntfy-topic"
}
]
}
]
}
}
Replace my-ntfy-topic with your ntfy.sh topic name.
Configuration
A YAML configuration file can be placed at $XDG_CONFIG_HOME/send-ntfy-claude-notification/config.yaml (typically ~/.config/send-ntfy-claude-notification/config.yaml):
topic: my-ntfy-topic # Default topic (overridden by CLI argument)
server: https://ntfy.sh # ntfy.sh server URL
priority: 3 # 1 (min) – 5 (urgent)
icon: https://upload.wikimedia.org/wikipedia/commons/thumb/b/b0/Claude_AI_symbol.svg/250px-Claude_AI_symbol.svg.png
log_level: WARNING # DEBUG / INFO / WARNING / ERROR / CRITICAL
log_file: "" # Leave empty to log to stdout
Notification type emoji mapping
notification_type |
ntfy.sh emoji tag |
|---|---|
permission_prompt |
warning ⚠️ |
idle_prompt |
hourglass_flowing_sand ⏳ |
auth_success |
white_check_mark ✅ |
elicitation_dialog |
speech_balloon 💬 |
elicitation_complete |
tada 🎉 |
elicitation_response |
incoming_envelope 📨 |
Command-line reference
usage: send-ntfy-claude-notification [-h] [--server SERVER] [--priority {1-5}]
[--icon ICON] [--log-file PATH]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[-v]
[topic]
positional arguments:
topic ntfy.sh topic name (required if not set in config)
options:
--server SERVER ntfy.sh server base URL (default: https://ntfy.sh)
--priority {1-5} Notification priority 1 (min) – 5 (urgent) (default: 3)
--icon ICON Icon URL attached to the notification
--log-file PATH Write logs to this file instead of stdout
--log-level ... Minimum log level (default: WARNING)
-v, --verbose Enable verbose output (overrides --log-level to DEBUG)
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file claude_code_ntfy_notification_hook-1.0.0.tar.gz.
File metadata
- Download URL: claude_code_ntfy_notification_hook-1.0.0.tar.gz
- Upload date:
- Size: 31.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
739eb2107e66663097711edd63066a1d61024453e9b75033261302d89891a251
|
|
| MD5 |
acb13c5c60139a7ca150c3fdf06f023b
|
|
| BLAKE2b-256 |
afee7545fe5554e505b0fddca2741d85a3693da6aa1e9cecd22bd45714b79e7e
|
Provenance
The following attestation bundles were made for claude_code_ntfy_notification_hook-1.0.0.tar.gz:
Publisher:
release.yml on gene1wood/claude-code-ntfy-notification-hook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_ntfy_notification_hook-1.0.0.tar.gz -
Subject digest:
739eb2107e66663097711edd63066a1d61024453e9b75033261302d89891a251 - Sigstore transparency entry: 1541361601
- Sigstore integration time:
-
Permalink:
gene1wood/claude-code-ntfy-notification-hook@4b6c37ce4da78cc461fe92bb917aed21e6b6e9fc -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/gene1wood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b6c37ce4da78cc461fe92bb917aed21e6b6e9fc -
Trigger Event:
push
-
Statement type:
File details
Details for the file claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl.
File metadata
- Download URL: claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl
- Upload date:
- Size: 30.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a873cb7aa731cb2a4c00da367ee216dad1b8f643e5518c96697a3f9c903d9aa1
|
|
| MD5 |
9e6a1df08afc69897fc733805c4d1399
|
|
| BLAKE2b-256 |
f8ad87382edc83ead3bd8908fcd40bf560bd32f5943a9ae824cb9adafc98f5db
|
Provenance
The following attestation bundles were made for claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl:
Publisher:
release.yml on gene1wood/claude-code-ntfy-notification-hook
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl -
Subject digest:
a873cb7aa731cb2a4c00da367ee216dad1b8f643e5518c96697a3f9c903d9aa1 - Sigstore transparency entry: 1541361885
- Sigstore integration time:
-
Permalink:
gene1wood/claude-code-ntfy-notification-hook@4b6c37ce4da78cc461fe92bb917aed21e6b6e9fc -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/gene1wood
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4b6c37ce4da78cc461fe92bb917aed21e6b6e9fc -
Trigger Event:
push
-
Statement type: