peepshow/ sinks/ milvus

Reel #23 Vector DB

peepshow sink / milvus

MilvusUpsert frame rows into Milvus or Zilliz Cloud.

Zero-vector rows now, real embeddings wired in by your own pipeline later.

What it does

Persist the frame→metadata rows into Milvus (self-hosted) or Zilliz Cloud. Vectors are written as zeros so a downstream embedder — Zilliz pipeline, cron job, or tee to another sink — can fill them in by primary key without a schema migration.

When to reach for it

  • Bootstrap a Milvus collection with every frame peepshow has ever extracted
  • Zilliz Cloud pipelines that embed frames asynchronously after ingest
  • Pair with `peepshow-sink-chroma` for live embeddings while Milvus is the canonical store

Install

npm i -g peepshow
npm i -g @zilliz/milvus2-sdk-node

Use it

MILVUS_URI=http://localhost:19530 \
MILVUS_COLLECTION=peepshow_frames \
peepshow ./scene.mp4 --sink milvus

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

Configuration

  • MILVUS_URI Milvus / Zilliz Cloud endpoint. e.g. `http://localhost:19530` or a Zilliz URL. required
  • MILVUS_COLLECTION Target collection name. Must already exist. required
  • MILVUS_TOKEN Zilliz Cloud API token. Preferred for hosted.
  • MILVUS_USERNAME Basic-auth username for self-hosted.
  • MILVUS_PASSWORD Basic-auth password for self-hosted.
  • MILVUS_DIMENSION Embedding dimension for the zero-vector rows. Default `1536`.
  • MILVUS_SSL Force TLS on/off. Defaults from URI scheme.

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 Milvus 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 MILVUS_URI="..."
export MILVUS_COLLECTION="..."

2. Register as an auto-sink

peepshow sinks add milvus
peepshow sinks add milvus --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 Milvus sink 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'.