Get a text when a deploy finishes or fails

Yes. Homing Pigeon (homingpigeon.dev) lets a short shell script run your deploy command and text your phone when it finishes or fails, with how long it took. Your deploy command stays the same, and your coding agent can set it up in the project you already have.

What to tell your agent

Use Homing Pigeon to text me when my deploy finishes or fails, with how long it took.

Your agent asks for your number, you read back the six-digit code, and it does the rest.

How it works in code

Install the command with npm install -g homingpigeondev and verify your phone. Then save this as notify-deploy.sh in your project folder:

#!/bin/sh
app=$(basename "$PWD")
start=$(date +%s)

"$@"
code=$?

secs=$(( $(date +%s) - start ))
took="$((secs / 60))m $((secs % 60))s"
if [ "$code" -eq 0 ]; then
  homingpigeon send "Deploy of $app finished in $took." --idempotency-key "deploy-$app-$start"
else
  homingpigeon send "Deploy of $app failed after $took, exit code $code." --idempotency-key "deploy-$app-$start"
fi
exit "$code"

Make it executable once, then put it in front of the deploy command you already run:

chmod +x notify-deploy.sh
./notify-deploy.sh npm run deploy
./notify-deploy.sh ./deploy.sh production

Good to know

  • The text reads like "Deploy of my-app finished in 3m 12s." or "Deploy of my-app failed after 0m 48s, exit code 1." The name is the folder you run the script from.
  • Your deploy runs exactly as before, with its output in your terminal as it goes. The script then exits with the deploy's own exit code, so CI, a Makefile or another script still sees a failed deploy as failed. If the text cannot be sent, the reason is printed and the exit code stays the deploy's.
  • For steps joined with && or a pipe, wrap them in sh -c, such as ./notify-deploy.sh sh -c 'npm run build && npm run deploy'. Otherwise your shell hands only the first step to the script.
  • A deploy that hangs never finishes, so it never texts you. On Linux, timeout caps how long it can run: ./notify-deploy.sh timeout 30m npm run deploy texts you a failure with exit code 124 if the deploy is still going after 30 minutes.
  • The folder name and start time in the idempotency key give every deploy its own key, so each deploy texts you once, even two from different folders that start in the same second.
  • Verify your phone with homingpigeon verify +15551234567, then again with the six-digit code it texts you. On a CI runner or a server, set HOMINGPIGEON_API_KEY instead. After you verify, homingpigeon key prints it.
  • Messages are limited to 480 characters and go only to the US mobile number you verified. Delivery is not guaranteed, so treat each text as a heads-up.

Get started

Add Homing Pigeon to Claude Code, then ask for what you want:

claude mcp add homingpigeondev -- npx -y homingpigeondev mcp

You get 50 free texts every month, on US mobile numbers. See more use cases.