What it does
Fire a single product-analytics `track` event per run to whichever provider you're using. One sink binary, three wire formats — Mixpanel (form-encoded), Amplitude (JSON), Segment (JSON with Basic auth). Same properties (`strategy`, `frames`, `codec`, `duration_s`, tags) across providers.
When to reach for it
- Plug peepshow into an existing Mixpanel / Amplitude / Segment pipeline without standing up PostHog
- Switch analytics providers by changing one env var — no code changes
- EU DC / staging: override `EVENT_TRACK_ENDPOINT`
Install
npm i -g peepshowUse it
EVENT_TRACK_PROVIDER=mixpanel \
EVENT_TRACK_TOKEN=<project-token> \
EVENT_TRACK_USER_ID=peepshow-cli \
peepshow ./clip.mp4 --sink event-trackMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add event-track
peepshow sinks add event-track --when extension=mp4,mov
peepshow sinks add event-track --when path=/Volumes/Work/Configuration
EVENT_TRACK_PROVIDER`mixpanel` | `amplitude` | `segment`. requiredEVENT_TRACK_TOKENMixpanel project token / Amplitude API key / Segment write key. requiredEVENT_TRACK_USER_ID`distinct_id` / `user_id` / `userId` attached to the event. requiredEVENT_TRACK_EVENT_NAMEEvent name. Default `peepshow_run`.EVENT_TRACK_ENDPOINTOverride the API URL (EU DC, staging, mock).
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 Event Track 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 EVENT_TRACK_PROVIDER="..."
export EVENT_TRACK_TOKEN="..."
export EVENT_TRACK_USER_ID="..."2. Register as an auto-sink
peepshow sinks add event-track
peepshow sinks add event-track --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theEvent Tracksink 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'.