takeshy7k downloadsAI-powered assistant using Google Gemini with File Search RAG capabilities.
Free and open-source AI assistant for Obsidian with Chat, Workflow Automation, and RAG powered by Google Gemini.
Since v1.11.0, this plugin focuses exclusively on Gemini-related features. CLI support has been removed. A new plugin obsidian-llm-hub has been created with CLI and multiple LLM provider support (OpenAI, Claude, OpenRouter, Local LLM).
| Plugin | Description |
|---|---|
| obsidian-gemini-helper | Gemini-focused (RAG via File Search API) |
| obsidian-llm-hub | Multi-LLM support, Desktop Only (RAG via Embedding, supports gemini-embedding-2-preview) |
| obsidian-local-llm-hub | Local LLM only (RAG via local embeddings only) |
This plugin is completely free. You only need a Google Gemini API key (free or paid) from ai.google.dev.

This plugin requires a Google Gemini API key. You can choose between:
| Feature | Free API Key | Paid API Key |
|---|---|---|
| Basic chat | ✅ | ✅ |
| Vault operations | ✅ | ✅ |
| Web Search | ✅ | ✅ |
| RAG | ✅ (limited) | ✅ |
| Workflow | ✅ | ✅ |
| Image Generation | ❌ | ✅ |
| Models | Flash, Gemma | Flash, Pro, Image |
| Cost | Free | Pay per use |
The AI Chat feature provides an interactive conversation interface with Google Gemini, integrated with your Obsidian vault.

Create reusable prompt templates triggered by /:
{selection} (selected text) and {content} (active note)/ to see available commandsDefault: /infographic - Converts content to HTML infographic

Reference files and variables by typing @:
{selection} - Selected text{content} - Active note content[!NOTE] How
{selection}and{content}work: When you switch from Markdown View to Chat View, the selection would normally be cleared due to focus change. To preserve your selection, the plugin captures it when switching views and highlights the selected area with a background color in the Markdown View. The{selection}option only appears in @ suggestions when text was selected.Both
{selection}and{content}are intentionally not expanded in the input area—since the chat input is compact, expanding long text would make typing difficult. The content is expanded when you send the message, which you can verify by checking your sent message in the chat.
[!NOTE] Vault file @mentions insert only the file path — the AI reads content via tools.
Attach files directly: Images (PNG, JPEG, GIF, WebP), PDFs, Text files, Audio (MP3, WAV, FLAC, AAC, Opus, OGG), Video (MP4, WebM, MOV, AVI, MKV)
The AI can interact with your vault using these tools:
| Tool | Description |
|---|---|
read_note |
Read note content |
create_note |
Create new notes |
propose_edit |
Edit with confirmation dialog |
propose_delete |
Delete with confirmation dialog |
bulk_propose_edit |
Bulk edit multiple files with selection dialog |
bulk_propose_delete |
Bulk delete multiple files with selection dialog |
search_notes |
Search vault by name or content |
list_notes |
List notes in folder |
rename_note |
Rename/move notes |
create_folder |
Create new folders |
list_folders |
List folders in vault |
get_active_note_info |
Get info about active note |
get_rag_sync_status |
Check RAG sync status |
bulk_propose_rename |
Bulk rename multiple files with selection dialog |
When the AI handles notes in Chat, it uses Vault tools. Control which vault tools the AI can use via the Database icon (📦) below the attachment button:
| Mode | Description | Tools Available |
|---|---|---|
| Vault: All | Full vault access | All tools |
| Vault: No search | Exclude search tools | All except search_notes, list_notes |
| Vault: Off | No vault access | None |
When to use each mode:
Note: RAG, Web Search, Vault tools, and MCP can all be used simultaneously via the Interactions API.
When AI uses propose_edit:
Changes are NOT written until you confirm.
Track and restore changes made to your notes:
Automatic tracking - All AI edits (chat, workflow) and manual changes are recorded
File menu access - Right-click on a markdown file to access:
Command palette - Also available via "Show edit history" command
Diff view - See exactly what changed with color-coded additions/deletions
Restore - Revert to any previous version with one click
Copy - Save a historical version as a new file (default name: {filename}_{datetime}.md)
Resizable modal - Drag to move, resize from corners
Diff display:
+ lines existed in the older version- lines were added in the newer versionHow it works:
Edit history uses a snapshot-based approach:
When history is recorded:
propose_edit tool)note node)Storage: Edit history is stored in memory and cleared on Obsidian restart. Obsidian's built-in file recovery covers persistent version tracking.

