Native macOS notifications for Claude Code with Ghostty terminal tab focusing
npx claudepluginhub thejustinwalsh/claude-ghostty-notifyNative macOS notifications for Claude Code with Ghostty tab focusing
A Claude Code plugin that delivers native macOS notifications when Claude needs your attention, with smart Ghostty terminal tab focusing.
UNUserNotificationCenter via a lightweight Swift app (not osascript hacks)| Type | Subtitle |
|---|---|
| Permission prompt | "Permission Required" |
| Idle / waiting | "Waiting for Input" |
| Elicitation dialog | "Input Requested" |
| Auth success | "Authenticated" |
| Task stop | "Task Complete" |
xcode-select --install)jq recommended (falls back to python3 if not installed)In Claude Code, run these slash commands:
/plugin marketplace add thejustinwalsh/claude-ghostty-notify
/plugin install ghostty-notify@thejustinwalsh
Or run /plugin and use the Discover tab to find and install it interactively.
The app compiles automatically on your first Claude Code session after install. You'll see a one-time macOS notification permission prompt — click Allow.
To rebuild manually (e.g. after updating):
bash ~/.claude/plugins/cache/claude-ghostty-notify/claude-ghostty-notify/*/install.sh
Three hooks wire into Claude Code's lifecycle:
SessionStart — auto-builds ClaudeNotify.app on first run, then captures the Ghostty terminal UUID for the session via AppleScript, saves it to /tmp/claude-ghostty/<session_id>Notification — on any notification event, waits 3s, checks if you're already focused on that tab, enriches the message with the last tool action from the transcript, then launches ClaudeNotify.app with base64-encoded hook dataUserPromptSubmit — dismisses any pending notifications when you send a new messageThe Swift app (ClaudeNotify.app) runs as an LSUIElement (no dock icon), posts the notification, and handles click-to-focus via AppleScript.
.claude-plugin/
plugin.json # Hook definitions for Claude Code
marketplace.json # Plugin metadata
src/
ClaudeNotify.swift # Notification app source
Info.plist # App bundle config
scripts/
common.sh # Shared utilities (jq/python3 JSON helpers)
ghostty-notify.sh # Notification hook
ghostty-dismiss.sh # Dismiss hook
ghostty-session-start.sh # Session start hook
install.sh # Build & setup script
No notifications appearing?
cat /tmp/claude-notify.logNotifications fire when I'm already looking at the tab?
ghostty-session-start.sh ran: ls /tmp/claude-ghostty/id of focused terminal)jq not found warnings?
brew install jq, or the plugin will fall back to python3Unlicense — public domain