Skip to main content

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

GPL-3.0-or-later

Metadata

Release files for claude-code-ntfy-notification-hook 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for claude-code-ntfy-notification-hook 1.0.0
File Size Uploaded Provenance
claude_code_ntfy_notification_hook-1.0.0.tar.gz 31.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for claude-code-ntfy-notification-hook 1.0.0
File Interpreter ABI Platform
claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 61.8 kB

Release files / claude_code_ntfy_notification_hook-1.0.0.tar.gz

Download URL claude_code_ntfy_notification_hook-1.0.0.tar.gz
Size 31.7 kB
Tags Source
SHA-256 checksum
How to use checksums
739eb2107e66663097711edd63066a1d61024453e9b75033261302d89891a251
BLAKE2b-256 checksum
How to use checksums
afee7545fe5554e505b0fddca2741d85a3693da6aa1e9cecd22bd45714b79e7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Release files / claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl

Download URL claude_code_ntfy_notification_hook-1.0.0-py3-none-any.whl
Size 30.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a873cb7aa731cb2a4c00da367ee216dad1b8f643e5518c96697a3f9c903d9aa1
BLAKE2b-256 checksum
How to use checksums
f8ad87382edc83ead3bd8908fcd40bf560bd32f5943a9ae824cb9adafc98f5db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

Security for claude-code-ntfy-notification-hook 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for claude_code_ntfy_notification_hook-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 14, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page