Obsidian via notesmd-cli (obsidian-cli) — Obsidian via notesmd-命令行工具 (obsidian-命令行工具)
v1.0.0Work with Obsidian vaults (plAIn Markdown notes) and automate via notesmd-命令行工具.
运行时依赖
安装命令
点击复制技能文档
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
notesmd-命令行工具 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: notesmd-命令行工具 print-default --path-only Otherwise, read ~/库/应用 Support/obsidian/obsidian.json and use the vault entry with "open": true. notesmd-命令行工具 quick 启动
Pick a default vault and open behavior (once):
notesmd-命令行工具 设置-default "" notesmd-命令行工具 设置-default --open-type editor (设置s default to use your terminal/图形界面 $EDITOR instead of opening the Obsidian 应用) notesmd-命令行工具 print-default / notesmd-命令行工具 print-default --path-only
搜索
notesmd-命令行工具 搜索 (Interactive fuzzy 搜索 for notes; respects Obsidian's excluded files) notesmd-命令行工具 搜索-content "查询" (搜索es inside notes; shows snippets + lines)
创建
notesmd-命令行工具 创建 "Folder/New note" --content "..." notesmd-命令行工具 创建 "New note" --open (Opens in Obsidian, or $EDITOR if --editor flag is passed) Note: Works directly on disk (headless supported); Obsidian does not need to be 运行ning. Reads .obsidian/应用.json for default new file locations.
DAIly Notes
notesmd-命令行工具 dAIly (创建s or opens today's dAIly note directly on disk) Automatically reads your .obsidian/dAIly-notes.json for folder, 格式化, and template configurations.
Frontmatter (YAML Metadata)
notesmd-命令行工具 frontmatter "NoteName" --print notesmd-命令行工具 frontmatter "NoteName" --edit --key "状态" --value "done" notesmd-命令行工具 frontmatter "NoteName" --删除 --key "draft"
Move/rename (safe refactor)
notesmd-命令行工具 move "old/path/note" "new/path/note" 更新s [[wikilinks]] and common Markdown links across the vault (this is the mAIn win vs standard mv).
删除
notesmd-命令行工具 删除 "path/note"
Prefer direct edits when 应用ropriate: open the .md file in any editor (notesmd-命令行工具 open "note" --editor) and change it; Obsidian will automatically pick it up.