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.

Configuration for pi-napkin’s auto-distill feature lives in .napkin/config.json inside your vault’s .napkin/ subdirectory. This file controls whether auto-distill is enabled, how often it runs, which model it uses, and how long a single distill subprocess is allowed to run before being declared stuck. All keys are optional — missing keys fall back to the defaults shown below.

Full config schema

{
  "showStatus": true,
  "distill": {
    "enabled": false,
    "intervalMinutes": 60,
    "maxDurationMinutes": 10,
    "onShutdown": true,
    "model": {
      "provider": "anthropic",
      "id": "claude-sonnet-4-6"
    }
  }
}

Configuration reference

distill.enabled
boolean
default:"false"
Master switch for auto-distill. When false, nothing auto-distill related happens — no health checks, no managed .gitignore block, no interval timer, and no shutdown distill. Manual /distill still works regardless of this setting.
distill.intervalMinutes
number
default:"60"
Timer interval in minutes between automatic distill spawns. The countdown is visible in the pi status bar as distill: Xm..s. Changing this value takes effect on the next session start.
distill.maxDurationMinutes
number
default:"10"
Maximum wall-clock duration a detached distill subprocess is allowed to run. When a subprocess exceeds this limit, the parent’s poll loop declares it stuck, force-cleans its worktree, and surfaces a timeout notification. Values <= 0 or non-finite silently fall back to the 10-minute default, so a bad config value can never disable the timeout entirely.
distill.onShutdown
boolean
default:"true"
When true, pi-napkin spawns one final distill at session shutdown to capture anything the interval timer may have missed. Set to false to skip the shutdown distill entirely. Does not affect interval-driven distills or manual /distill.
distill.model.provider
string
default:"\"anthropic\""
Model provider for the distill subprocess. Passed as the --model provider segment when spawning pi -p. Must match a provider configured in your pi setup.
distill.model.id
string
default:"\"claude-sonnet-4-6\""
Model ID for the distill subprocess. Combined with distill.model.provider as provider/id. Prefer a cheap, fast model — distill runs automatically and unattended.
showStatus
boolean
default:"true"
Whether to show napkin status entries in the pi status bar. When true, you see the distill: Xm..s countdown, the ● distill Xs running indicator, and the ✓ distill Xs completion glyph. Set to false to hide all napkin status bar output.

Setting config values with the CLI

Use the napkin config set command to update individual keys without editing the JSON file by hand:
napkin --vault ~/path/to/vault config set --key distill.enabled --value true
napkin --vault ~/path/to/vault config set --key distill.intervalMinutes --value 30
napkin --vault ~/path/to/vault config set --key distill.model.id --value "claude-haiku-4-5"
Changes take effect on the next pi session start (or reload).

Disabling auto-distill

napkin --vault ~/path/to/vault config set --key distill.enabled --value false
When distill.enabled is false:
  • No health checks run at session start.
  • No managed .gitignore block is installed or maintained.
  • No interval timer is armed.
  • No shutdown distill fires.
  • Manual /distill still works — it has no concurrency-safety prerequisites and does not require git.
Use a cheap, fast model for distill.model.id. Auto-distill runs in the background, unattended, and doesn’t require strong reasoning — it just needs to extract and organize knowledge from your conversation. Models like claude-haiku-4-5 or any claude-haiku-* variant keep costs low without meaningfully affecting distill quality. The slower, more expensive frontier models are better saved for interactive sessions.
The maxDurationMinutes default of 10 minutes is intentionally generous. For short-session vaults where a 10-minute hang is unacceptable (for example, a quick daily note vault), lower it to 3 or 5. For vaults that regularly produce large merge windows — many notes, complex conflict resolution, or a slow model provider — raise it to 20 or 30 to avoid false timeouts. Values <= 0 or non-finite are silently ignored and the 10-minute default applies.

Build docs developers (and LLMs) love