AI LLM
approvedby sparky4567
Integrate local machine learning (OLLAMA) functionality into your notes, enhancing their capabilities.
Obsidian AI LLM Plugin
A fast, lightweight, zero-dependency local LLM plugin for Obsidian (Desktop & Mobile). Connect seamlessly to your local or self-hosted Ollama instance and interact with models directly inside your notes and via a modern sidebar chat panel.
✨ Features
- 📱 100% Cross-Platform (Desktop & Mobile): Built with native fetch APIs and standard Obsidian storage APIs. No node
fsdependencies, fixing all mobiledata.jsonloading errors. - 💬 Modern & Compact Sidebar Chat View: Sleek, responsive panel with live streaming, real-time status indicators, auto-scroll, stop generation button, and message history.
- ⚡ High Performance & Zero Heavy Dependencies: Lightweight bundle that loads instantly without third-party node packages.
- 🛠️ Editor Shortcuts & Commands:
Ask LLM with selected textSummarize selected textContinue my story and enhance textMake a story from my textFix grammar & improve writingExplain selected text
- 🚀 Quick Prompt Chips: Instant quick actions (
✨ Summarize,📝 Story,💡 Brainstorm,🔧 Fix Grammar,❓ Explain) built into the sidebar chat interface. - ⚙️ Configurable System Prompts & Endpoints: Easily switch models, customize default system roles, and test server connection right from plugin settings.
🚀 Getting Started
1. Prerequisites (Install Ollama)
Ensure you have Ollama installed and running.
# Pull a model (e.g. tinyllama, llama3:8b, mistral, qwen, etc.)
ollama run tinyllama
Mobile Usage Tip: To use this plugin on Obsidian Mobile (iOS/Android), host Ollama on your local network (e.g.
http://192.168.1.X:11434) or setOLLAMA_HOST=0.0.0.0so your mobile device can reach your PC/server.
2. Plugin Installation
Option A: Manual Installation
- Clone or download this repository into your vault's plugin directory:
cd /path/to/your/vault/.obsidian/plugins/ git clone https://github.com/Sparky4567/obsidian_ai_plugin.git ai_llm cd ai_llm npm install npm run build - Open Obsidian Settings -> Community Plugins.
- Reload plugins and enable AI LLM.
Option B: Release Zip
- Download
main.js,manifest.json, andstyles.cssfrom the latest GitHub Release. - Place them inside
.obsidian/plugins/ai_llm/in your vault. - Enable the plugin in Obsidian Community Plugins.
🎯 Usage & Workflows
💬 Sidebar Chat View
- Click the bot ribbon icon on the left sidebar (or run command
Open AI Chat Panel). - Type your question or prompt in the compact input field at the bottom.
- Use the quick prompt action chips above the input box for fast formatting.
- Click Send (or press
Enter). To stop streaming anytime, click Stop.
📝 Editor Commands (In-Note Generation)
- Highlight any text inside your active note.
- Open the Command Palette (
Ctrl+PorCmd+P). - Search for any AI LLM command:
Ask LLM with selected textSummarize selected textFix grammar & improve writingExplain selected text
- The generated response will stream directly under or in place of your selection.
⚙️ Configuration
Go to Obsidian Settings -> AI LLM Settings:
- Ollama Endpoint: Set your Ollama server URL (Default:
http://127.0.0.1:11434). Click Test Connection to verify availability. - LLM Model: Select from automatically discovered models on your Ollama server.
- Default System Role: Customize the system persona (e.g., "You are a helpful assistant providing concise answers").
🛠️ Building & Development
# Install development dependencies
npm install
# Build production bundle
npm run build
# Watch mode for live dev edits
npm run dev
📄 License & Support
Distributed under the MIT License. See LICENSE for details.
Developed with ❤️ by Sparky4567.
- Website: artefaktas.eu
- Support on Ko-fi: ko-fi.com/artefaktas
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.