Webhook → phone

Send any webhook to your phone.

If it can write to stdout or call a shell command, it can send you an encrypted push notification. No app, no bot, no dashboard.

The pattern

Nerve CLI reads stdin and sends it as an encrypted signal. This means anything that produces text can become a phone notification:

echo "anything" | nerve send

That's the whole API. Everything else is just piping different sources into it.

Script output

# Send the output of any command
./deploy.sh 2>&1 | tail -5 | nerve send

# Send on failure only
./backup.sh || echo "backup failed on $(hostname)" | nerve send --severity critical

Curl response

# Forward API response to your phone
curl -s https://api.example.com/status | jq -r '.message' | nerve send

# Alert on non-200
HTTP=$(curl -s -o /dev/null -w "%{http_code}" https://api.example.com/health)
[ "$HTTP" != "200" ] && echo "API returned $HTTP" | nerve send --severity critical

Log file watcher

# Send every error line from a log to your phone
tail -F /var/log/app/error.log | while read -r line; do
  echo "$line" | nerve send --severity alert
done

JSON webhook bridge

If a service sends JSON webhooks, you can run a tiny HTTP listener that forwards them to Nerve.

#!/bin/bash
# Mini webhook receiver using netcat
# Listen on port 9999, extract body, send to Nerve
while true; do
  REQUEST=$(nc -l -p 9999 -q 1)
  BODY=$(echo "$REQUEST" | sed -n '/^\r$/,$p' | tail -n +2)
  if [ -n "$BODY" ]; then
    echo "$BODY" | jq -r '.text // .message // .summary // .' 2>/dev/null | nerve send
  fi
done

Git push hook

# .git/hooks/post-push or server-side post-receive
#!/bin/bash
export NERVE_DSN="nerve://TOKEN:[email protected]"
echo "Push: $(git log -1 --pretty='%s') to $(git rev-parse --abbrev-ref HEAD)" | nerve send

Makefile target

notify:
	@echo "Build complete: $(PROJECT)" | nerve send

deploy: build
	./deploy.sh || (echo "deploy FAILED" | nerve send --severity critical && exit 1)
	@echo "Deployed $(PROJECT)" | nerve send

Systemd ExecStartPost

[Service]
ExecStart=/usr/local/bin/my-app
ExecStartPost=/bin/sh -c 'echo "my-app started on $(hostname)" | nerve send'
ExecStopPost=/bin/sh -c 'echo "my-app stopped on $(hostname)" | nerve send --severity alert'

Why not a raw curl webhook?

Raw webhookSends plaintext to a server. The server reads your data. A leaked URL = anyone can read or post.
Nerve sendEncrypts locally before sending. The relay sees ciphertext. A leaked DSN can only send into one pipe, not read.

Quick start

go install github.com/nerve-ink/nerve-cli/cmd/nerve@latest
export NERVE_DSN="nerve://TOKEN:[email protected]"
echo "your first signal" | nerve send

FAQ

How do I send a webhook notification to my phone?

Pipe any text to nerve send. It works with echo, curl output, script results, or any command that writes to stdout.

Can I receive JSON webhooks on my phone?

Yes. Pipe the JSON through jq to extract the fields you care about, then send the formatted text to Nerve.

Is this like Pushover or ntfy?

Similar concept, but Nerve encrypts the payload before it leaves your machine and the sender token cannot read history.