Commands & Triggers

All SANE commands are available via the Obsidian command palette (Cmd/Ctrl + P). Trigger modes control when processing happens automatically.

Commands

SANE: Process current note
Immediately process the note open in the active editor. Useful in manual trigger mode or to re-process a note after editing.
SANE: Initialize all notes
Process every note in your target folder (or entire vault if no folder is set). Run this once after installing to build the semantic index. A confirmation dialog appears first if requireBackupWarning is on.
SANE: Show cost summary
Display today's and this month's total API spend, broken down by provider. Only available when costTracking is enabled.
SANE: Revert current note
Remove all sane_* fields from the frontmatter of the active note. Your original content is fully restored.
SANE: Revert all notes
Remove all sane_* fields from every processed note in your target folder. A confirmation dialog appears before this runs.
SANE: Test AI response
Send a test prompt to your configured AI provider and print the response to the developer console. Only available when debugMode is true. Use this to verify your API key and endpoint are working.

Trigger modes

Set via processingTrigger in Settings. Controls when SANE processes a note after it's been edited or created.

immediate
On every save
SANE processes the note as soon as it detects a file change. Best for vaults where notes are finalized quickly and you want instant feedback.
scheduled
Once a day
All modified notes are processed in a batch at scheduleHour (default 2 AM). Minimal interruption; ideal for large vaults where processing a note immediately after every edit isn't necessary.
manual
Only on command
SANE never processes automatically. Use Process current note or Initialize all notes whenever you're ready. Full control, zero surprise API calls.
Budget tip: The delayed or manual trigger is strongly recommended when you're still exploring SANE's output, as it prevents API calls accumulating while you write.

Status bar

SANE shows its state in the bottom-right status bar of Obsidian's window. Here are the messages you may see:

SANE · idle
Plugin is running, no notes queued.
SANE · processing 3 / 47
Bulk initialization in progress — 3 of 47 notes complete.
SANE · processing my-note.md
Currently enriching a single note triggered by an edit.
SANE · budget reached
Today's daily budget has been hit. Processing is paused until midnight.
SANE · error
A provider error occurred. Check the developer console for details. Try Test AI response with debugMode on.

Ribbon button

SANE adds a brain icon (🧠) to Obsidian's left ribbon. Clicking it is a shortcut for SANE: Process current note — handy when you're in manual trigger mode and want to process the note you're looking at without opening the command palette.