README file from
GithubOChat
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.
Features
- Right sidebar chat for active-note and vault-aware questions.
- First-run setup that checks the default Ollama endpoint and shows a model picker when local models are found.
- Ollama provider using
POST /api/chatandGET /api/tags. - OpenAI-compatible provider using
/v1/chat/completionsand/v1/models. - Active note, selected text, explicit
@noteattachments, and ranked Markdown vault snippets in context. - Compact assistant composer with context chips,
@note suggestions, Ask/Edit toggle, and icon controls. - Rendered Markdown chat responses using Obsidian's Markdown renderer.
- Collapsed model thinking blocks for models that emit
<think>...</think>, plus a livethinking...indicator while a request is running. - Endpoint testing in the sidebar settings panel with visible success, warning, and failure states.
- Markdown edit proposals with review mode enabled by default.
- Markdown-only file writes through Obsidian APIs.
Privacy and network use
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.
Requirements
- Obsidian 1.12.7 or newer.
- Node.js 18 or newer for development.
- Ollama or another compatible local model server.
Ollama quick start
- Install Ollama from ollama.com.
- Pull a model:
ollama pull llama3.2
- Confirm the local API is running:
curl http://localhost:11434/api/tags
- In OChat settings, use provider
Ollama, base URLhttp://localhost:11434, and modelllama3.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.
Context workflow
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.
Local development
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.
Installing from a GitHub release
Until OChat is approved in the Obsidian Community directory, install it manually from a GitHub release:
- Download
main.js,manifest.json, andstyles.cssfrom the latest release. - Create this folder in your vault:
.obsidian/plugins/ochat. - Copy the downloaded files into
.obsidian/plugins/ochat. - Reload Obsidian and enable OChat in Settings > Community plugins.
Editing notes
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.
License
MIT