bark-push

Send push notifications to iOS devices via Bark. Use when you need to send a push notification to user's iPhone. Triggered by phrases like "send a notification", "push to phone", "bark notify", or when explicitly asked to send a push.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "bark-push" with this command: npx skills add DeAntiWang/bark-push

Bark Push Notification

Send push notifications to iOS via Bark API.

Setup

1. 环境变量配置

Bark API endpoint: https://api.day.app/{device_key}

Device key 可以从以下环境变量读取 (按优先级):

  1. BARK_KEY
  2. BARK_DEVICE_KEY (OpenClaw 默认配置)

配置方式 (在 ~/.zshrc 中):

export BARK_KEY="你的Bark设备Key"

2. 验证配置

# 测试发送通知
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "测试" -b "Bark推送配置成功!"

使用方式

方式一:使用 Shell 脚本 (推荐)

# 基本用法
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "标题" -b "内容"

# 指定铃声
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "提醒" -b "时间到了" -s alarm

# 角标 + 跳转URL
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "新消息" -b "你有一条未读消息" -B 1 -u "https://example.com"

# 使用指定key (不依赖环境变量)
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -k "your_device_key" -t "标题" -b "内容"

# 设置分组
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "标题" -b "内容" -g "myapp"

# 紧急通知
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "警告" -b "请立即处理!" -l critical

方式二:使用 Node.js 脚本

# 基本用法
node ~/.openclaw/workspace/skills/bark-push/scripts/bark-send.js \
    -t "标题" -b "内容"

# 指定铃声
node ~/.openclaw/workspace/skills/bark-push/scripts/bark-send.js \
    -t "提醒" -b "时间到了" -s alarm

方式三:直接使用 curl

# 简单推送
curl "https://api.day.app/$BARK_KEY/标题/内容"

# 带参数
curl -X POST "https://api.day.app/$BARK_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "title": "标题",
    "body": "内容",
    "sound": "alarm",
    "badge": 1,
    "group": "myapp"
  }'

脚本参数说明

参数简写说明默认值
--title-t推送标题 (必填)-
--body-b推送内容 (必填)-
--key-kBark设备Key$BARK_KEY
--sound-s铃声名称default
--badge-B角标数字-
--url-u点击跳转URL-
--group-g分组名称-
--level-l通知级别-
--image-i图片URL-
--subtitle-S副标题-
--help-h显示帮助-

通知级别 (level)

说明
passive不显示,不震动,不播放声音
active显示但不震动
timeSensitive定时敏感,24小时内可撤
critical强制响铃 (需要权限)

常用铃声 (sound)

铃声名称说明
default系统默认
alarm警报
alarm闹钟
bird鸟叫
bell门铃
cha_ching金币
doorbell门铃
droplet水滴
horn喇叭
light轻提示
mail邮件
rimba节奏
siren警笛
spinebreak震撼
spring弹簧
streak短信
sword剑士
tip提示
minut铃声

在 OpenClaw 中使用

在 OpenClaw 中可以直接调用脚本发送通知:

# 简单通知
~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
    -t "提醒" -b "任务完成!"

# 发送失败通知 (在脚本中使用)
if [ $? -ne 0 ]; then
    ~/.openclaw/workspace/skills/bark-push/scripts/bark-send.sh \
        -t "错误" -b "备份失败,请检查!" -l critical
fi

故障排除

发送失败

  1. 检查 BARK_KEY 是否正确: echo $BARK_KEY
  2. 测试网络连接: ping api.day.app
  3. 查看详细错误: 添加 -v 或检查返回的 JSON

通知不响

  1. 检查手机设置 → 通知 → Bark
  2. 检查是否开启声音和震动
  3. 尝试使用不同的 sound 参数

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

HTML to Markdown

Convert HTML↔Markdown for web clipping, clean notes, and batch content migration. Use when users ask 网页转Markdown/Markdown转HTML/批量转换. Supports local files, UR...

Registry SourceRecently Updated
Coding

Podfetcher Tools

Search podcasts, browse episodes, and fetch podcast transcripts from Podfetcher using the bundled Node.js CLI, SDK, or MCP server.

Registry SourceRecently Updated
Coding

test

Extract and categorize expenses from receipts or statements, map to GL codes, check compliance with policies, and flag anomalies for review.

Registry SourceRecently Updated
Coding

CEO Master

Transforms the agent into a strategic CEO and orchestrator. Vision, decision-making, resource allocation, team dispatch, scaling playbook from €0 to €1B. Use...

Registry SourceRecently Updated