Notification dispatcher for Claude Code hooks. Reads JSON from stdin, fans out to all configured notification channels concurrently. Single static binary, compiled-in plugins, TOML configuration.
Claude Code has notification hooks that run a shell command when the agent needs your attention. Most people write a bash script that curls ntfy or sends a desktop notification. That works fine for one channel on one machine.
It gets annoying when you want notifications on your phone and your desktop, or you move to a different OS and have to rewrite the script, or you want high priority for errors but low priority for routine updates.
claude-notifier is a single binary that handles all of that:
- Sends to multiple channels from one hook (ntfy, desktop, Slack, etc.)
- Same binary and config file across Linux, macOS, and Windows
- Always exits 0 so it never breaks your hook
claude-notifier init, edit the TOML, you're done
brew install felipeelias/tap/claude-notifierDownload the .deb from GitHub Releases and install:
sudo dpkg -i claude-notifier_*.debDownload the .rpm from GitHub Releases and install:
sudo rpm -i claude-notifier_*.rpmPre-built binaries for macOS, Linux, and Windows (amd64 and arm64) are available on the GitHub Releases page. Download the archive for your platform, extract it, and place the binary in your PATH.
Requires Go 1.24+.
go install github.com/felipeelias/claude-notifier@latestInitialize the config file:
claude-notifier initThis creates ~/.config/claude-notifier/config.toml. Edit it to configure your notification channels.
Add to your Claude Code settings (~/.claude/settings.json):
{
"hooks": {
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "claude-notifier"
}
]
}
]
}
}Or install the Claude plugin which configures the hook automatically.
Run claude-notifier init to generate a config file with all available options documented. See config.example.toml for the full reference.
Plugins that support Go templates (like ntfy) have access to the following variables from the Claude Code Notification hook payload:
| Variable | Source |
|---|---|
{{.Message}} |
Notification message from Claude |
{{.Title}} |
Notification title from Claude |
{{.Project}} |
Project name (last segment of cwd) |
{{.Cwd}} |
Working directory |
{{.NotificationType}} |
permission_prompt, idle_prompt, auth_success, elicitation_dialog |
{{.SessionID}} |
Claude Code session ID |
{{.TranscriptPath}} |
Path to conversation transcript |
Plugins can also define custom variables via their config (e.g., [notifiers.ntfy.vars]). User-defined keys are title-cased for template access (env becomes {{.Env}}).
The primary use case is as a Claude Code hook — it reads JSON from stdin and dispatches to all configured notifiers:
echo '{"message":"Build complete","title":"Claude Code"}' | claude-notifier| Command | Description |
|---|---|
claude-notifier |
Read JSON from stdin, dispatch to all notifiers |
claude-notifier init |
Create default config file |
claude-notifier test |
Send a test notification to all notifiers |
claude-notifier --version |
Print version |
| Flag | Env | Description |
|---|---|---|
--config, -c |
CLAUDE_NOTIFIER_CONFIG |
Path to config file (default: ~/.config/claude-notifier/config.toml) |
Each plugin is configured under [[notifiers.<name>]] in the config file. Run claude-notifier init to generate a config with all plugins and their options documented.
| Plugin | Description |
|---|---|
| ntfy | HTTP-based push notifications |
| terminal-notifier | macOS desktop notifications |
Want to add a plugin? See CONTRIBUTING.md.
- Telegraf by InfluxData — plugin architecture, TOML config with
[[section]]arrays, and theinit()registry pattern - ntfy by Philipp C. Heckel — simple, self-hostable push notifications
MIT