by 余汉波
Generate text and images, search note collections, and schedule AI workflows on desktop.
yuhanbo-ai-auto
Generate and save AI text and images inside Obsidian Desktop. Reuse prompt templates, include matching notes from an indexed collection, and run configured automation on a schedule.
Installation
- Use Obsidian Desktop 1.15.1 or later.
- In Settings → Community plugins → Browse, search for yuhanbo-ai-auto when it is listed. To install manually, download
main.js,manifest.json, andstyles.cssfrom the same GitHub release. - Put those files in
<vault configuration directory>/plugins/yuhanbo-ai-auto/and enable the plugin in Community plugins. If upgrading from the older manual plugin with IDobsidian-ai-auto, back up its settings first and disable the old plugin.
Usage
- In the plugin settings, choose a default model. Configure its provider credentials or sign in to Codex CLI or OpenCode CLI on your computer.
- With a Markdown note open, use the command palette to find the plugin's direct-generation command. Enter a prompt, choose a model, and submit. The answer is written at the cursor. Selection commands can insert or replace a selected passage.
- Configure a vault folder for prompt templates. Type
/in the prompt box to select one. Type@to choose a note collection after building its index in the plugin settings. - Scheduled generation, SMTP notifications, and automatic indexing use an activation code. Manual generation and manual indexing remain available without activation. The plugin verifies codes offline.
- When you choose an online provider, the prompt and relevant selected note content or attachments are sent to that provider. Credentials and activation codes are stored in the vault's plugin settings. The desktop CLI launchers access their local executables, configuration, and a temporary working directory.
中文说明
在 Obsidian 桌面端生成文本和图片,使用知识库检索笔记,并按时间自动生成内容。手动操作可直接使用,定时与后台自动化需要激活。
安装
- 需要 Obsidian 桌面版 1.15.1 或更新版本。Windows、macOS 和 Linux 使用相同的发行包,当前版本以 Windows 为验收环境。文件夹右键的 PowerShell 和 iflow 入口仅在 Windows 显示。
- 社区目录收录前,可从本仓库的 Releases 下载同版的
manifest.json、main.js、styles.css。将三个文件放进库配置目录下的plugins/yuhanbo-ai-auto,然后在「设置 → 第三方插件」启用。 - 从旧版手动安装迁移时,先备份本地设置并关闭旧插件。新 ID 是
yuhanbo-ai-auto,旧 ID 是obsidian-ai-auto。需要迁移时,可在插件关闭期间将旧data.json复制到新插件目录,再手动启用新版。旧热键带有旧 ID,需要在 Obsidian 的「快捷键」里重新绑定。已有知识库向量、模板和任务笔记仍在原路径。
开始使用
- 在「设置 → yuhanbo-ai-auto」配置服务。可使用已登录的 Codex CLI 或 OpenCode CLI,也可配置大模型 API。自定义 OpenAI 兼容模型需绑定具体供应商和模型 ID。
- 编辑 Markdown 笔记,通过命令面板选择「直接调用AI生成内容」,或先选中文本再用「调用AI生成并插入内容」「调用AI生成并替换内容」。
- 在「提示词模板路径」填入库内模板文件夹。可配置多个位置,生成窗口可以按模板文件名选择提示词。
- 通过「直接生成图片」填写描述并选择图片模型。生成的文件保存在设置中的图片目录。
- 在「知识库管理」选择笔记目录和嵌入模型。使用「增量更新」建立索引,生成窗口可选择知识库作为上下文。更换嵌入模型后,用「强制更新」重建旧索引。局部工作流可用用户配置的「快速生成」命令重复使用同一模型、模板和上下文长度。
知晓所选服务的数据与费用条款后再提交。仅使用手动功能时也可能产生供应商端费用。
自动化授权
定时任务、任务邮件和知识库后台自动更新需要同一份激活码。在「设置 → yuhanbo-ai-auto → 自动化授权」输入并激活,原有定时任务和知识库配置即可按开关执行。移除本地激活码后,定时器立即停用,任务和知识库设置保留。已经发给供应商的请求可能仍然完成或计费。
- 手动文本、模板、图像及支持的媒体调用、知识库手动创建、更新和检索可以在未激活时使用。
- 激活采用 Ed25519 离线验签,激活码适用于本插件的自动化功能。验证不需要账户、设备标识或授权服务器。当前激活码无设备绑定、有效期及远程撤销功能。请按购买或取得激活码时提供的说明保管和使用。
- GitHub 的公开仓库提供可阅读的构建与发行附件,完整维护源码保存在私有仓库,可由授权的社区审核应用读取。软件发布和使用条款见 LICENSE。
隐私与网络披露 / Privacy and network disclosure
| 操作 | 访问的数据与连接 |
|---|---|
| 文本、图像、音视频生成 | 向选择的 OpenRouter、DeepSeek、Gemini/Imagen、SiliconFlow 或自定义兼容接口发送提示词、用户选择的文本、模板和适用的关联笔记、图片或知识库片段。支持联网图片输入的路径可请求该图片的来源地址。 |
| 本机 CLI | 启动用户选定的 Codex 或 OpenCode 可执行文件,将实际提示词通过标准输入传递。CLI 使用本机已有账户和模型连接,可访问其配置;插件在系统临时目录保存运行所需的临时文件,结束后尝试清理。 |
| 知识库 | 读取选定目录的 Markdown。在生成嵌入时把文本发送到所选 Gemini、OpenRouter、SiliconFlow 或 Ollama 端点,在库内写入向量与索引记录。启用自动更新后会按文件变化和周期运行。 |
| 定时与邮件 | 启用任务后,在 Obsidian 运行期间读取指定笔记并生成内容。在启用邮件的情况下,生成内容和账号凭据会传到配置的隐式 TLS SMTP 服务器,通常使用 465 端口。 |
| 本地 HTTP 接口 | 默认关闭。显式配置令牌后监听 127.0.0.1:27123,为受信任的本机客户端提供模板列表、Markdown 模板读取及生成结果写入。禁用原来的网页跨域访问。 |
| 文件夹右键 | 用户主动点击时可复制路径或在库内指定目录启动 PowerShell。Windows 端的 iflow 入口依赖用户已经安装的可执行文件。 |
API Key、SMTP 应用密码、本地令牌和激活码保存在当前库配置目录的插件 data.json。这些配置可随库备份或同步,请将其作为敏感文件保管。插件没有分析统计、客户端遥测或动态广告。社区更新由 Obsidian 从 GitHub Release 获取。
本地 HTTP 客户端
使用 POST http://127.0.0.1:27123/,发送 Authorization: Bearer <本地令牌> 与 Content-Type: application/json。令牌应使用至少 32 个字符的随机无空格 ASCII 字符串,各客户端用独立的本机安全配置保管。
getTemplates使用path与可选的searchText。getTemplateContent的path是库内 Markdown 文件。saveContent使用content与库内目标目录path。- 接口接受最多 1 MiB 的请求,返回库内相对路径。使用旧版接口的客户端需要补充请求头。
当前版本
3.1.0 引入离线激活、显式启用的本地接口和三个附件的可复现发布。AI 服务、模型选择和用量以供应商和本机账户提供的能力为准。
👨💻 作者信息
余汉波 - 编程爱好者-量化交易和效率工具开发
-
GitHub: @yuhanbo758
-
Email: yuhanbo@sanrenjz.com
-
Website: 三人聚智
🌐 相关链接
联系我们
证券开户(+V:yuhanbo758):证券开户免5万0.854,无门槛开量化QMT,送框架策略,支持VIP快速通道,也可开Ptrade | 余汉波 文档
三人聚智下载:sanrenjz - 三人聚智
codebot 下载:sanrenjz-codebot - 三人聚智-余汉波


🙏 致谢
感谢所有为本项目贡献代码和想法的开发者们!
⭐ 如果这个项目对您有帮助,请给它一个 Star!
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.