peepshow/ sinks/ anytype

Reel #91 Local-first knowledge

peepshow sink / anytype

AnytypeWrite a peepshow run as a local-first object in an Anytype space.

POST one object per peepshow run into a local [Anytype](https://anytype.io) space via the desktop app's HTTP API on localhost:31009. Notion-shaped but fully local; data lives in your own encrypted vault.

drop · process · anytype

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 peepshow

Use it

ANYTYPE_ACCESS_TOKEN="$(< ~/.anytype-token)" \
ANYTYPE_SPACE_ID="bafyreigh2akiscaildc" \
peepshow ./design-review.mp4 --sink anytype

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

Configuration

  • ANYTYPE_ACCESS_TOKEN Access token from Anytype's `display_code` / `token` flow. Pre-generate it inside the app — the sink does not implement the bootstrap dance. required
  • ANYTYPE_SPACE_ID Target space id. Find it under Settings → Spaces inside the Anytype app. required
  • ANYTYPE_API_URL Base URL of the local Anytype API. Default `http://localhost:31009`; override only if you've remapped the port.
  • ANYTYPE_TYPE_KEY Object 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 .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 ANYTYPE_ACCESS_TOKEN="..."
export ANYTYPE_SPACE_ID="..."

2. Register as an auto-sink

peepshow sinks add anytype
peepshow sinks add anytype --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 Anytype 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'.