Obsidian · 2026 · 深度整合指南 Obsidian · 2026 · Integration Guide

Top 20 Obsidian 整合
代碼自動化全圖鑑
Top 20 Obsidian Integrations
Code Automation Atlas

從 Local REST API 到 Agent SDK,從 Notion 雙向同步到本地 Gemma-4 寫作引擎——完整的代碼範例、自動化流程與架構設計。 From Local REST API to Agent SDK, from bidirectional Notion sync to a local Gemma-4 writing engine — complete code examples, automation pipelines, and architecture diagrams.

Obsidian 1.8+ TypeScript / Python Anthropic Agent SDK LM Studio · 192.168.1.235:1234 google/gemma-4-e4b
20
整合插件Integrations
官方精選 2025–26Curated 2025–26
5
AI 工具AI Tools
本地 + 雲端混合Local + Cloud hybrid
8
SDK 方法SDK Methods
Gemma-4 寫作 SDKGemma-4 Writing SDK
27124
REST API Port
Local REST API
MCP
Agent Protocol
Claude ↔ Obsidian
整合架構總覽Integration Architecture Overview
OBSIDIAN VAULT AI LAYER EXTERNAL SERVICES Local REST API :27124 · Bearer Token Obsidian Core Vault · Plugins · Notes MCP Server mcp-obsidian · obsidian-mcp-tools GitHub Obsidian Git · Commit Hooks Notion Sync Plugin · Python API n8n / Make.com Post Webhook · Automation Zotero Desktop Connector · Web API Cloud Storage Remotely Save · S3/WebDAV LM Studio 192.168.1.235:1234 google/gemma-4-e4b Anthropic Agent SDK claude-sonnet-4-6 Tool Use · Agentic Loop Copilot + Smart Connections Chat · Semantic Search Text Generator Write · Translate · Summarize REST API AI / MCP 外部服務External 自動化Automation
Top 20 Obsidian 整合詳解Top 20 Obsidian Integrations — In Depth
基礎設施Infrastructure
AI / LLM
同步 / 備份Sync / Backup
自動化Automation
視覺化Visualization
搜尋Search
01
🔌
Local REST API
基礎設施Infrastructure
所有外部自動化的底層。提供 HTTPS REST 端點,讓腳本、瀏覽器擴展和 AI Agent 直接操作 Vault。 The foundation for all external automation. Exposes HTTPS REST endpoints so scripts, browser extensions, and AI agents can manipulate the Vault directly.
:27124Bearer AuthMCP
02
🌿
Obsidian Git
版本控制Version Control
自動提交同步、定時 pull/push、commit hook 觸發 Obsidian 更新。全社群 Top 10 下載量。 Auto-commit sync, scheduled pull/push, and commit hooks that trigger Obsidian updates. Top-10 plugin by community downloads.
auto-commithookGitHub
03
📊
Dataview
查詢引擎Query Engine
SQL-like 語法查詢整個 Vault。DataviewJS 支援完整 JavaScript,可呼叫外部 API 並動態渲染表格。 SQL-like syntax for querying the entire Vault. DataviewJS enables full JavaScript, external API calls, and dynamic table rendering.
DQLDataviewJSmetadata
04
Templater
模板引擎Template Engine
JavaScript 沙箱動態模板。可呼叫系統命令、fetch API、與 Dataview 深度整合。支援用戶腳本模組。 Dynamic templates with a JavaScript sandbox. Supports system commands, fetch API calls, deep Dataview integration, and user script modules.
JS sandboxuser scriptsshell exec
05
🚀
QuickAdd
宏自動化Macro Automation
Templates + Captures + Macros + Multis 組成強大自動化引擎。一個快捷鍵執行多步驟複雜流程。 Templates + Captures + Macros + Multis form a powerful automation engine. A single hotkey runs complex multi-step workflows.
macrohotkeyAPI
06
🤖
Obsidian Copilot
AI 對話AI Chat
支援 OpenAI / Anthropic / 本地 LLM。可直接接入 LM Studio (192.168.1.235:1234) 用 Gemma-4 聊天。 Supports OpenAI, Anthropic, and local LLMs. Connect to LM Studio (192.168.1.235:1234) and chat directly with Gemma-4.
local LLMLM StudioRAG
07
🔮
Smart Connections
語義搜尋Semantic Search
向量嵌入 + RAG。支援 Ollama / LM Studio 本地模型。在 Vault 中語義搜尋並用 AI 回答問題。 Vector embeddings + RAG. Supports Ollama and LM Studio local models. Semantic search across your Vault with AI-powered answers.
embeddingsvectorOllama
08
✍️
Text Generator
AI 寫作AI Writing
支援自訂端點。設定 Endpoint 為 http://192.168.1.235:1234/v1/chat/completions 即可接入 Gemma-4。 Supports custom endpoints. Set Endpoint to http://192.168.1.235:1234/v1/chat/completions to connect Gemma-4.
Gemma-4custom endpointtemplates
09
🔗
mcp-obsidian
MCP Server
Agent SDK 的核心橋樑。讓 Claude Desktop / Claude Code 透過 MCP 協議直接讀寫 Vault。 Core bridge for the Agent SDK. Lets Claude Desktop and Claude Code read/write the Vault directly over the MCP protocol.
MCPClaudeAgent SDK
10
🪝
Post Webhook
Webhook 自動化Webhook Automation
將筆記或選取文字 POST 到任意 Webhook。完美整合 n8n / Make.com / Zapier,觸發外部流程。 POST notes or selected text to any webhook. Seamlessly integrates with n8n, Make.com, and Zapier to trigger external workflows.
n8nMakeYAML frontmatter
11
☁️
Remotely Save
雲端同步Cloud Sync
S3 / Cloudflare R2 / Dropbox / WebDAV / OneDrive / Google Drive。端對端加密,手動或定時同步。 S3, Cloudflare R2, Dropbox, WebDAV, OneDrive, and Google Drive. End-to-end encryption with manual or scheduled sync.
S3E2E encryptWebDAV
12
📋
Kanban
專案管理Project Management
Markdown 驅動的看板。透過 REST API 可程式化新增卡片,自動從 GitHub Issues 同步至看板欄位。 Markdown-driven kanban boards. Programmatically add cards via REST API and auto-sync GitHub Issues to board columns.
GitHub Issuesmarkdownautomation
13
🎨
Excalidraw
視覺化Visualization
內建腳本引擎 (ExcalidrawAutomate),可從 Dataview 數據自動生成架構圖、心智圖。LaTeX + Markdown 支援。 Built-in script engine (ExcalidrawAutomate) auto-generates architecture and mind-map diagrams from Dataview data. LaTeX + Markdown support.
script engineauto-genLaTeX
14
Tasks
任務追蹤Task Tracking
全 Vault 任務管理。支援截止日、重複任務、查詢過濾。透過 REST API 批次更新任務狀態、Jira 同步。 Vault-wide task management with due dates, recurring tasks, and query filters. Batch-update task status via REST API and sync with Jira.
due datesrecurringJira sync
15
📅
Periodic Notes
時間軸筆記Time-based Notes
日記 / 週記 / 月記 / 年記一體化管理。結合 Agent SDK 自動生成 AI 週報,包含 Git 活動摘要。 Unified daily, weekly, monthly, and yearly note management. Combine with Agent SDK to auto-generate AI weekly reports with Git activity summaries.
dailyweekly AIcalendar
16
📝
Notion Sync
Notion 整合Notion Integration
Notion ↔ Obsidian 雙向同步。Python 腳本將 Notion Blocks 轉換為 Markdown,保留 frontmatter 元數據。 Bidirectional Notion ↔ Obsidian sync. Python scripts convert Notion blocks to Markdown while preserving frontmatter metadata.
bidirectionalPythonAPI
17
📚
Zotero Connector
學術引用Academic Citations
Nunjucks 模板生成文獻筆記。自動匯入 PDF 標注、作者、DOI、摘要。支援 Zotero Web API(無需本地安裝)。 Nunjucks templates generate literature notes. Auto-imports PDF annotations, authors, DOIs, and abstracts. Supports Zotero Web API — no local install required.
citationsPDF annotationsBibTeX
18
🦁
Claudian
Claude Code 整合Claude Code Integration
將 Claude Code 嵌入 Vault。支援多對話 Tab、fork/resume、@mention 文件和 MCP servers。 Embeds Claude Code inside the Vault. Supports multi-tab conversations, fork/resume, @mention files, and MCP servers.
Claude CodeMCPmulti-tab
19
🔗
Advanced URI
URL Scheme
URL scheme 驅動自動化。從 shell 腳本 / cron / Shortcuts 觸發開啟筆記、追加內容、執行命令。 URL scheme–driven automation. Open notes, append content, and run commands triggered from shell scripts, cron jobs, or Shortcuts.
obsidian://shellcron
Git Commit → Obsidian 更新流水線 Git Commit → Obsidian Update Pipeline
STEP 01
💾
Git Commit
post-commit hook 觸發,獲取 commit 資訊 post-commit hook fires, captures commit info
STEP 02
🔌
REST API 呼叫REST API Call
POST 至 :27124 更新 Dev Logs 筆記 POST to :27124 to update Dev Logs note
STEP 03
🤖
Agent SDK
Claude 分析 diff,生成技術說明 Claude analyses the diff and writes a technical summary
STEP 04
✍️
Gemma-4 潤色Gemma-4 Polish
本地 LLM 翻譯 / 摘要 / 改寫 Local LLM translates, summarises, and rewrites
STEP 05
📋
Vault 更新Vault Update
寫入 Dev Logs,觸發 Dataview 重新索引 Write to Dev Logs, trigger Dataview re-index
STEP 06
🪝
Webhook 推送Webhook Push
Post Webhook → n8n → Notion 同步 Post Webhook → n8n → Notion sync
全域 Git Hook 設置Global Git Hook Setup
執行 git config --global core.hooksPath ~/.config/git/hooks 然後將 post-commit 腳本放入 ~/.config/git/hooks/post-commit, 即可對所有 git 倉庫生效,無需每個倉庫單獨設定。 Run git config --global core.hooksPath ~/.config/git/hooks then place the post-commit script in ~/.config/git/hooks/post-commit. This applies to every git repository without per-repo setup.
Gemma-4 寫作 SDK 方法一覽 Gemma-4 Writing SDK Methods
端點配置Endpoint Configuration
LM Studio 運行於 http://192.168.1.235:1234/v1, 使用 OpenAI 相容格式。所有 OpenAI SDK 客戶端只需修改 baseURL 即可接入。 LM Studio runs at http://192.168.1.235:1234/v1 with an OpenAI-compatible API. Any OpenAI SDK client only needs to change baseURL to connect.
方法Method 用途Purpose 參數Params 類型Type
write(prompt, options) 根據提示生成文章/段落支援 formal / casual / academic / creative 語氣 Generate articles or paragraphs from a promptSupports formal / casual / academic / creative tone tone maxTokens language LOCAL
translate(text, targetLang) 翻譯文字到目標語言技術術語保留原文並附翻譯 Translate text to target languageTechnical terms are preserved with translation targetLang sourceLang LOCAL
summarize(text, options) 生成文字摘要支援 paragraph / bullets / tldr 格式 Generate text summariesSupports paragraph / bullets / tldr formats length format LOCAL
improve(text, instruction) 潤色改進文字提升流暢度、清晰度,保持原意 Polish and improve textEnhances fluency and clarity while preserving intent instruction LOCAL
writeStream(prompt) 串流生成長文AsyncGenerator,適合即時顯示 Stream-generate long contentAsyncGenerator — ideal for real-time display prompt LOCAL
healthCheck() 檢查 LM Studio 連線狀態確認 gemma-4-e4b 模型已載入 Check LM Studio connectionConfirms gemma-4-e4b model is loaded UTILS
translateNote(path, lang) AI 翻譯整份 Obsidian 筆記輸出至 {原名}-{語言}.md AI-translate an entire Obsidian noteOutputs to {original-name}-{lang}.md notePath targetLang INTEGRATION
summarizeFolder(folder, output) 批次摘要整個資料夾生成統一的摘要索引文件 Batch-summarise an entire folderGenerates a unified summary index file folder outputNote INTEGRATION
Agent SDK + Gemma-4 整合核心代碼 Agent SDK + Gemma-4 Core Integration Code
obsidian-agent.ts · Agentic Loop Anthropic Agent SDK + Local REST API
import Anthropic from '@anthropic-ai/sdk';
import { OpenAI } from 'openai';

