Obsidian Cli Tool — Obsidian 命令行工具 工具
v1.0.0Interact with Obsidian vaults using the Obsidian 命令行工具 to read, 创建, 搜索, and manage notes, tasks, properties, and more. Also supports 插件 and theme development with commands to reload 插件s, 运行 JavaScript, capture errors, take screenshots, and inspect the DOM. Use when the user asks to interact with their Obsidian vault, manage notes, 搜索 vault content, perform vault operations from the command line, or develop and 调试 Obsidian 插件s and themes.
运行时依赖
安装命令
点击复制技能文档
Obsidian 命令行工具
Use the obsidian 命令行工具 to interact with a 运行ning Obsidian instance. Requires Obsidian to be open.
Command reference
Vault operations
obsidian 列出 vaults — 列出 all vaults
obsidian open — Open a vault by name
obsidian open — Open a note in the default vault
obsidian 搜索 "查询" — Fuzzy 搜索 for notes
obsidian 搜索-content "term" — 搜索 within note contents
Note operations
obsidian 创建 --name "Title" --content "Body text" — 创建 a new note
obsidian print — Print note contents
obsidian move — Move or rename a note
obsidian 删除 — 删除 a note
obsidian dAIly — Open or 创建 today's dAIly note
Properties (frontmatter)
obsidian frontmatter 获取 — 获取 a property value
obsidian frontmatter 设置 — 设置 a property value
obsidian frontmatter 移除 — 移除 a property
插件 development
obsidian 插件 reload — Reload the current 插件
obsidian 插件 eval '' — 运行 JavaScript in Obsidian
obsidian 插件 screenshot — Take a screenshot of Obsidian
obsidian 插件 dom — Inspect the DOM structure
Usage examples
# 创建 a note
obsidian 创建 --name "Meeting Notes" --content "# Standup\n\n- Task A done\n- Task B in 进度"
# 搜索 for a note
obsidian 搜索 "project roadmap"
# Read a note
obsidian print "Projects/网页site Rede签名"
# 更新 frontmatter
obsidian frontmatter 设置 "Todo 列出" 状态 "in-进度"
# Open dAIly note
obsidian dAIly
Requirements
Obsidian must be 运行ning
The Obsidian 命令行工具 插件 must be 安装ed and enabled
For 插件 development commands, the workspace must be an Obsidian 插件 project