universal-notify

TotalClaw 作者 totalclaw

使用单个脚本通过多个渠道发送通知。支持 ntfy.sh(免费,无需注册)、Gotify(自托管)、通用 Webhooks、电子邮件 (SMTP/curl)、Telegram Bot API 和 Pushover。在发送警报、监控通知、部署通知或任何需要通过人员的首选渠道到达人员的事件时使用。具有优先级(低/正常/高/紧急)的统一接口。

安装 / 下载方式

TotalClaw CLI推荐
totalclaw install totalclaw:totalclaw~josunlp-universal-notify
cURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/totalclaw%3Atotalclaw~josunlp-universal-notify/file -o josunlp-universal-notify.md
# Universal Notify

Send notifications via `scripts/notify.sh`:

```bash
# ntfy.sh (free, no auth needed)
scripts/notify.sh --channel ntfy --topic myalerts --message "Disk 90%!" --priority urgent

# Gotify (self-hosted)
scripts/notify.sh --channel gotify --url https://gotify.local --token TOKEN --message "Deploy done"

# Webhook (generic JSON POST)
scripts/notify.sh --channel webhook --url https://hooks.example.com/abc --message "Event fired"

# Email
scripts/notify.sh --channel email --smtp smtp://mail:587 --from a@x.com --to b@y.com --subject "Alert" --message "Check server"

# Telegram
scripts/notify.sh --channel telegram --bot-token BOT:TOK --chat-id 12345 --message "Hello"

# Pushover
scripts/notify.sh --channel pushover --app-token X --user-key Y --message "Alert" --priority high
```

## Common Options

All channels support `--message` (required), `--title` (optional), and `--priority low|normal|high|urgent` (default: normal).

## Requirements

- `curl` (standard on most systems)
- No API keys needed for ntfy.sh — other channels require their respective credentials

---

## 中文说明

# Universal Notify

通过 `scripts/notify.sh` 发送通知:

```bash
# ntfy.sh (free, no auth needed)
scripts/notify.sh --channel ntfy --topic myalerts --message "Disk 90%!" --priority urgent

# Gotify (self-hosted)
scripts/notify.sh --channel gotify --url https://gotify.local --token TOKEN --message "Deploy done"

# Webhook (generic JSON POST)
scripts/notify.sh --channel webhook --url https://hooks.example.com/abc --message "Event fired"

# Email
scripts/notify.sh --channel email --smtp smtp://mail:587 --from a@x.com --to b@y.com --subject "Alert" --message "Check server"

# Telegram
scripts/notify.sh --channel telegram --bot-token BOT:TOK --chat-id 12345 --message "Hello"

# Pushover
scripts/notify.sh --channel pushover --app-token X --user-key Y --message "Alert" --priority high
```

## 通用选项

所有渠道都支持 `--message`(必填)、`--title`(可选)以及 `--priority low|normal|high|urgent`(默认:normal)。

## 要求

- `curl`(大多数系统标配)
- ntfy.sh 无需 API 密钥——其他渠道需要各自的凭据