// ── 連接兩個 AI 層 / Connect both AI layers ──────────────
const claude = new Anthropic(); // Agent SDK (claude-sonnet-4-6)
const gemma  = new OpenAI({   // 本地 Gemma-4 / Local Gemma-4
  baseURL: 'http://192.168.1.235:1234/v1',
  apiKey:  'lm-studio',
});

// ── Agentic Loop ─────────────────────────────────────────
async function runAgent(task: string) {
  const messages = [{ role: 'user', content: task }];

  while (true) {
    const res = await claude.messages.create({
      model: 'claude-sonnet-4-6',
      max_tokens: 8096,
      tools: obsidianTools,
      messages,
    });

    messages.push({ role: 'assistant', content: res.content });

    if (res.stop_reason === 'end_turn') break;

    // 執行工具呼叫 / Execute tool calls
    const results = await executeTools(res.content);
    messages.push({ role: 'user', content: results });
  }
}

// ── Gemma-4 寫作 SDK / Writing SDK ───────────────────────
async function summarize(text: string) {
  const r = await gemma.chat.completions.create({
    model: 'google/gemma-4-e4b',
    messages: [
      { role: 'system', content: '用繁體中文生成100字內摘要' },
      { role: 'user',   content: text },
    ],
    temperature: 0.3,
  });
  return r.choices[0].message.content;
}
post-commit · Git Hook bash · 全域global ~/.config/git/hooks/
#!/bin/bash
# 每次 git commit 後自動更新 Obsidian Dev Logs
# Auto-update Obsidian Dev Logs after every git commit

COMMIT_HASH=$(git rev-parse HEAD)
COMMIT_MSG=$(git log -1 --pretty=%B)
REPO=$(basename $(git rev-parse --show-toplevel))
CHANGED=$(git diff-tree --no-commit-id -r --name-only HEAD)

# 1. 寫入 Obsidian Dev Logs(REST API)/ Write via REST API
curl -sk -X POST \
  "https://127.0.0.1:27124/vault/Dev%20Logs%2F${REPO}.md" \
  -H "Authorization: Bearer ${OBSIDIAN_API_KEY}" \
  -H "Content-Type: text/markdown" \
  --data-raw "
## $(date '+%Y-%m-%d %H:%M') | ${COMMIT_HASH:0:7}
**${COMMIT_MSG}**
$(echo "$CHANGED" | awk '{print "- " \$0}')
"

# 2. 背景觸發 Agent SDK / Trigger Agent SDK in background
node ~/.obsidian-agent/post-commit.js \
  --repo "${REPO}" --hash "${COMMIT_HASH:0:7}" &

echo "📝 Obsidian dev log updated"