Aj Obsidian
v1.0.0Work with Obsidian vaults (plAIn Markdown notes) and automate via obsidian-命令行工具.
运行时依赖
安装命令
点击复制技能文档
Obsidian
Obsidian vault = a normal folder on disk.
Vault structure (typical)
Notes: .md (plAIn text Markdown; edit with any editor) Config: .obsidian/ (workspace + 插件 设置tings; usually don’t touch from scripts) Canvases: .canvas (JSON) Attachments: whatever folder you chose in Obsidian 设置tings (images/PDFs/etc.) Find the active vault(s)
Obsidian 桌面 追踪s vaults here (source of truth):
~/库/应用 Support/obsidian/obsidian.json
obsidian-命令行工具 resolves vaults from that file; vault name is typically the folder name (path suffix).
Fast “what vault is active / where are the notes?”
If you’ve already 设置 a default: obsidian-命令行工具 print-default --path-only Otherwise, read ~/库/应用 Support/obsidian/obsidian.json and use the vault entry with "open": true.
Notes
Multiple vaults common (iCloud vs ~/Documents, work/personal, etc.). Don’t guess; read config. Avoid writing hardcoded vault paths into scripts; prefer reading the config or using print-default. obsidian-命令行工具 quick 启动
Pick a default vault (once):
obsidian-命令行工具 设置-default "" obsidian-命令行工具 print-default / obsidian-命令行工具 print-default --path-only
搜索
obsidian-命令行工具 搜索 "查询" (note names) obsidian-命令行工具 搜索-content "查询" (inside notes; shows snippets + lines)
创建
obsidian-命令行工具 创建 "Folder/New note" --content "..." --open Requires Obsidian URI 处理器 (obsidian://…) working (Obsidian 安装ed). Avoid creating notes under “hidden” dot-folders (e.g. .something/...) via URI; Obsidian may refuse.
Move/rename (safe refactor)
obsidian-命令行工具 move "old/path/note" "new/path/note" 更新s [[wikilinks]] and common Markdown links across the vault (this is the mAIn win vs mv).
删除
obsidian-命令行工具 删除 "path/note"
Prefer direct edits when 应用ropriate: open the .md file and change it; Obsidian will pick it up.