sourit2001225 downloadsAsk questions about your current note or vault using your local Codex CLI.
AskVault is a desktop-only Obsidian plugin that lets you ask questions about the current note or the entire vault through your locally installed OpenAI Codex CLI.
AskVault 目前仅支持桌面版 Obsidian。每位用户需要使用自己的 Codex 登录状态,插件不会附带或共享作者的账号。
安装桌面版 Obsidian,并打开自己的知识库。
在电脑的终端中执行:
npm install -g @openai/codex
codex login
按照浏览器中的提示完成登录。
在 Obsidian 中进入 设置 > 第三方插件 > 浏览,搜索 AskVault,点击 安装 和 启用。
点击左侧工具栏中的 AskVault 图标,或在命令面板中搜索 Open read-only vault chat。
AskVault 已在 Obsidian 第三方插件目录中提供,用户不需要下载压缩包或复制插件文件。
已经安装过 AskVault 的用户,请在第三方插件列表中检查更新并升级到 0.1.3 或更高版本。0.1.3 修复了从另一台电脑复制配置后无法连接,以及 macOS 上误用旧版 Homebrew Codex 的问题。
Codex 对话/ 文件夹。通常不需要修改设置中的 Codex executable 或 Node executable,两项保持为空即可。插件会在每台电脑上自动查找已经安装的 Codex;macOS 上也会自动使用 Codex 桌面端内附的可执行文件。
codex --version,确认能输出版本号;建议使用 0.133.0 或更新版本。codex login,重新完成登录后回到 Obsidian 点击 重连。/Applications/Codex.app/Contents/Resources/codex,并将 Node executable 留空。Codex 对话/.1.7.0 or later.codex app-server (0.133.0 is tested).codex login.AskVault uses the Codex usage included in your ChatGPT plan when your CLI is logged in through ChatGPT. It does not configure or store an OpenAI API key.
Install and authenticate Codex CLI:
npm install -g @openai/codex
codex login
Enable AskVault in Obsidian.
Open the AskVault sidebar using the ribbon icon or command palette.
AskVault automatically locates codex from common npm installation locations and PATH, preferring a user-level npm installation over a potentially stale system copy. For a normal installation, leave both Codex executable and Node executable empty.
Set the default model and reasoning effort under Settings > Community plugins > AskVault. These options apply to questions sent from the sidebar and are intentionally hidden from the composer.
If a copied vault contains an absolute executable path from another computer, AskVault ignores that missing path and attempts automatic detection on the current computer. Clear the old path in settings after a successful connection.
If automatic detection cannot find codex, set an absolute executable path in AskVault settings. If that executable is a JavaScript entry point, also set Node executable to the absolute Node path.
If multiple Codex installations exist, run codex --version and configure an absolute path to a recent installation. An older CLI may not implement the app-server protocol AskVault uses.
AskVault starts a local Codex CLI subprocess and sends selected note context or requests to search vault files to that process. Codex may transmit relevant context to OpenAI according to your Codex configuration and account terms.
Current note mode sends the open Markdown note on the first question, then reuses it for follow-up questions until the note changes.Whole vault mode allows Codex to search relevant Markdown files in the vault.保存; saved conversations become Markdown files in your vault.Codex may initialize configured MCP servers or plugins on startup. Non-fatal background warnings are hidden from the chat panel when the core connection succeeds.
Manual installation is intended only as a fallback. Copy main.js, manifest.json, and styles.css into:
<vault>/.obsidian/plugins/ask-vault/
Then reload Obsidian and enable AskVault under Community plugins.
AskVault is listed in the official Obsidian Community Plugins directory. Publish a GitHub release for each new version; use BRAT only for testing an unreleased version. Do not distribute data.json from an installed vault plugin directory: it contains computer-specific paths, proxy settings, and model preferences.
Each user only needs to:
npm install -g @openai/codex and codex login.For maintainers testing an unreleased build through BRAT, add:
https://github.com/sourit2001/AskVault
MIT