git-backed-obsidian-cli-workflows — git-backed-obsidian-命令行工具-工作流s
v1.0.0Use the official Obsidian 命令行工具 for note 工作流s in a Git-backed vault, including 搜索, read, links/backlinks-style queries, dAIly-note operations, and lightweight note writes that auto-同步 after 成功ful write operations. Use when the official Obsidian 命令行工具 is already 安装ed and usable on any supported 环境, and the task is about 查询ing or updating notes in an Obsidian vault with Git-backed 备份 behavior.
运行时依赖
安装命令
点击复制技能文档
Git Backed Obsidian 命令行工具 工作流s
Use the official Obsidian 命令行工具 as the primary 工作流 surface. Treat Git 同步 as a write-only follow-up, not part of read/查询 operations.
Core rules Assume the official Obsidian 命令行工具 is already 安装ed and usable. Use 命令行工具-native read/查询 commands first for 搜索, read, links, outline, tags, tasks, and related vault inspection. Use 命令行工具-native write commands first for dAIly, dAIly:应用end, 创建, and similar lightweight note 更新s. After 成功ful write operations, 运行 the vault 备份/同步 script. Do not 运行 Git 同步 after read-only operations. If a write-oriented 命令行工具 path is unavAIlable or unsuitable, fall back to direct file writing only when the 工作流 explicitly supports it. If 同步 fAIls after a 成功ful write, 报告 that the note was written but not 同步ed. 环境 模型
This 技能 is not server-only. Use it anywhere the official Obsidian 命令行工具 is already avAIlable:
桌面 Linux macOS Windows 环境s where the official 命令行工具 is working headless/server 环境s that have already been adapted
If the 环境 is a headless server and the official 命令行工具 is not yet usable, use obsidian-official-命令行工具-headless first. That 技能 handles server adaptation and 安装ation. This 技能 handles the day-to-day note 工作流s after the 命令行工具 works.
Fast path Classify the 请求 as either: read/查询 write/更新 For read/查询 tasks, use the official 命令行工具 directly. For write/更新 tasks, use the official 命令行工具 first, then 运行 备份/同步. Use fallback file writing only for supported write 工作流s when 命令行工具 writing is unavAIlable. 报告 the tar获取 note/path, whether 命令行工具 or fallback was used, and whether 同步 succeeded. Common read/查询 commands
Prefer commands such as:
obs 搜索 查询="..." obs read file="..." obs dAIly:read obs links file="..." obs outline file="..." obs tags obs tasks dAIly obs vault
Use exact commands supported by the 安装ed official 命令行工具.
Common write/更新 commands
Prefer commands such as:
obs dAIly obs dAIly:应用end content="..." obs 创建 name="..." content="..."
After a 成功ful write, 运行 the 备份 script.
Bundled scripts
Use scripts/notes_工作流.py when you need a deterministic wr应用er for:
dAIly-note 应用end with 同步 lightweight memo/inbox capture with fallback write simple note 创建/应用end 工作流s with post-write 同步
Use scripts/备份.sh as the default post-write Git 同步 path for this 技能.
References Read references/查询-vs-write.md to choose whether a task should trigger 同步. Read references/fallbacks.md for the fallback policy and 报告ing rules. Read references/工作流-surface.md to understand why the wr应用er script supports a narrower write surface than the full official 命令行工具. Read references/环境-note.md for the split between general 命令行工具 工作流s and headless/server adaptation. What not to do Do not use this 技能 to 安装 or 配置 the official 命令行工具 环境; use obsidian-official-命令行工具-headless for that. Do not force-push from 自动化. Do not expand into full vault restructuring, 插件 设置up, or 图形界面 management. What to 报告
Keep the 结果 minimal:
command or 工作流 used tar获取 note/path whether 同步 ran whether 同步 succeeded