Trigv home

Search docs

Getting started
  • Overview
  • How Trigv works
Help
  • Send test
  • API keys
  • Channels
  • Image attachments
Guides
  • All guides
  • cURL
  • Laravel
  • AI coding agents
  • Cursor
  • Claude Code
  • OpenAI Codex
  • Other agents
SDKs
  • All SDKs
  • JavaScript
  • Python
  • PHP
  • Go
  • Ruby
  • CLI
API reference
  • API overview
  • POST /api/v1/events
  • Errors & rate limits
  • API security
More
  • OpenAPI spec
Open in ChatGPT ↗ Ask questions about this page Open in Claude ↗ Ask questions about this page Open Markdown https://trigv.com/docs-md/learn/claude-code.md

Claude Code

Notify when Claude Code finishes a session — or when it needs permission or your input.

Before you start

  • Shared trigv-notify.sh script
  • export TRIGV_API_KEY=trgv_… in ~/.zshrc or ~/.bashrc

Step 1 — Create the hook script

Create ~/.claude/hooks/trigv-stop.sh:

Code
#!/usr/bin/env bash
set -euo pipefail

INPUT=$(cat)
CWD=$(echo "$INPUT" | jq -r '.cwd // empty')
NAME=$(basename "${CWD:-claude}")

TRIGV_LEVEL=success "${HOME}/.local/bin/trigv-notify.sh" \
	"Claude: ${NAME} done" \
	"Session finished — open terminal to review"

Run: chmod +x ~/.claude/hooks/trigv-stop.sh

Step 2 — Add hooks to settings

Edit ~/.claude/settings.json:

Code
{
	"hooks": {
		"Stop": [{
			"hooks": [{
				"type": "command",
				"command": "~/.claude/hooks/trigv-stop.sh",
				"async": true
			}]
		}],
		"Notification": [{
			"matcher": "permission_prompt|idle_prompt",
			"hooks": [{
				"type": "command",
				"command": "TRIGV_LEVEL=warning ~/.local/bin/trigv-notify.sh 'Claude: needs you' 'Waiting for input'",
				"async": true
			}]
		}]
	}
}

Step 3 — Test

  1. Start a Claude Code session and let it complete a task.
  2. For Notification, trigger a permission prompt and check your phone.

Team projects

You can put .claude/settings.json in a repo — don’t commit API keys; each developer uses their own TRIGV_API_KEY.

Claude Code hooks guide →

Previous Cursor Next OpenAI Codex

On this page

    Native push alerts for developers. Send alerts from webhooks, cron jobs, and scripts. We deliver alerts to your devices, but don't keep the message or notification history on our servers.

    Follow @trigvapp →

    Built by Harish Chouhan

    Product

    • Features
    • How it works
    • Pricing
    • Docs
    • Integrations
    • SDKs
    • API
    • Full LLMs text

    Company

    • About
    • Support
    • Changelog

    Legal

    • Terms & Conditions
    • Privacy Policy
    • Cookie Policy
    • API Security
    All systems ok. Get back to coding.

    © 2026 Webtions OU (dba Trigv)