Retrieval-Augmented Generation for intelligent vault search:

MCP (Model Context Protocol) servers provide additional tools that extend the AI's capabilities beyond vault operations.
Setup:
Note: Test connection is required before saving. This ensures the server is reachable and displays available tools.

Using MCP tools:
mcp node to call MCP server tools.Tool hints: After successful connection test, available tool names are saved and displayed in both settings and chat UI for easy reference.
Some MCP tools return interactive UI that allows you to interact with the tool results visually. This feature is based on the MCP Apps specification.
How it works:
ui:// resource URI in its response metadata, the plugin fetches and renders the HTML contentsandbox="allow-scripts allow-forms")In Chat:
In Workflows:
Security: All MCP App content runs in a sandboxed iframe with restricted permissions. The iframe cannot access the parent page's DOM, cookies, or local storage. Only
allow-scriptsandallow-formsare enabled.
Extend the AI with custom instructions, reference materials, and executable workflows. Skills follow the industry-standard agent skills pattern (e.g., OpenAI Codex .codex/skills/).
SKILL.md filesreferences//folder-name to instantly invoke a skill and sendSKILL.md (built-in skills are shown as static labels)Create skills the same way as workflows — select + New (AI), check "Create as agent skill", and describe what you want. The AI generates both the SKILL.md instructions and the workflow. To edit an existing skill, open its SKILL.md and click Modify skill with AI in the Workflow / skill tab — the AI updates both the instructions body and the referenced workflow together.
For setup instructions and examples, see SKILLS.md
Build automated multi-step workflows directly in Markdown files. No programming knowledge required - just describe what you want in natural language, and the AI will create the workflow for you.

From Sidebar:
workflow code block (each file holds exactly one workflow — the filename is its display name)Migrating legacy files: If you open a file that still contains multiple
workflowcode blocks (from before the 1-file-1-workflow redesign), the panel shows a Split into individual files button that writes blocks 2..N to sibling files. Skill capabilities, hotkeys, and event triggers bound to the original path stay attached to the first workflow — rebind them manually if needed.
From Command Palette (Run Workflow):
Use the command "Gemini Helper: Run Workflow" to browse and execute workflows from anywhere:
workflows/ folder are shown first)
This is useful for quickly running workflows without navigating to the workflow file first.

