Cursor
Get a push when Cursor’s Agent finishes a task — set up once per project or globally.
Before you start
- Shared
trigv-notify.shscript installed and tested TRIGV_API_KEYin your shell — add to~/.zshrcand restart Cursor- Cursor with hooks enabled: Cursor Settings → search Hooks
Step 1 — Create the hook script
In your project, create .cursor/hooks/trigv-stop.sh:
Code
#!/usr/bin/env bash
set -euo pipefail
INPUT=$(cat)
WORKSPACE=$(echo "$INPUT" | jq -r '.workspace_roots[0] // .cwd // "project"' 2>/dev/null || echo "project")
BASENAME=$(basename "$WORKSPACE")
"${HOME}/.local/bin/trigv-notify.sh" \
"Cursor: ${BASENAME} ready" \
"Agent finished — review in Cursor" || true
exit 0 Run: chmod +x .cursor/hooks/trigv-stop.sh
Step 2 — Register the hook
Create or edit .cursor/hooks.json in your project root:
Code
{
"version": 1,
"hooks": {
"stop": [
{ "command": ".cursor/hooks/trigv-stop.sh" }
]
}
} Step 3 — Test
- Restart Cursor (so it picks up
TRIGV_API_KEY). - Run an Agent task and wait for it to finish.
- Check your phone — and Cursor’s Hooks output panel if nothing fires.
All projects (optional)
Use ~/.cursor/hooks.json and ~/.cursor/hooks/trigv-stop.sh instead of project files.