Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Inline AI

nitinvishwaynitinvishway65 downloads

Type /ai <prompt> in any note, press Enter, and your local Ollama model writes inline. Thus, Inline AI

Add to Obsidian
Inline AI screenshot
Inline AI screenshot
Inline AI screenshot
  • Overview
  • Scorecard
  • Updates6

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.


🚀 Quick Start (30 seconds)

1️⃣ Choose Your AI Provider

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
2️⃣ Install Plugin

Current submission flow:

  1. Prepare the repo root with manifest.json, README.md, and LICENSE.
  2. Cut a release by bumping the version in manifest.json, tagging a matching GitHub release, and attaching main.js, manifest.json, and styles.css.
  3. Submit the repo URL through community.obsidian.md → Plugins → New plugin.

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/
3️⃣ Configure Your Provider

Settings → Inline AI → Choose provider → Paste API key (if needed) → Done ✅


📝 How to Use

Basic Syntax

/ai your prompt here

Press Enter ↵ → AI responds inline → Line is replaced with the response.

Examples

📚 Writing

/ai expand this idea into 3 paragraphs: [your text]

↓ Becomes: ↓

[AI-generated 3-paragraph expansion]

🧠 Brainstorming

/ai generate 5 blog post titles about productivity

📋 Summarizing

/ai summarize this in 2 sentences: [paste meeting notes]

🔄 Refactoring

/ai make this less wordy: The quick brown fox jumps over the lazy dog

🎨 Creative

/ai write a haiku about procrastination

📦 Submission Checklist

Before publishing to the Obsidian Community site, make sure:

  1. manifest.json has a unique id and does not contain "obsidian".
  2. The repo root includes README.md, LICENSE, manifest.json, main.js, and styles.css.
  3. Any file paths handled in code are passed through Obsidian's normalizePath() for cross-platform safety.
  4. The release tag matches the version in manifest.json.

🔧 Setup by Provider

🦙 Ollama (Local, Private, Free) — Recommended for Privacy

Why choose Ollama?

  • ✅ Runs on your machine (no data sent to cloud)
  • ✅ Completely free
  • ✅ Works offline
  • ✅ Lightning fast

Setup (5 minutes):

  1. Install Ollama → Download from ollama.com
  2. Start Ollama:
    ollama pull llama3.2  # or: mistral, phi3, neural-chat
    ollama serve
    
  3. In Obsidian:
    • Settings → Inline AI
    • Provider: Ollama
    • URL: http://localhost:11434 (default)
    • Model: llama3.2

✅ Done! Try: /ai explain quantum computing

Models to try:

  • llama3.2 — Balanced (fast + smart)
  • mistral — Fastest
  • phi3 — Best for long context
  • neural-chat — Good reasoning
❓ Using WSL2? (Windows)

If 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


🤖 OpenAI ChatGPT — Best Quality

Why choose OpenAI?

  • ✅ Highest quality responses
  • ✅ Fast and reliable
  • ✅ Large context window
  • ✅ Latest models available

Setup (2 minutes):

  1. Get API Key:

    • Go to platform.openai.com/api/keys
    • Create new secret key
    • Copy it
  2. In Obsidian:

    • Settings → Inline AI
    • Provider: OpenAI
    • Paste your API key
    • Model: gpt-4o-mini (cheap) or gpt-4 (premium)

✅ Done!

Cost estimate: ~$0.01 per prompt (very cheap)

💡 Pro tip: Use cheaper models
  • gpt-4o-mini — 95% as good, 10x cheaper ⭐
  • gpt-4 — Premium quality, higher cost
  • gpt-3.5-turbo — Older, less capable

Start with gpt-4o-mini.


🧠 Anthropic Claude — Best Reasoning

Why choose Claude?

  • ✅ Excellent at long-form writing
  • ✅ Better reasoning than GPT
  • ✅ Good value for money
  • ✅ Thoughtful responses

Setup (2 minutes):

  1. Get API Key:

    • Go to console.anthropic.com/keys
    • Create new API key
    • Copy it
  2. In Obsidian:

    • Settings → Inline AI
    • Provider: Claude
    • Paste your API key
    • Model: claude-3-5-sonnet-20241022

✅ Done!


✨ Google Gemini — Fastest + Free Tier

Why choose Gemini?

  • ✅ Extremely fast
  • ✅ Free tier available (no credit card needed initially)
  • ✅ Good for quick queries
  • ✅ Integrated with Google ecosystem

Setup (1 minute):

  1. Get API Key:

    • Go to aistudio.google.com
    • Click "Get API Key"
    • Create new API key
    • Copy it
  2. In Obsidian:

    • Settings → Inline AI
    • Provider: Gemini
    • Paste your API key
    • Model: gemini-2.0-flash

