cursor-agent-notify
v1.0.0
Published
macOS notifications when Cursor or Claude Code agents finish (Stop hook installer)
Downloads
135
Maintainers
Readme
cursor-agent-notify
macOS notifications when a Cursor or Claude Code agent run finishes (Stop / stop hook). Cancels are silent (no banner when the run did not complete successfully).
Requirements
- macOS
- Cursor and/or Claude Code with hook support
- Node.js 18+
- terminal-notifier (recommended):
brew install terminal-notifier
If it is missing, the installer triesbrew installwhen Homebrew is available; otherwise notifications fall back toosascript.
Not supported: OpenAI Codex CLI and similar tools without a Stop/stop hook API.
Install
From any directory:
npx cursor-agent-notifyOr clone this repo and run:
node ./bin/install.jsThe installer will:
- Copy
on-agent-stop.shto~/.cursor/hooks/and/or~/.claude/hooks/when the matching config directory exists. - Merge hook JSON (it does not remove your existing hooks; it only adds or updates the
cursor-agent-notifyentry). - Create
~/.config/cursor-agent-notify/config.shon first run (never overwrites an existing file).
Restart Cursor and/or Claude Code after installation.
Customize messages (English by default)
Edit:
~/.config/cursor-agent-notify/config.shMESSAGES_WITH_QUERY— use the placeholder__QUERY__where the last user question should appear.MESSAGES_WITHOUT_QUERY— used when no short query was detected.NOTIFICATION_TITLE— notification title.OPEN_URL— URL opened when you click the notification (default: Cursor Glass deeplink). Set to empty to disable.CURSOR_BUNDLE_ID/CURSOR_APP_ICON— only applied when Cursor is installed under/Applications/Cursor.app.
Uninstall
- Remove the hook entry from
~/.cursor/hooks.json(stop→ command./hooks/on-agent-stop.sh) and delete~/.cursor/hooks/on-agent-stop.shif you no longer need it. - In
~/.claude/hooks/hooks.json, remove theStopblock whosedescriptioncontainscursor-agent-notify, and delete~/.claude/hooks/on-agent-stop.shif desired. - Optionally remove
~/.config/cursor-agent-notify/.
npm publish
npm login
npm publish --access publicLicense
MIT
