peepshow/ sinks/ cody

Reel #62 Editor integration

peepshow sink / cody

CodyFrames + manifest into Sourcegraph Cody's workspace context folder.

Drop frames, `manifest.json`, and (optionally) `transcript.md` into `.cody/context/` so the next Cody prompt has the whole clip as context.

drop · process · cody

What it does

Write the extracted frames into Sourcegraph Cody's workspace context directory (`.cody/context/peepshow/` by default) as real files — not symlinks — so Cody's file walker picks them up on the next prompt. Alongside the frames, `manifest.json` gives the model structured video/audio metadata, and when transcription is enabled `transcript.md` lands as a timestamped markdown file Cody can search.

When to reach for it

  • Use Sourcegraph Cody inside VS Code / JetBrains and want every peepshow run to become automatic context
  • Agents that route video context to Cody instead of a chat upload
  • Keep the full timeline — frames, metadata, and transcript — in one folder Cody already watches

Install

npm i -g peepshow

Use it

peepshow ./demo.mp4 --sink cody

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

Configuration

  • CODY_CONTEXT_DIR Target directory. Default `./.cody/context/peepshow/`. Relative paths resolve against `cwd`.
  • PEEPSHOW_CODY_DIR Alias for `CODY_CONTEXT_DIR`; wins when both are set.
  • CODY_COPY_MODE `copy` · `symlink` · `link` (hardlink). Default `copy`. Hardlink falls back to copy across filesystems.

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 Cody 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

This sink has no required env vars — it writes to a local path. Pass the destination via --sink-arg:

peepshow ./demo.mp4 --sink cody

2. Register as an auto-sink

peepshow sinks add cody
peepshow sinks add cody --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 Cody sink forwards the run to the configured Cody target. Claude replies with a summary and a link to the created record.

The transcript rides along in the payload whenever the audio pass transcribes successfully.

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