What it does
[Typesense](https://typesense.org) is the open-source typo-tolerant search engine with hybrid (keyword + vector) search baked in. This sink soft-creates the collection on first write with a small schema (`run_id`, `title`, `frames`, `duration`, `transcript`, `thumbnail_url`, `strategy`, `created_at`), then upserts one document per peepshow run via `POST .../documents?action=upsert`. Re-running the same peepshow command replaces the existing row rather than 409ing. Pair with the Typesense dashboard or any of the official SDKs for sub-50ms typo-tolerant search across run history.
When to reach for it
- Typo-tolerant search over peepshow run history — find runs by approximate transcript text or fuzzy title
- Self-hosted or Typesense Cloud — one schema for hybrid keyword + vector search
- Pair with Typesense's vector field on `transcript` for semantic recall via the same query
Install
npm i -g peepshowUse it
TYPESENSE_URL="http://localhost:8108" \
TYPESENSE_API_KEY="xyz" \
peepshow ./demo.mp4 --sink typesenseMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add typesense
peepshow sinks add typesense --when extension=mp4,mov
peepshow sinks add typesense --when path=/Volumes/Work/Configuration
TYPESENSE_URLBase URL of the Typesense node / cluster, e.g. `http://localhost:8108`. requiredTYPESENSE_API_KEYAdmin / write key. Sent in `X-TYPESENSE-API-KEY` header. requiredTYPESENSE_COLLECTIONCollection name. Default `peepshow_runs`. Auto-created on first write.PEEPSHOW_FRAME_BASE_URLWhen set, the first frame URL is written to the `thumbnail_url` field.
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 Typesense 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 TYPESENSE_URL="..."
export TYPESENSE_API_KEY="..."2. Register as an auto-sink
peepshow sinks add typesense
peepshow sinks add typesense --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theTypesensesink forwards the run to the configured collection. Claude replies with a summary and a link to the created record.
The transcript text is a natural embedding target — index it next to the frames.
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'.