What it does
[Anytype](https://anytype.io) is the local-first knowledge base that ships with end-to-end encryption and runs entirely on your device — a Notion-shaped UI without the cloud lock-in. The desktop app exposes an HTTP API on `http://localhost:31009`; this sink writes one object per peepshow run via `POST /v1/spaces/<spaceId>/objects` with `{name, body, type_key}`. Auth is a Bearer access token the user pre-generates inside the Anytype app (the `display_code` / `token` bootstrap dance is left to the user — keeping the sink stateless and idempotent). The default `type_key` is `ot-note`; point at any custom type via `ANYTYPE_TYPE_KEY`. Body is markdown — heading, run metadata, container tags, transcript — formatted to render cleanly in Anytype's block editor.
When to reach for it
- Keep a fully local, encrypted log of every video an agent has watched — no cloud, no third-party server
- Pipe meeting recordings + design walkthroughs into your personal Anytype vault for long-term recall
- Bridge peepshow into a privacy-first workflow where Notion / Granola / Obsidian-Sync aren't acceptable
Install
# Anytype desktop must be running locally — download from https://anytype.io
npm i -g peepshowUse it
ANYTYPE_ACCESS_TOKEN="$(< ~/.anytype-token)" \
ANYTYPE_SPACE_ID="bafyreigh2akiscaildc" \
peepshow ./design-review.mp4 --sink anytypeMake it automatic
Register the sink once — every run fires it afterward. Scope by --when so it only runs for matching videos.
peepshow sinks add anytype
peepshow sinks add anytype --when extension=mp4,mov
peepshow sinks add anytype --when path=/Volumes/Work/Configuration
ANYTYPE_ACCESS_TOKENAccess token from Anytype's `display_code` / `token` flow. Pre-generate it inside the app — the sink does not implement the bootstrap dance. requiredANYTYPE_SPACE_IDTarget space id. Find it under Settings → Spaces inside the Anytype app. requiredANYTYPE_API_URLBase URL of the local Anytype API. Default `http://localhost:31009`; override only if you've remapped the port.ANYTYPE_TYPE_KEYObject type key. Default `ot-note`. Use any custom type key from your space's type catalogue.
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 Anytype 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 ANYTYPE_ACCESS_TOKEN="..."
export ANYTYPE_SPACE_ID="..."2. Register as an auto-sink
peepshow sinks add anytype
peepshow sinks add anytype --when extension=mp4,mov3. Example LLM session
You → drop a
.movinto Claude Code.Claude → auto-invokes
/peepshow:slides ./clip.mov. peepshow extracts frames + audio, theAnytypesink 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'.