Skip to content

Instantly share code, notes, and snippets.

@alpinevm
Last active November 14, 2025 23:36
Show Gist options
  • Select an option

  • Save alpinevm/eff715f77088352021839d538ea68705 to your computer and use it in GitHub Desktop.

Select an option

Save alpinevm/eff715f77088352021839d538ea68705 to your computer and use it in GitHub Desktop.
Get macos visual notification when claude code finishes a task
#!/usr/bin/env bash
# Depends on terminal-notifier -> https://github.com/julienXX/terminal-notifier
# Setup Details:
# Save this as a bash file
# [in claude code] Call /hooks
# Select STOP
# Paste fully qualified path of bash file
json=$(cat)
cwd=$(printf '%s' "$json" | jq -r '.cwd // .tool_input.cwd // empty')
[ -z "$cwd" ] && cwd="(no cwd field)"
# Strip any trailing slash, then grab last component:
clean=${cwd%/}
last=${clean##*/}
terminal-notifier -title "Claude Code" -subtitle "Finished work on ${last}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment