tdmarchetta41 downloadsChat with your notes in a right sidebar using a remote Ollama server.
A right-sidebar chat panel that lets you chat with your notes using a remote Ollama server over its native chat API. Personal-use, local-first — nothing leaves your LAN.
[[Note#Heading]] links you can click. Index builds incrementally in the background; edits and renames re-embed automatically with a 2s debounce. Embedder model is configurable and independent from the chat model.[[wikilinks]] all work./summarize, /expand, /rewrite, /brainstorm out of the box, fully editable in settings.ai: { model: ..., systemPrompt: ... } to a note's frontmatter to override global settings when chatting with that note.Chats/YYYY-MM-DD — <title>.md by default).+ icon or command palette.Ollama running on another PC on your LAN. On the host:
# macOS
launchctl setenv OLLAMA_HOST "0.0.0.0:11434"
launchctl setenv OLLAMA_ORIGINS "*"
# restart Ollama
# Linux (systemd)
sudo systemctl edit ollama.service
# add under [Service]:
# Environment="OLLAMA_HOST=0.0.0.0:11434"
# Environment="OLLAMA_ORIGINS=*"
sudo systemctl restart ollama
# Windows
# Set OLLAMA_HOST=0.0.0.0:11434 and OLLAMA_ORIGINS=* in System Environment Variables,
# then restart the Ollama app.
OLLAMA_ORIGINS=* is required so Obsidian can make streaming fetch requests to Ollama across the LAN. If you want tighter security, set it to app://obsidian.md instead (comma-separate for multiple values).
At least one Ollama chat model pulled, plus (if you want retrieval / RAG) an embedder model:
ollama pull llama3.1:8b # chat
ollama pull nomic-embed-text # embedder — only needed for the retrieval context mode
Node.js on your Mac (only needed once, to build this plugin):
brew install node
Build the plugin:
cd "/path/to/Obsidian_Plugin_Ollama_Chat"
npm install
npm run build
This produces main.js alongside manifest.json and styles.css.
Copy (or symlink) the plugin folder into your vault's plugins directory:
ln -s "/path/to/Obsidian_Plugin_Ollama_Chat" \
"/path/to/vault/.obsidian/plugins/ollama-notes-chat"
In Obsidian, open Settings → Community plugins, turn off restricted mode if needed, reload plugins, and enable Ollama Notes Chat.
Open Settings → Ollama Notes Chat:
http://192.168.1.50:11434.Click the chat-bubble icon in the left ribbon to open the sidebar, and start chatting.
If you want to chat with the whole vault instead of a single active note:
nomic-embed-text is the small, fast default). This is separate from your chat model.From [[Note#Heading]] citations you can click to jump to the source.Index is stored at .obsidian/plugins/ollama-notes-chat/index.json. It updates incrementally when notes change (2-second debounce) and invalidates automatically if you change the embedder model. On large vaults the cold reindex can take several minutes — you can click Cancel at any time and resume later.
Obsidian doesn't bind a default hotkey — assign one in Settings → Hotkeys by searching for "Ollama Notes Chat". The most useful commands to bind: "Open chat", "New chat", and "Open chat history".
In any note's frontmatter:
---
ai:
model: llama3.1:70b
systemPrompt: "You are a code reviewer. Be blunt and specific."
---
When this note is the active context, the plugin uses these values instead of the global settings for that send.
OLLAMA_HOST=0.0.0.0:11434 and OLLAMA_ORIGINS=* are set on the host. Restart Ollama after setting them.ollama list on the host to verify models are installed.ollama list on the host and pull nomic-embed-text if missing.main.ts — plugin entry; registers the view, ribbon icon, commands, editor menu, settings tab. Owns the conversation store + persistence (including the one-shot 0.1.0 → 0.2.0 migration) and, since 0.3.0, the RAG vector store + indexer.src/view/ChatView.ts — the sidebar ItemView that owns the chat UI, streaming, and rendering.src/view/HistoryDrawer.ts — overlay controller for the multi-session history drawer (mounted inside the chat view, not a separate ItemView).src/chat/ConversationStore.ts — CRUD layer over ConversationSnapshot[]; filters empty conversations out of persistence.src/chat/Conversation.ts — per-conversation state, auto-titling, and ConversationSnapshot shape.src/ollama/OllamaClient.ts — fetch-based native /api/chat client with NDJSON streaming generator (keeps Ollama's timing fields for the stats modal) plus requestUrl-based /api/embed and /api/tags.src/context/NoteContext.ts — builds the context block from the active note/selection/linked notes/retrieved passages.src/rag/Chunker.ts — heading-first markdown chunker with fixed-size fallback.src/rag/VectorStore.ts — in-memory map, flat JSON persistence at index.json, atomic tmp+rename writes, inline cosine top-K.src/rag/Indexer.ts — vault walk, mtime-diff, batched embedding, debounced event handlers.src/settings/ — typed settings, defaults, and the settings tab.styles.css — scoped under .ollama-chat-view / .ollama-chat-settings; uses only Obsidian theme variables.Ollama Notes Chat is free and open source. If it makes your notes more useful and you'd like to support continued development, you can buy me a coffee:
☕ buymeacoffee.com/tdmarchetta
100% of contributions go to the developer.
MIT