nitinvishway65 downloadsType /ai <prompt> in any note, press Enter, and your local Ollama model writes inline. Thus, Inline AI
Type
/ai+ your prompt → Press Enter → AI response streams directly into your note
Never leave your note to get AI help. Generate text, brainstorm, summarize, and refactor—all inline.
Pick one (or come back to change it later):
| Provider | Speed | Cost | Setup |
|---|---|---|---|
| 🦙 Ollama | ⚡⚡ Fast | 💰 Free | Local |
| 🤖 OpenAI | ⚡ Fast | 💵 ~$0.01/prompt | 2 min |
| 🧠 Claude | ⚡ Fast | 💵 ~$0.01/prompt | 2 min |
| ✨ Gemini | ⚡⚡ Very fast | 💰 Free tier | 1 min |
Current submission flow:
manifest.json, README.md, and LICENSE.manifest.json, tagging a matching GitHub release, and attaching main.js, manifest.json, and styles.css.Manual install while developing:
git clone https://github.com/nitinvishway/Inline-AI.git
cd Inline-AI
npm install && npm run build
# Copy main.js + manifest.json + styles.css to .obsidian/plugins/Inline-AI/
Settings → Inline AI → Choose provider → Paste API key (if needed) → Done ✅
/ai your prompt here
Press Enter ↵ → AI responds inline → Line is replaced with the response.
/ai expand this idea into 3 paragraphs: [your text]
↓ Becomes: ↓
[AI-generated 3-paragraph expansion]
/ai generate 5 blog post titles about productivity
/ai summarize this in 2 sentences: [paste meeting notes]
/ai make this less wordy: The quick brown fox jumps over the lazy dog
/ai write a haiku about procrastination
Before publishing to the Obsidian Community site, make sure:
manifest.json has a unique id and does not contain "obsidian".README.md, LICENSE, manifest.json, main.js, and styles.css.normalizePath() for cross-platform safety.version in manifest.json.Why choose Ollama?
Setup (5 minutes):
ollama pull llama3.2 # or: mistral, phi3, neural-chat
ollama serve
http://localhost:11434 (default)llama3.2✅ Done! Try: /ai explain quantum computing
Models to try:
llama3.2 — Balanced (fast + smart)mistral — Fastestphi3 — Best for long contextneural-chat — Good reasoningIf Ollama runs in WSL and Obsidian on Windows:
# In WSL, start with:
OLLAMA_HOST=0.0.0.0 ollama serve
# Find WSL IP:
ip addr show eth0 | grep "inet "
# Copy the IP, e.g., 172.28.144.5
Then in Obsidian settings, use: http://172.28.144.5:11434
Why choose OpenAI?
Setup (2 minutes):
Get API Key:
In Obsidian:
gpt-4o-mini (cheap) or gpt-4 (premium)✅ Done!
Cost estimate: ~$0.01 per prompt (very cheap)
gpt-4o-mini — 95% as good, 10x cheaper ⭐gpt-4 — Premium quality, higher costgpt-3.5-turbo — Older, less capableStart with gpt-4o-mini.
Why choose Claude?
Setup (2 minutes):
Get API Key:
In Obsidian:
claude-3-5-sonnet-20241022✅ Done!
Why choose Gemini?
Setup (1 minute):
Get API Key:
In Obsidian:
gemini-2.0-flash✅ Done!
| Setting | Options | Effect |
|---|---|---|
| System Prompt | Any text | Instructions always sent to the model (e.g., "Be concise") |
| Temperature | 0 — 1 | 0 = precise, 1 = creative. Default: 0.7 |
| Web Search | On/Off | Inject live web results into prompts |
| Search Engine | DuckDuckGo / Google | Which search to use (DuckDuckGo = no setup) |
Get live information in your prompts:
/ai what are the latest AI breakthroughs in 2024?
→ Plugin searches → Injects results → AI responds with current info
To enable:
/ai make this paragraph more engaging: [paste]
/ai explain what this code does: [paste code]
/ai create 5 study questions about photosynthesis
/ai summarize this abstract and extract key findings: [paste]
/ai what trends do you see in this data: [paste data]
/ai generate 3 color palettes for a fintech app
| ❌ Problem | ✅ Solution |
|---|---|
| "Failed to fetch" | Ollama not running? Check http://localhost:11434 is accessible |
| API key rejected | Paste key again, check for spaces. Verify on provider's website |
| Nothing happens | Make sure you're in Edit mode, not Read mode |
| Slow first response | Normal! LLMs take time to start. Subsequent prompts are faster |
| Errors in console | Check Settings → About → Show debug info. Share logs in issues |
| Model not found (Ollama) | Run: ollama pull llama3.2 |
Don't have a command? Use the Ask AI command:
Set a system prompt in Settings to customize AI behavior:
Example 1: You are a professional editor. Be concise but thorough.
Example 2: Output markdown formatted responses.
Example 3: Always explain your reasoning.
/ai what happened in tech today?
(with web search enabled)
Found a bug? Want a feature?
git clone https://github.com/nitinvishway/Inline-AI.git
cd Inline-AI
npm install
npm run dev # Watch mode (rebuild on save)
main.js and manifest.json to .obsidian/plugins/Inline-AI/Install the Hot-Reload plugin for instant updates without restarting Obsidian.
MIT — Use freely, modify, distribute.
Not simultaneously, but you can switch anytime in Settings. Try one provider per use case!
Works! But some models have context limits:
Ollama depends on your model.
Currently: No, but it will stop when done. We're working on cancel buttons.
Not yet. Desktop only for now.
Yes! In the code, search for /ai and change it. We're adding UI config soon.
Made with ❤️ for writers, thinkers, and builders.