Desktop notification when Claude needs your attention — clicking it focuses the exact terminal or IDE where Claude is waiting.
A Claude Code plugin that sends a desktop notification when Claude needs your attention — and when you click it, focuses the exact terminal window or IDE pane where Claude is waiting.
SessionStart hook — saves the terminal app's PID when Claude startsStop / Notification hooks — reads Claude's last message from stdin JSON, rings the TTY bell, and sends a notificationfocus.js reads the saved PID and raises that window using platform-native APIsThe terminal is detected by walking up the PPID chain until a GUI app process is found — no hardcoded terminal names, works universally with any app.
| Platform | Notification | Focus |
|---|---|---|
| macOS | terminal-notifier | click notification → osascript / System Events |
| Linux | dunstify (with click) or notify-send | click notification → xdotool or wmctrl |
| Windows | WinRT via PowerShell (no extra install) | auto-focus when notification fires¹ |
¹ Windows security prevents running code on toast notification click without a registered COM activator. Instead, claude-ping focuses your terminal automatically at the moment the notification is sent.
| App | Notification | Focus |
|---|---|---|
| Ghostty | ✅ | ✅ |
| Zed | ✅ | ✅ |
| VS Code (integrated terminal) | ✅ | ✅ |
| iTerm2 | ✅ | ✅ |
| Terminal.app | ✅ | ✅ |
| WezTerm, Kitty, Alacritty, … | ✅ | ✅ |
No .zshrc or shell config changes needed. The plugin inherits your terminal's environment when hooks run, and uses the full path to your Node.js binary for notification clicks — so PATH is never an issue.
terminal-notifier: brew install terminal-notifierosascript:
System Settings → Privacy & Security → Accessibility → enable for your terminal appdunstify (recommended, for click-to-focus) or notify-sendxdotool (recommended) or wmctrl for window focus/plugin marketplace add prabhavagrawal7/claude-ping
/plugin install claude-ping@prabhavagrawal7
git clone https://github.com/prabhavagrawal7/claude-ping
claude --plugin-dir ./claude-ping
claude-ping/
├── .claude-plugin/
│ └── marketplace.json # marketplace catalog
├── plugin/ # the installable plugin
│ ├── .claude-plugin/
│ │ └── plugin.json # plugin metadata
│ ├── hooks/
│ │ └── hooks.json # SessionStart, SessionEnd, Stop, Notification hooks
│ └── src/
│ ├── notify.js # Stop/Notification hook: parses message, finds PID, notifies
│ ├── focus.js # Notification click handler: focuses the terminal window
│ ├── session-start.js # SessionStart hook: saves terminal PID
│ ├── session-end.js # SessionEnd hook: cleans up
│ ├── pid.js # Cross-platform process tree walker
│ └── platform/
│ ├── darwin.js # macOS: terminal-notifier + osascript
│ ├── linux.js # Linux: dunstify/notify-send + xdotool/wmctrl
│ └── win32.js # Windows: BurntToast + SetForegroundWindow
└── README.md
Every macOS GUI app runs from *.app/Contents/MacOS/*. When a hook fires, pid.js walks up the PPID chain:
hook fires (subprocess of Claude)
→ node → zsh → login → /Applications/Ghostty.app/Contents/MacOS/ghostty
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
detected as GUI app → saved as terminalPid
On Linux it checks /proc/$pid/environ for DISPLAY= or WAYLAND_DISPLAY=.
On Windows it checks MainWindowHandle != 0 via PowerShell.
When you click the notification, focus.js reads the saved PID and calls the platform's focus function — no guessing, no hardcoded app names.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub prabhavagrawal7/claude-ping --plugin claude-pingNative Windows toast notifications for Claude Code with window activation
Smart notifications for Claude Code task statuses (Go implementation)
Desktop notifications showing what Claude Code is working on - stay informed even when the terminal is not in focus. Optional sound alerts and AI summaries
Ultra-compressed communication mode. Cuts ~75% of tokens while keeping full technical accuracy by speaking like a caveman.
Memory compression system for Claude Code - persist context across sessions
Multi-model consensus engine integrating OpenAI Codex CLI, Gemini CLI, and Claude CLI for collaborative code review and problem-solving.