peepshow/ sinks/ ntfy

Reel #72 Push notifications

peepshow sink / ntfy

ntfyPush the run summary to a phone via ntfy.sh (or self-hosted).

Simple HTTP POST to a topic. Phones, desktops, and CLI clients subscribed to the topic get the alert instantly.

drop · process · ntfy

What it does

[ntfy](https://ntfy.sh) is a dead-simple pub/sub push-notification service — POST a message to `https://ntfy.sh/<topic>` and every subscriber (phone app, browser tab, CLI) gets it. This sink turns every peepshow run into a notification: the title is the video's `title`/`show` tag, the body is `frames=N · duration=Ts`, and when `PEEPSHOW_FRAME_BASE_URL` is set the first frame URL is appended so ntfy renders it as a clickable action. Works against the public `ntfy.sh` server or any self-hosted instance.

When to reach for it

  • Get a push to your phone whenever an agent finishes processing a long clip
  • Wire a self-hosted ntfy server into your home-lab to keep peepshow telemetry off the public internet
  • Pair with priority/tags to make peepshow runs trigger an emergency phone wake-up on critical clips

Install

npm i -g peepshow

Use it

NTFY_TOPIC="peepshow-prod" \
NTFY_PRIORITY=4 \
NTFY_TAGS="movie_camera,tada" \
peepshow ./clip.mp4 --sink ntfy

Make it automatic

Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.

peepshow sinks add ntfy
peepshow sinks add ntfy --when extension=mp4,mov
peepshow sinks add ntfy --when path=/Volumes/Work/

Configuration

  • NTFY_TOPIC Topic name — anything alphanumeric works. required
  • NTFY_BASE_URL Override the default `https://ntfy.sh` (e.g. for self-hosted).
  • NTFY_TOKEN Bearer token for protected topics / self-hosted instances with auth.
  • NTFY_PRIORITY 1..5 (1=min, 5=max). Default 3.
  • NTFY_TAGS Comma-separated emoji shortcodes (`tada,movie_camera`).
  • PEEPSHOW_FRAME_BASE_URL When set, the first frame URL is appended to the message body — ntfy renders it as a clickable action.

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 ntfy sink automatically when three things are true:

  • the env vars below are exported in the agent's shell (or a project .env it can load),
  • the peepshow CLI is on PATH — install with npm 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 NTFY_TOPIC="..."

2. Register as an auto-sink

peepshow sinks add ntfy
peepshow sinks add ntfy --when extension=mp4,mov

3. Example LLM session

You → drop a .mov into Claude Code.

Claude → auto-invokes /peepshow:slides ./clip.mov. peepshow extracts frames + audio, the ntfy sink forwards the run to the configured channel. Claude replies with a summary and a link to the created record.

The transcript snippet is posted alongside the frames as a secondary message.

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'.