kpulik363 downloadsMulti-provider AI chat with file reading, editing, creation, and deletion. Supports Anthropic, OpenAI, Google Gemini, OpenRouter, and Ollama.
A local-first AI chat for Obsidian that can actually edit your vault.
Point it at Ollama, LM Studio, or any OpenAI-compatible server and the model can read your notes, propose edits as a reviewable diff, create new notes, and delete files behind a double confirmation. Nothing leaves your machine unless you choose a hosted provider.
Plenty of Obsidian plugins talk to local models, and a couple of the largest can edit your vault too. Three things are different here:
127.0.0.1 and never asks for a key.Hosted providers are supported too and are entirely optional: Anthropic (Claude), OpenAI, Google Gemini, and OpenRouter.
Local needs no API key. Hosted providers each need their own standard key. Claude Code OAuth tokens (
sk-ant-oat01-...) do not work, and using them in a third-party tool violates Anthropic's terms.
dataviewjs fence would execute JavaScript with vault access. Fences that known executors claim are rewritten before rendering; the code stays readable, it just cannot rundata.json, with existing keys migrated automatically| Provider | API key source | Notes |
|---|---|---|
| Local | None needed | Default. Any OpenAI-compatible server; set your base URL |
| Anthropic | console.anthropic.com | Uses x-api-key header |
| OpenAI | platform.openai.com | Bearer token |
| Google Gemini | aistudio.google.com | OpenAI-compatible endpoint |
| OpenRouter | openrouter.ai | Access 100+ models with one key |
From Obsidian (recommended)
Build from source
If you prefer to install manually or want to contribute:
git clone https://github.com/kpulik/VaultChat
cd VaultChat
npm install
npm run build
Then copy the built files into your vault:
mkdir -p /path/to/your/vault/.obsidian/plugins/VaultChat
cp main.js manifest.json styles.css /path/to/your/vault/.obsidian/plugins/VaultChat/
Restart Obsidian. The plugin will appear in Settings > Community Plugins.
The Local (OpenAI-compatible) provider works with any server that exposes the OpenAI chat-completions API. No API key, no cost, no data leaving your machine. Tested with Ollama and LM Studio; llama.cpp, vLLM, LocalAI, and Jan expose the same API and should work too.
1. Install a server
| Server | Where | Default base URL |
|---|---|---|
| Ollama | ollama.com | http://localhost:11434 |
| LM Studio | lmstudio.ai | http://localhost:1234 |
2. Get a model
With Ollama, pull one from the terminal:
ollama pull llama3.2 # 2GB, good general purpose
ollama pull llama3.2:1b # 1GB, fastest and smallest
ollama pull mistral # 4GB, strong reasoning
ollama pull qwen2.5 # 4GB, strong at multilingual
With LM Studio, download a model from its in-app browser and start the local server from the Developer tab.
3. Open VaultChat
Select Local (OpenAI-compatible) from the provider dropdown and set the base URL to match your server. The model list populates from the server's /v1/models endpoint, so it shows whatever that server has available.
If your server needs an API key (vLLM started with --api-key, a LiteLLM proxy, and similar), put it in the API key field for this provider. Leave it blank when the server does not use one.
Note: the server must be running for the model list to load. If the dropdown shows "Fetch failed", start the server, confirm the base URL and port, then hit the refresh button.
Use 127.0.0.1 rather than localhost. Most local servers listen on IPv4 only, while localhost can resolve to IPv6 first and fail with a connection-refused error. VaultChat now substitutes the address automatically, but typing it directly avoids the whole class of problem.
Upgrading from an older version: your Ollama base URL and model carry over automatically.
Reasoning models stream their chain of thought separately from their answer. VaultChat shows a "Thinking…" indicator while that is happening and then renders the answer when it arrives. The chain of thought is not added to the transcript.
If a model or router accepts the request but sends nothing back, VaultChat says so rather than leaving a blank message. This usually means the route you picked has no working upstream, so try a different model.
Go to Settings > VaultChat to configure:
npm run dev # watch mode, rebuilds on every save
For live reloading inside Obsidian, install the Hot Reload community plugin and symlink the project folder into your vault's plugins directory:
ln -s /path/to/VaultChat /path/to/vault/.obsidian/plugins/VaultChat
Open Obsidian's developer tools with Cmd+Option+I to debug.
If VaultChat is useful to you, consider buying me a coffee.
MIT