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

Margin

GarryGarry32 downloads

右侧对话 + 划词悬浮沟通,支持模型切换与用量查看,初期对接 Gemini,可扩展多模型。

Add to Obsidian
  • Overview
  • Scorecard
  • Updates8

中文 | English

Margin

Margin is an AI assistant plugin for Obsidian: a side-panel chat plus a selection popover. Select any text, ask questions about it, and insert or overwrite the result with one click. Multi-model, streaming output, note association and usage statistics.

Obsidian AI 插件:右侧对话 + 划词悬浮问答。基于选区提问,结果一键插入/覆盖;支持多模型、流式输出与用量统计。 没有什么科技含量,单纯为极简使用AI


Features / 功能特点

  • 💬 Side-panel chat / 右侧对话 — streaming output, model switching, session usage stats
  • 🖱️ Selection popover / 划词问答 — right-click "Margin" on selected text, ask about the selection
  • 📥 Insert / Overwrite / 插入 / 覆盖 — one-click insert at cursor or overwrite selection
  • 📎 Note association / 笔记关联 — auto-attach the current note; [[ suggestion chips, removable
  • 🔄 Retry / 失败重试 — one-click retry on failure without losing history
  • ⚙️ Multi-model / 多模型管理 — add/remove models, independent API keys, connection test fills in limits

Installation / 安装

Option 1: Download ZIP / 方式一:下载 ZIP

  1. Click Code → Download ZIP in this repository
  2. Extract and place in <vault>/.obsidian/plugins/margin-ai-chat/ (点击本仓库 Code → Download ZIP,解压后放入该目录)

Option 2: Download by Release / 方式二:按版本下载

Visit Releases to download a specific version. (前往 Releases 下载对应版本。)


Configuration (Gemini) / 配置

  1. Open plugin settings → Add model / 打开插件设置 → 添加模型
  2. Enter the model name you want, e.g. gemini-3.5-flash (matches Google AI Studio) / 模型名称填你想要的型号
  3. Enter your Gemini API key (https://aistudio.google.com/api-keys) / API Key 填你的 Gemini Key

Usage / 使用

  1. Side-panel chat: click the sidebar icon, or run "Open AI Chat" from the command palette / 点击侧边栏图标,或命令面板「打开 AI Chat」
  2. Selection popover: select text → right-click "Margin" → ask in the popover → insert at cursor / overwrite selection / 选中文字 → 右键「Margin」→ 悬浮窗提问 → 插入光标 / 覆盖选区
  3. Note association: type [[ for note suggestions, pick to attach; tags can be removed anytime / 输入 [[ 弹出笔记候选,选中即关联;标签可随时移除
设置 / Settings 悬浮窗对话 / Popover

Privacy / 隐私说明

  • 🔑 API keys stay local / API Key 仅存本地 — stored in your vault's data.json, never uploaded
  • 📤 Note content is sent to the model / 笔记内容发送给模型 — attached notes and selections go to your configured model API (e.g. Gemini)
  • 📊 No data collection / 不收集数据 — no analytics, telemetry, or third-party reporting

Roadmap / 后续规划

  • Side-panel chat + selection popover / 右侧对话 + 划词悬浮问答
  • Multi-model management / 多模型管理
  • Note [[ ]] association & suggestions / 笔记 [[ ]] 关联与补全
  • Retry on failure / 失败重试

Changelog / 更新日志

Releases


Acknowledgements / 致谢

  • Obsidian
  • Google AI Studio

Issues and Pull Requests are welcome! 欢迎提交 Issue 和 Pull Request!

HealthExcellent
ReviewSatisfactory
About
Chat in a persistent right sidebar with streaming replies, switch models, and view per-conversation usage stats. Select text and right-click to ask via a floating prompt, then insert or overwrite answers, link notes with [[ completion, retry failed requests, and keep API keys and note data local.
AISidebarEditing
Details
Current version
0.1.031
Last updated
5 days ago
Created
Last week
Updates
8 releases
Downloads
32
Compatible with
Obsidian 1.13.0+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Author
GarryGarrycurryhendry
github.com/curryhendry
GitHubcurryhendry
  1. Community
  2. Plugins
  3. AI
  4. Margin

Related plugins

Gemini Scribe

Allows you to interact with Gemini and use your notes as context.

Claude Sidebar

Run Claude Code in your sidebar.

Notebook Navigator

A better file browser and calendar inspired by Apple Notes, Bear, Evernote and Day One.

Smart Connections

Find related notes and excerpts while writing. Your AI link building copilot displays relevant content in graph + list view. A local embedding model powers semantic search. Zero setup. No API key.

Claudian

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

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

Meta Bind

Make your notes interactive with inline input fields, metadata displays, and buttons.

Tag Wrangler

Rename, merge, toggle, and search tags from the tag pane.

Copilot

Run AI agents such as Claude Code, Codex, and OpenCode inside your vault. Turn your second brain into a smart assistant that gets knowledge work done.

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.