✅ Done!


⚙️ Advanced Settings

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)

🌐 Web Search (Optional)

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:

  1. Settings → Inline AI → Toggle "Enable Web Search"
  2. Choose search engine:
    • DuckDuckGo — Works instantly, no setup
    • Google Custom Search — More thorough, requires API key

🎯 Real-World Use Cases

📖 Writer

/ai make this paragraph more engaging: [paste]

🧑‍💻 Developer

/ai explain what this code does: [paste code]

📚 Student

/ai create 5 study questions about photosynthesis

🧠 Researcher

/ai summarize this abstract and extract key findings: [paste]

📊 Analyst

/ai what trends do you see in this data: [paste data]

🎨 Designer

/ai generate 3 color palettes for a fintech app

🐛 Troubleshooting

❌ 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

⌨️ Keyboard Shortcut

Don't have a command? Use the Ask AI command:

  1. Obsidian Command Palette (Ctrl+K / Cmd+K)
  2. Search "Ask AI"
  3. Press Enter
  4. Type your prompt

🔐 Privacy & Data

  • Ollama: ✅ All processing local. No data leaves your machine.
  • OpenAI/Claude/Gemini: Data sent to their servers per their privacy policies.

💡 Tips & Tricks

System Prompt Magic

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.

Temperature for Different Tasks

  • 0.0 (Precise) → Summaries, facts, code
  • 0.5 (Balanced) → General writing
  • 1.0 (Creative) → Brainstorming, fiction

Combine with Web Search

/ai what happened in tech today?

(with web search enabled)


🤝 Contributing

Found a bug? Want a feature?

  • Bug reports: Open an issue on GitHub
  • Feature requests: Discuss in Discussions or issues
  • Development: See Development section

📦 Development

Local Setup

git clone https://github.com/nitinvishway/Inline-AI.git
cd Inline-AI
npm install
npm run dev          # Watch mode (rebuild on save)

Testing

  1. Copy main.js and manifest.json to .obsidian/plugins/Inline-AI/
  2. Reload Obsidian (Ctrl+R / Cmd+R)
  3. Test changes in real-time

Hot Reload (Optional)

Install the Hot-Reload plugin for instant updates without restarting Obsidian.


📄 License

MIT — Use freely, modify, distribute.


❓ FAQ

Can I use multiple AI providers?

Not simultaneously, but you can switch anytime in Settings. Try one provider per use case!

What if my prompt is very long?

Works! But some models have context limits:

  • Claude: 200K tokens (very generous)
  • GPT-4: 128K tokens
  • Gemini: 1M tokens

Ollama depends on your model.

Can I cancel a generation?

Currently: No, but it will stop when done. We're working on cancel buttons.

Does it work in mobile Obsidian?

Not yet. Desktop only for now.

Can I customize the /ai trigger?

Yes! In the code, search for /ai and change it. We're adding UI config soon.


🙌 Support

  • Docs & Guides: This README
  • Issues: GitHub Issues
  • Discussions: GitHub Discussions

Made with ❤️ for writers, thinkers, and builders.

HealthExcellent
ReviewPassed
About
Inline AI responses directly into notes by typing /ai plus your prompt and pressing Enter. Generate text, brainstorm ideas, summarize, refactor, or expand content inline using OpenAI, Claude, Gemini, or local Ollama as the provider.
AIWritingCommands
Details
Current version
1.0.6
Last updated
4 weeks ago
Created
3 months ago
Updates
6 releases
Downloads
65
Compatible with
Obsidian 1.4.0+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
nitinvishwaynitinvishwaynitinvishway
nitinvishway.tech/
GitHubnitinvishway
nitinvishway
  1. Community
  2. Plugins
  3. AI
  4. Inline AI

Related plugins

Text Generator

Generate text content using GPT-3 (OpenAI).

Smart Composer

AI chat with note context, smart writing assistance, and one-click edits for your vault.

Local GPT

Local Ollama and OpenAI-like GPT's assistance for maximum privacy and offline access.

ChatGPT MD

A seamless integration of ChatGPT, OpenRouter.ai and local LLMs via Ollama into your notes.

BMO Chatbot

Generate and brainstorm ideas while creating your notes using Large Language Models (LLMs) such as OpenAI's "gpt-3.5-turbo" and "gpt-4".

Claudian

Embeds Claude Code/Codex and other local Agents as AI collaborators in your vault.

Copilot

Your AI Copilot: Chat with Your Second Brain, Learn Faster, Work Smarter.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Find orphaned files and broken links

Find files that are not linked anywhere and would otherwise be lost in your vault. In other words: files with no backlinks.

Quick Switcher++

Enhanced Quick Switcher, search open panels, and symbols.