peepshow/ sinks/ apple-notes

Reel #65 macOS knowledge

peepshow sink / apple-notes

Apple NotesFile every peepshow run as a note in Apple Notes on macOS.

Build an HTML body (title, metadata, inline frames, transcript), pipe an AppleScript program into `osascript -`, land a new note in Notes.app under the folder of your choice.

drop · process · apple-notes

What it does

Apple's Notes.app is a first-class personal knowledge store on every Mac. This sink turns every peepshow run into a new note there: the body is HTML (Notes accepts it natively), the title is derived from `video.tags.title` / `video.tags.show` or a UTC-stamped fallback, inline `<img>` tags reference each frame by absolute path, and transcript segments land as `mm:ss`-prefixed paragraphs when peepshow's audio pass produces them. No API keys, no iCloud plumbing — it uses whatever Notes account is already signed in. Skips silently on non-darwin unless `APPLE_NOTES_ALLOW_NON_DARWIN=1` is set.

When to reach for it

  • Personal research — every extracted clip becomes a dated, searchable Notes entry
  • Keep Notes as the single source of truth for every video an agent has processed
  • macOS-native archive that syncs through iCloud across your own devices without a third-party service

Install

npm i -g peepshow

Use it

APPLE_NOTES_FOLDER=Research \
peepshow ./lecture.mp4 --sink apple-notes

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

Configuration

  • APPLE_NOTES_FOLDER Top-level folder in Notes.app. Default `Notes`.
  • PEEPSHOW_APPLE_NOTES_FOLDER Alias for `APPLE_NOTES_FOLDER`; wins when both are set.
  • APPLE_NOTES_TITLE Override the derived title.
  • APPLE_NOTES_ACCOUNT Target a specific account (`iCloud`, `On My Mac`, etc.). Uses the default account when unset.
  • APPLE_NOTES_ALLOW_NON_DARWIN `1` to force-run on non-darwin platforms (CI / debug).

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 Apple Notes 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:

APPLE_NOTES_FOLDER=Research \
peepshow ./lecture.mp4 --sink apple-notes

2. Register as an auto-sink

peepshow sinks add apple-notes
peepshow sinks add apple-notes --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 Apple Notes sink forwards the run to a new page in your knowledge base. Claude replies with a summary and a link to the created record.

The transcript text is embedded alongside the frame gallery on the created page.

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