| name | obsidian-cli |
| description | Interact with Obsidian vaults using the Obsidian CLI — read, create, search, and manage notes, tasks, properties, and more. Also supports plugin development (reload, eval, DOM inspection). Use when the user asks to interact with an Obsidian vault from the command line. Requires: npm install -g @obsidianmd/obsidian-cli
|
| model | sonnet |
| allowed-tools | Bash |
Obsidian CLI
Syntax
obsidian <command> [parameters] [flags]
Parameters: name="value" (wikilink resolution) or path="exact/path.md" (exact path)
First parameter for multi-vault setups: vault="Vault Name"
File Targeting
- By name (wikilink):
file="Note Name" — Obsidian resolves ambiguity
- By path:
path="folder/Note Name.md" — exact path from vault root
- Daily note:
daily:read, daily:append content="text"
Core Commands
obsidian read file="Note Name"
obsidian create file="New Note" content="# Title\n\nContent here"
obsidian append file="Note Name" content="New paragraph"
obsidian search query="search terms"
obsidian tasks file="Note Name"
obsidian tags
obsidian backlinks file="Note Name"
Property Management
obsidian property:set file="Note Name" property="status" value="active"
obsidian read file="Note Name" --json | jq '.properties'
Output Flags
--copy — copy output to clipboard
silent — don't open the note in Obsidian
total — return count only
--json — machine-readable JSON output
Plugin Development
obsidian plugin:reload plugin="plugin-id"
obsidian eval script="console.log(app.vault.getName())"
obsidian dev:errors
obsidian dev:screenshot output="screenshot.png"
obsidian dev:console
obsidian dev:dom selector=".markdown-preview-view"
Prerequisites
npm install -g @obsidianmd/obsidian-cli