pager9
v0.3.7
Published
Pager9 installer and lifecycle hooks for Claude Code, Codex CLI and Google Antigravity CLI notifications.
Downloads
2,230
Maintainers
Readme
pager9
Pager9 connects your terminal coding agents — Claude Code, Codex CLI and Google Antigravity CLI — to the same phone notification service.
One-command installer for Pager9 — get your phone pinged when your coding agent finishes a task, needs your input, or is working.
The dashboard → Connect a machine hands you a one-line installer for your
shell (no Node required — it downloads a checksum-verified binary and runs
this CLI's init):
# PowerShell: irm https://pager9.dev/i/<token>?providers=<agent> | iex
# cmd: powershell -NoProfile -ExecutionPolicy Bypass -Command "$p = Join-Path $env:TEMP 'pager9-install.ps1'; try { Invoke-WebRequest -UseBasicParsing 'https://pager9.dev/i/<token>?providers=<agent>' -OutFile $p -ErrorAction Stop; & $p } catch { if ($_.ErrorDetails) { Write-Host $_.ErrorDetails.Message } else { Write-Host $_.Exception.Message } } finally { Remove-Item $p -Force -ErrorAction SilentlyContinue }"
# Mac / Linux: curl -fsSL 'https://pager9.dev/i/<token>?providers=<agent>' | shHave Node? This package is the same installer:
npx pager9 init --token p9t_… --providers <agent><agent> is claude, codex or antigravity; comma-separate to set up more than one
(--providers claude,codex,antigravity).
Either way the token is single-use and fresh from the dashboard.
What it does
pager9 init pairs one provider-independent machine and configures only the
selected providers. The dashboard always generates one explicit form:
pager9 init --token <token> --providers claude
pager9 init --token <token> --providers codex
pager9 init --token <token> --providers antigravity
pager9 init --token <token> --providers claude,codex,antigravityBare pager9 init retains the released Claude-only behavior for backward
compatibility. Gemini is rejected until its integration exists. The selected
command then:
- Shows a consent screen and waits for an explicit
y(defaults to No). - Exchanges the single-use install token (
p9t_…) for this machine's OWN key — minted server-side and written straight into your settings. The raw key is never shown, never pasted, never left in your shell history. - Runs a stepped checklist:
✔ Checking config → ✔ Backing up → ✔ Adding hook → ✔ Verifying → ⣾ Sending test notification → ✔ Done - Sends a live test ping to your phone.
Each machine gets its own key, so if one ever leaks you revoke just that one (from the dashboard) and re-run this on that machine — every other machine keeps working.
Claude Code
For Claude Code it installs into your global ~/.claude/settings.json so every
project notifies (not a project-level file), using Claude Code's native http hook
handler (no curl dependency, no shell-quoting). Five events are wired:
| Event | Status |
|---------------------------|-----------------------------------------|
| Stop | ✅ done — the "come back" ping |
| Notification | 🔔 needs input |
| UserPromptSubmit | running (session shows live, no ping) |
| PreToolUse (any tool) | running (no ping) |
| PostToolUse (any tool) | running / progress (no ping) |
Safety: it merges, never overwrites — every existing key and hook is preserved, and the file is backed up (timestamped copy) before writing. Re-running is idempotent: it replaces Pager9's own previous entries instead of stacking duplicates. If the existing file isn't valid JSON, it aborts rather than clobber it.
Claude Code hooks reload live — no restart needed.
Google Antigravity CLI
pager9 init --providers antigravity (or pager9 setup antigravity) writes Pager9's
hook into ~/.gemini/config/hooks.json under the same merge-never-overwrite and
backup rules. Antigravity picks it up on its next turn; there is no trust step.
Codex CLI is covered under Options below — it needs a one-time /hooks trust step.
Works on macOS, Linux, and Windows. Requires Node ≥ 18. Zero dependencies.
Options
Codex lifecycle integration is installed by pager9 init. After installation,
open Codex and run /hooks once to review and trust the stable
<absolute pager9 binary> hook codex command. Useful maintenance commands:
pager9 setup codex
pager9 doctor
pager9 uninstall codex
pager9 reset # preview only
pager9 reset --yes # full recoverable local first-install resetCodex configuration contains no Pager9 API key. The hook command reads the
machine credential from ~/.pager9/config.json, sends only a minimized event,
times out quickly, and always yields control back to Codex on delivery failure.
For users upgrading from Pager9 0.1.2, pager9 setup codex can safely recover
the same machine key and receiver URL from Pager9's existing Claude HTTP hooks,
back up and copy them into the local config, and preserve the existing machine ID. It aborts
instead of guessing if those hooks are malformed or disagree.
pager9 uninstall codex removes only Pager9's Codex handlers. A full
pager9 reset validates both provider files and prints an exact preview without
changing anything. pager9 reset --yes then removes only Pager9 handlers from
Claude and Codex, preserves unrelated settings and mixed hook groups, writes
timestamped provider-config backups, and moves ~/.pager9 to a timestamped
inactive backup. It does not uninstall either agent, modify Codex's private
trust database, or delete/revoke the remote Firebase machine record.
-y, --yes Skip the consent prompt
--token <p9t_…> Install token from the dashboard (Connect a machine) — mints
this machine's own key. The recommended path.
--key <p9_…> Use a p9_ key you already have, non-interactively (advanced).
--dry-run Preview: no files written, no ping sent
--no-test Skip the ending test ping
--settings <path> Target a different settings file (testing)
--project <id> Firebase project id (default pager9-4eaf9)
--url <hookUrl> Full hookReceiver URL overrideRun from source
The published package is plain, unminified JavaScript. If you have it locally you
can run the CLI directly instead of through npx:
node ./bin/pager9.js init --token p9t_…To preview safely without touching your real global settings, add
--settings ./tmp-settings.json --no-test, or use --dry-run (writes nothing,
sends nothing).
Build standalone release binaries
With Bun installed, run from the repository root:
npm --prefix ./cli run release:binariesThis runs CLI tests, rebuilds all five supported targets into
cli/dist/releases/v<version>/, generates and re-verifies SHA256SUMS, checks
the version embedded in every executable, runs the host binary with --version,
and verifies asset/version parity with both Firebase installer templates. It
does not sign, publish, or deploy anything. To recheck an existing output:
npm --prefix ./cli run release:verify