aboutsummaryrefslogtreecommitdiff
path: root/claude-templates/bin
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-02 18:03:28 -0500
committerCraig Jennings <c@cjennings.net>2026-06-02 18:03:28 -0500
commitcfaff12c2425c0e28953981e5b06b54fd60e25cf (patch)
tree645fa2a72e09b3094ea19fcc17675d37c656e9cf /claude-templates/bin
parent671fbe91336be6e193219840cfc076a4e645bc2e (diff)
downloadrulesets-cfaff12c2425c0e28953981e5b06b54fd60e25cf.tar.gz
rulesets-cfaff12c2425c0e28953981e5b06b54fd60e25cf.zip
feat(page-signal): route pages through a dedicated Signal pager account
Paging never actually reached the phone before. signal-cli was registered as my primary number, so a page was that account messaging itself, and Signal mobile doesn't push-notify a self-message. I registered signal-cli with a separate Google Voice number (profile "Claude Pager") and pointed everything at it. page-signal now sends from that account to my Signal account by default, so a page lands as a normal third-party message and rings the phone. The old --note-to-self default is gone, since note-to-self on the pager account wouldn't reach me. Sender and default recipient now come from PAGE_SIGNAL_ACCOUNT and PAGE_SIGNAL_TO with baked-in defaults. The send command pins the sender with -a, and --to also accepts a Signal account UUID, since my account hides its phone number. servers.json points signal-mcp at the new number. Verified end-to-end: live sends from the pager account notified the phone, and signal-mcp shows connected.
Diffstat (limited to 'claude-templates/bin')
-rwxr-xr-xclaude-templates/bin/page-signal24
1 files changed, 14 insertions, 10 deletions
diff --git a/claude-templates/bin/page-signal b/claude-templates/bin/page-signal
index 5a87c67..ef64258 100755
--- a/claude-templates/bin/page-signal
+++ b/claude-templates/bin/page-signal
@@ -2,18 +2,20 @@
#
# page-signal — wrap signal-cli send for paging Craig via Signal.
#
-# Defaults to --note-to-self for safety. Outbound (to another contact)
-# requires an explicit --to <+number> on every call. No defaults, no batch.
+# Sends from a dedicated pager account to Craig's Signal account by
+# default. Override the recipient with --to <+number-or-uuid>.
#
# Usage:
-# page-signal "message" # note-to-self
+# page-signal "message" # page Craig (default recipient)
# page-signal --file path "message" # with attachment
-# page-signal --to +15551234567 "msg" # outbound (explicit recipient)
+# page-signal --to +15551234567 "msg" # override recipient (number or UUID)
# page-signal --quiet "message" # suppress success output
# page-signal --json "message" # structured output (timestamp + status)
# echo "msg" | page-signal # message from stdin (no positional)
#
-# Requires signal-cli installed and registered with an account.
+# Sender account and default recipient come from PAGE_SIGNAL_ACCOUNT and
+# PAGE_SIGNAL_TO; both have built-in defaults below. Requires signal-cli
+# installed and registered with the sender account.
#
# Use this when desktop notifications won't reach the user — page-signal
# fires cross-device. For routine completions and periodic status pings,
@@ -25,11 +27,12 @@ set -euo pipefail
quiet=0
json=0
file=
-recipient_args=(--note-to-self)
+account="${PAGE_SIGNAL_ACCOUNT:-+15045173983}"
+recipient_args=("${PAGE_SIGNAL_TO:-b1b5601e-6126-47f8-afaa-0a59f5188fde}")
message=
usage() {
- sed -n '3,21p' "$0" | sed 's/^# \{0,1\}//'
+ sed -n '3,23p' "$0" | sed 's/^# \{0,1\}//'
}
while [ "$#" -gt 0 ]; do
@@ -53,10 +56,11 @@ while [ "$#" -gt 0 ]; do
shift 2
;;
--to)
- [ "$#" -ge 2 ] || { echo "page-signal: --to needs a +E.164 number" >&2; exit 2; }
+ [ "$#" -ge 2 ] || { echo "page-signal: --to needs a +E.164 number or a Signal account UUID" >&2; exit 2; }
case "$2" in
+[0-9]*) ;;
- *) echo "page-signal: --to expects +E.164 (e.g. +15551234567)" >&2; exit 2 ;;
+ [0-9a-fA-F]*-[0-9a-fA-F]*-[0-9a-fA-F]*) ;;
+ *) echo "page-signal: --to expects +E.164 (e.g. +15551234567) or a Signal account UUID" >&2; exit 2 ;;
esac
recipient_args=("$2")
shift 2
@@ -91,7 +95,7 @@ if [ -z "$message" ]; then
fi
# Build the send command.
-cmd=(signal-cli send -m "$message")
+cmd=(signal-cli -a "$account" send -m "$message")
if [ -n "$file" ]; then
cmd+=(-a "$file")
fi