Raniendu178 downloadsChat with local models using active note and vault context.
OChat is an Obsidian plugin for chatting with local models using the active Markdown note and relevant vault context. It supports Ollama by default and OpenAI-compatible local servers such as LM Studio or llama.cpp server.
Current release: 0.1.0.
POST /api/chat and GET /api/tags./v1/chat/completions and /v1/models.@note attachments, and ranked Markdown vault snippets in context.@ note suggestions, Ask/Edit toggle, and icon controls.<think>...</think>, plus a live thinking... indicator while a request is running.OChat sends prompt text, active-note content, selected text, and selected vault snippets to the configured model endpoint. The default endpoint is http://localhost:11434.
Localhost and private LAN endpoints are allowed without extra acknowledgement. Public endpoints require an explicit acknowledgement in settings because note and vault context may leave your machine.
OChat does not include telemetry, ads, remote assets, or an auto-update mechanism.
ollama pull llama3.2
curl http://localhost:11434/api/tags
Ollama, base URL http://localhost:11434, and model llama3.2.When OChat opens for the first time, it also checks http://localhost:11434 automatically. If models are found, choose one from the model picker. If Ollama is running somewhere else, enter that endpoint in the setup panel and test it.
OChat always includes the active Markdown note and current selection when you send a prompt. The composer shows the active note as a context chip so you can see what is grounded by default.
To attach more Markdown notes, type @ in the composer and choose a note from the suggestions, or click the plus button and search the vault. You can also type references directly, such as @README.md, @"Projects/Move Plan.md", or @[[Areas/Moving/00 Moving Dashboard.md]].
If you do not attach every relevant note, OChat still runs capped lexical search over the Markdown vault and includes ranked snippets that match your prompt, while respecting excluded folders.
Install dependencies:
npm install
Run tests:
npm test
Build the plugin:
npm run build
Install into a local vault:
npm run install-local -- "/path/to/Your Vault"
Then open Obsidian, enable community plugins, and enable OChat from Settings.
Until OChat is approved in the Obsidian Community directory, install it manually from a GitHub release:
main.js, manifest.json, and styles.css from the latest release..obsidian/plugins/ochat..obsidian/plugins/ochat.When you ask OChat to edit notes, the model must return structured patch JSON with path, original, replacement, and rationale. OChat validates that each target is a Markdown file and that the original text appears exactly once before applying a replacement.
Review mode is on by default. With review mode enabled, proposed edits are shown in the OChat sidebar and require approval. If you turn review mode off, valid Markdown patches are applied automatically.
MIT