Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/cad0p/pi-napkin/llms.txt

Use this file to discover all available pages before exploring further.

pi-napkin is a pi extension that connects your AI coding agent to an Obsidian-compatible knowledge vault. It automatically distills conversation context into structured notes as you work — and does it safely, using git worktrees so concurrent sessions never race on vault files.

Quickstart

Install pi-napkin and run your first distill in minutes

Auto-Distill

Learn how background distillation captures session knowledge automatically

Vault Setup

Set up a new vault or connect an existing Obsidian vault

Configuration

Configure distill intervals, models, and vault behavior

What pi-napkin gives you

pi-napkin ships two extensions, one skill, three slash commands, and one agent tool — all working together to keep your knowledge vault in sync with your pi sessions.

Vault Context

Injects vault overview into every session. Registers kb_search and kb_read tools so the agent can find and read notes.

Auto-Distill

Runs on a timer and at shutdown. Forks the session and asks a cheap model to extract structured notes into the vault.

Concurrency Safety

Each distill runs in its own git worktree. Concurrent sessions and Obsidian never race on vault files.

Agent Visibility

Posts overlap notices when a background distill edits files the parent session has also touched.

Get started in three steps

1

Install the napkin CLI

pi-napkin depends on @cad0p/napkin. Install it globally first:
npm install -g @cad0p/napkin
2

Install the pi-napkin extension

pi install npm:@cad0p/pi-napkin
3

Enable auto-distill on your vault

napkin --vault ~/path/to/vault config set --key distill.enabled --value true
On the next pi session start, auto-distill initializes git in your vault and begins capturing knowledge automatically.
Auto-distill requires bash 4+, git 2.20+, and timeout(1) from coreutils. See Installation for platform-specific setup.

Build docs developers (and LLMs) love