peepshow/ sinks/ plausible

Reel #31 Product analytics

peepshow sink / plausible

PlausibleFire a custom Plausible event for every run.

`peepshow_run` event on your Plausible site — props include codec, duration, director, studio.

What it does

Lightweight, privacy-friendly analytics: every peepshow run fires a custom event on a Plausible site. Strategy, frames, codec, duration, and container tags ride along as props. Works with Plausible Cloud and self-hosted installs.

When to reach for it

  • Show peepshow CLI traffic on an existing Plausible dashboard
  • Self-hosted Plausible: override `PLAUSIBLE_HOST`
  • Track which videos (by tag) hit your pipeline most often

Install

npm i -g peepshow

Use it

PLAUSIBLE_DOMAIN=peepshow.dev \
peepshow ./clip.mov --sink plausible

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 plausible
peepshow sinks add plausible --when extension=mp4,mov
peepshow sinks add plausible --when path=/Volumes/Work/

Configuration

  • PLAUSIBLE_DOMAIN Site domain as registered in Plausible. required
  • PLAUSIBLE_HOST Base URL for Plausible Cloud / self-hosted. Default `https://plausible.io`.
  • PLAUSIBLE_EVENT_NAME Custom-event name. Default `peepshow_run`.
  • PLAUSIBLE_URL Absolute URL recorded against the event.
  • PLAUSIBLE_USER_AGENT UA header — Plausible rejects requests without one.

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 Plausible 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 PLAUSIBLE_DOMAIN="..."

2. Register as an auto-sink

peepshow sinks add plausible
peepshow sinks add plausible --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 Plausible sink forwards the run to the analytics stream as a tagged event. 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'.