You don't need to learn YAML syntax or node types. Simply describe your workflow in plain language:
Tip: + New (AI) always defaults the output path to
workflows/{{name}}— each file can only hold one workflow, so the currently open file is never auto-filled as the target. If you pick a path that already contains a workflow, the modal asks you to choose a different one.
Create workflow from any file:
When opening the Workflow / skill tab with a file that has no workflow code block, a "Create workflow with AI" button is displayed. Click it to generate a new workflow (default output: workflows/{{name}}.md).
@ File References:
Type @ in the description field to reference files:
@{selection} - Current editor selection@{content} - Active note content@path/to/file.md - Any vault fileWhen you click Generate, file content is embedded directly into the AI request. YAML frontmatter is automatically stripped.
Tip: This is useful for creating workflows based on existing workflow examples or templates in your vault.
File Attachments:
Click the attachment button to attach files (images, PDFs, text files) to your workflow generation request. This is useful for providing visual context or examples to the AI.
Using External LLMs (Copy Prompt / Paste Response):
You can use any external LLM (Claude, GPT, etc.) to generate workflows:
The pasted response can be either raw YAML or a full Markdown document with ```workflow code blocks. Markdown responses are saved as-is, preserving any documentation the LLM included.

Modal Controls:
The AI workflow modal supports drag-and-drop positioning and corner resizing for a better editing experience.
Request History:
Each AI-generated workflow saves a history entry above the workflow code block, including:
Modify Skill with AI:
When the active file is a SKILL.md, the Workflow / skill tab shows a "Modify skill with AI" button instead of (or alongside) the regular workflow modifier. It edits the skill as a whole — both the SKILL.md instructions body and the referenced workflow file — in one pass, preserving the skill's frontmatter (name, description, workflow entries).
Execution History Reference:
When modifying a workflow with AI, you can reference previous execution results to help the AI understand issues:
This is especially useful for debugging workflows - you can tell the AI "Fix the error in step 2" and it will see exactly what input caused the failure.
Request History:
When regenerating a workflow (clicking "No" on the preview), all previous requests in the session are passed to the AI. This helps the AI understand the full context of your modifications across multiple iterations.
Manual Workflow Editing:
Edit workflows directly in the visual node editor with drag-and-drop interface.

Reload from File:
24 node types are available for building workflows:
| Category | Nodes |
|---|---|
| Variables | variable, set |
| Control | if, while |
| LLM | command |
| Data | http, json, script |
| Notes | note, note-read, note-search, note-list, folder-list, open |
| Files | file-explorer, file-save |
| Prompts | prompt-file, prompt-selection, dialog |
| Composition | workflow |
| RAG | rag-sync |
| External | mcp, obsidian-command |
| Utility | sleep |
For detailed node specifications and examples, see WORKFLOW_NODES.md
Assign keyboard shortcuts to run workflows instantly:
Ctrl+Shift+T)When triggered by hotkey:
prompt-file uses the active file automatically (no dialog)prompt-selection uses the current selection, or full file content if no selectionWorkflows can be automatically triggered by Obsidian events:

| Event | Description |
|---|---|
| File Created | Triggered when a new file is created |
| File Modified | Triggered when a file is saved (debounced 5s) |
| File Deleted | Triggered when a file is deleted |
| File Renamed | Triggered when a file is renamed |
| File Opened | Triggered when a file is opened |
Event trigger setup:
File pattern examples:
**/*.md - All Markdown files in any folderjournal/*.md - Markdown files in journal folder only*.md - Markdown files in root folder only**/{daily,weekly}/*.md - Files in daily or weekly foldersprojects/[a-z]*.md - Files starting with lowercase letterEvent variables: When triggered by an event, these variables are set automatically:
| Variable | Description |
|---|---|
_eventType |
Event type: create, modify, delete, rename, file-open |
_eventFilePath |
Path of the affected file |
_eventFile |
JSON with file info (path, basename, name, extension) |
_eventFileContent |
File content (for create/modify/file-open events) |
_eventOldPath |
Previous path (for rename events only) |
Note:
prompt-fileandprompt-selectionnodes automatically use the event file when triggered by events.prompt-selectionuses the entire file content as the selection.
| Model | Description |
|---|---|
| Gemini 3.1 Pro Preview | Latest flagship model, 1M context (recommended) |
| Gemini 3.1 Pro Preview (Custom Tools) | Optimized for agentic workflows with custom tools and bash |
| Gemini 3 Flash Preview | Fast model, 1M context, best cost-performance |
| Gemini 3.1 Flash Lite | Stable low-latency, cost-effective model, 1M context |
| Gemini 2.5 Flash | Fast model, 1M context |
| Gemini 2.5 Pro | Pro model, 1M context |
| Gemini 3 Pro (Image) | Pro image generation, 4K |
| Gemini 3.1 Flash (Image) | Fast, low-cost image generation |
Thinking mode: In Chat, thinking mode is triggered by keywords like "think", "analyze", or "consider" in your message. However, Gemini 3.1 Pro always uses thinking mode regardless of keywords — this model does not support disabling thinking.
Always Think toggle:
You can force thinking mode ON for Flash models without using keywords. Click the Database icon (📦) to open the tool menu, and check the toggles under Always Think:
When a toggle is ON, thinking is always active for that model family regardless of message content. When OFF, the existing keyword-based detection is used.

| Model | Vault Operations |
|---|---|
| Gemini 2.5 Flash | ✅ |
| Gemini 2.5 Flash Lite | ✅ |
| Gemini 3 Flash Preview | ✅ |
| Gemini 3.1 Flash Lite | ✅ |
| Gemma 4 (31B, 26B A4B MoE) | ✅ |
Gemini HelperUse BRAT if you want to test beta versions directly from this repository.
https://github.com/takeshy/obsidian-gemini-helpermain.js, manifest.json, styles.css from releasesgemini-helper folder in .obsidian/plugins/git clone https://github.com/takeshy/obsidian-gemini-helper
cd obsidian-gemini-helper
npm install
npm run build


Password-protect your chat history and workflow execution logs separately.
Setup:


Each setting can be enabled/disabled independently.
Features:
How it works:
[Setup - once when setting password]
Password → Generate key pair (RSA) → Encrypt private key → Store in settings
[Encryption - for each file]
File content → Encrypt with new AES key → Encrypt AES key with public key
→ Save to file: encrypted data + encrypted private key (from settings) + salt
[Decryption]
Password + salt → Restore private key → Decrypt AES key → Decrypt file content
#!/usr/bin/env python3
"""Decrypt Gemini Helper encrypted files without the plugin."""
import base64, sys, re, getpass
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from cryptography.hazmat.primitives.asymmetric import padding
def decrypt_file(filepath: str, password: str) -> str:
with open(filepath, 'r') as f:
content = f.read()
# Parse YAML frontmatter
match = re.match(r'^---\n([\s\S]*?)\n---\n([\s\S]*)$', content)
if not match:
raise ValueError("Invalid encrypted file format")
frontmatter, encrypted_data = match.groups()
key_match = re.search(r'key:\s*(.+)', frontmatter)
salt_match = re.search(r'salt:\s*(.+)', frontmatter)
if not key_match or not salt_match:
raise ValueError("Missing key or salt in frontmatter")
enc_private_key = base64.b64decode(key_match.group(1).strip())
salt = base64.b64decode(salt_match.group(1).strip())
data = base64.b64decode(encrypted_data.strip())
# Derive key from password
kdf = PBKDF2HMAC(algorithm=hashes.SHA256(), length=32, salt=salt, iterations=100000)
derived_key = kdf.derive(password.encode())
# Decrypt private key
iv, enc_priv = enc_private_key[:12], enc_private_key[12:]
private_key_pem = AESGCM(derived_key).decrypt(iv, enc_priv, None)
private_key = serialization.load_der_private_key(base64.b64decode(private_key_pem), None)
# Parse encrypted data: key_length(2) + enc_aes_key + iv(12) + enc_content
key_len = (data[0] << 8) | data[1]
enc_aes_key = data[2:2+key_len]
content_iv = data[2+key_len:2+key_len+12]
enc_content = data[2+key_len+12:]
# Decrypt AES key with RSA private key
aes_key = private_key.decrypt(enc_aes_key, padding.OAEP(
mgf=padding.MGF1(algorithm=hashes.SHA256()), algorithm=hashes.SHA256(), label=None))
# Decrypt content
return AESGCM(aes_key).decrypt(content_iv, enc_content, None).decode('utf-8')
if __name__ == "__main__":
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} <encrypted_file>")
sys.exit(1)
password = getpass.getpass("Password: ")
print(decrypt_file(sys.argv[1], password))
Requires: pip install cryptography
Warning: If you forget your password, encrypted files cannot be recovered. Keep your password safe.
Tip: To encrypt all files in a directory at once, use a workflow. See the "Encrypt all files in a directory" example in WORKFLOW_NODES.md.

Security benefits:
read_note tool). This keeps sensitive data like API keys safe from accidental exposure during chat.note-read node. When accessed, a password dialog appears, and the password is cached for the session./
Data stored locally:
Data sent to Google:
Data sent to third-party services:
http nodes can send data to any URL specified in the workflowMCP servers (optional):
mcp nodesSecurity notes:
http nodes can transmit vault data to external endpointsnote nodes show a confirmation dialog before writing files (default behavior)confirmEdits: false will auto-apply file edits without showing Apply/Discard buttonshttp headers, mcp settings, etc.). Instead, store them in encrypted files and use note-read node to retrieve them at runtime. Workflows can read encrypted files with password prompt.See Google AI Terms of Service for data retention policies.
MIT
If you find this plugin useful, consider buying me a coffee!