What it does
Fire a PagerDuty Events API v2 `trigger` so peepshow runs show up on an incident timeline. `dedup_key` collapses retriggers onto one incident; `PAGERDUTY_IMAGE_BASE` attaches up to `PAGERDUTY_MAX_IMAGES` frames as incident images when the frames are served publicly.
When to reach for it
- Auto-trigger a page when a critical video-processing job completes
- Cluster retriggers of the same clip with a stable `PAGERDUTY_DEDUP_KEY`
- EU-region PagerDuty: override `PAGERDUTY_EVENTS_URL`
Install
npm i -g peepshowUse it
PAGERDUTY_ROUTING_KEY=... \
PAGERDUTY_SEVERITY=warning \
peepshow ./trigger.mp4 --sink pagerdutyMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add pagerduty
peepshow sinks add pagerduty --when extension=mp4,mov
peepshow sinks add pagerduty --when path=/Volumes/Work/Configuration
PAGERDUTY_ROUTING_KEYIntegration key from the service's Events API v2 integration. requiredPAGERDUTY_SEVERITY`info` | `warning` | `error` | `critical`. Default `info`.PAGERDUTY_DEDUP_KEYStable key so retriggers collapse onto one incident.PAGERDUTY_SOURCE`payload.source` label. Default `peepshow`.PAGERDUTY_IMAGE_BASEURL prefix — attaches frames as images when set.PAGERDUTY_MAX_IMAGESCap on attached images. Default `4`.PAGERDUTY_EVENTS_URLOverride for the EU DC or tests.
Use with an LLM agent
Every peepshow sink reads its config from env vars and receives a single JSON payload on stdin. An LLM agent (Claude Code, Cursor, Windsurf, Gemini, Codex) can drive the PagerDuty sink automatically when three things are true:
- the env vars below are exported in the agent's shell (or a project
.envit can load), - the
peepshowCLI is onPATH— install withnpm i -g peepshow, - a peepshow auto-sink is registered for the run (optional but recommended — makes invocation zero-argument).
1. Set the environment
# Add to ~/.zshrc, ~/.bashrc, or a project .env the agent can load
export PAGERDUTY_ROUTING_KEY="..."2. Register as an auto-sink
peepshow sinks add pagerduty
peepshow sinks add pagerduty --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, thePagerDutysink forwards the run to the alert / incident stream. Claude replies with a summary and a link to the created record.
Transcript metadata (language, duration, silence ratio) tags each event.
Write your own
A sink is any executable that reads the --emit json payload on stdin. Shell, Node, Python, Go — the spec's in docs/PLUGINS.md. Register persistent ones with peepshow sinks add-cmd 'your-command'.