复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-obsidian-f996d1dac234 ,按照其中的说明把「obsidian」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Use this for local Obsidian vault work. An Obsidian vault is a normal folder of Markdown files plus .obsidian/ config.
~/Library/Application Support/obsidian/obsidian.jsonobsidian~/obsidianobsidian~/obsidian.command -v obsidian
obsidian version
obsidian vaults
cd ~/obsidian
obsidian commands filter=search:
Global commands like version and vaults work outside a vault. Vault-content
commands may print Vault not found. outside ~/obsidian. Use obsidian commands, not obsidian help, for CLI discovery.
If obsidian says CLI is disabled:
~/Library/Application Support/obsidian/obsidian.json uses "cli": true.Prefer official CLI for Obsidian-aware lookups:
cd ~/obsidian
obsidian search query="OpenClaw" format=json
obsidian search:context query="OpenClaw" limit=20 format=json
obsidian read path="Folder/Note.md"
obsidian file path="Folder/Note.md"
obsidian outline path="Folder/Note.md" format=json
obsidian backlinks path="Folder/Note.md" format=json
obsidian links path="Folder/Note.md"
obsidian properties path="Folder/Note.md" format=json
Use direct filesystem reads when you already know the path and need exact bytes:
sed -n '1,220p' "$HOME/obsidian/Folder/Note.md"
rg -n "term" "$HOME/obsidian"
Report which source you used when freshness or vault choice matters.
Choose the narrowest write path:
obsidian create path="Folder/Note.md" content="...".obsidian daily:append content="...".apply_patch on the Markdown file.obsidian move path="Old.md" to="Folder/New.md" so links can update.open only when useful or requested.Common commands:
cd ~/obsidian
obsidian create path="Notes/New.md" content="# New\n\nBody"
obsidian append path="Notes/New.md" content="More text"
obsidian move path="Notes/New.md" to="Archive/New.md"
obsidian daily:path
obsidian daily:read
obsidian daily:append content="- Follow-up item"
For multi-line content, prefer editing the .md file with apply_patch once the path is known. Avoid fragile shell quoting for long prose.
Use CLI discovery first:
cd ~/obsidian
obsidian bases
obsidian base:views path="Projects.base"
obsidian base:query path="Projects.base" view="Active" format=json
obsidian plugins format=json
obsidian plugins:enabled format=json
obsidian commands filter=workspace:
For .canvas, .base, and .json files, read/edit as structured data when possible. Keep formatting stable and validate JSON after edits.
.obsidian/ unless the user asks or the task is explicitly settings/plugin work.obsidian vaults and obsidian.json.