在Codex完成任务后发送Bark(day.app)推送通知,适用于Codex或Claude运行结束,或需要在任务完成时通知的场景。
Send a Bark push notification after each Codex task. Use the helper script to resolve the project name and post to the Bark API.
You can add the following lines to ~/.bashrc (Linux) or ~/.zshrc (macOS) to set environment variables:
text
export CODEX_MACHINE_NAME="Machine-name" # e.g., Macbook
export CODEX_BARK_KEY="" # https://api.day.app/<CODEX_BARK_KEY>/
export CODEX_BARK_BASE_URL="https://api.day.app"
For example, you can add this instruction to AGENTS.md:
Use skill bark-notify to notify users when each agent run is finished or when any notifications would be sent to users.
To override the folder name, define a project name in AGENTS.md using one of:
project_name: My Project (or name:)Project Name: My Project or 项目名称:我的项目If no name is found, the script uses the project folder name.
success, failed, partial, blocked, etc.Run:
bash
python3 ~/.codex/skills/bark-notify/scripts/send_bark_notification.py \
--task-title \"...\" \
--status \"success\" \
--summary \"...\" \
--project-name \"...\"
scripts/send_bark_notification.py: Send the Bark notification and resolve the project name.