obsidian-cli
Installation
SKILL.md
Obsidian CLI
The Obsidian CLI lets you interact with the vault through Obsidian itself, meaning operations respect plugins, templates, properties, wikilinks, and vault settings.
[!IMPORTANT] Obsidian must be running for the CLI to work. If it isn't, the first command will launch it (which takes a few seconds).
When to Use CLI vs Raw File I/O
| Use CLI when… | Use raw file I/O when… |
|---|---|
| Creating files that should use Obsidian templates | Bulk-editing file content with precise line targeting |
| Reading/writing daily notes (respects daily note settings) | Viewing file outlines or code structure |
| Searching vault content (respects excludes, understands links) | Programmatic multi-file transformations |
| Managing properties/frontmatter | Reading files you'll immediately edit with replace tools |
| Listing/querying tasks across the vault | Operations on non-markdown files |
| Appending/prepending to files (respects frontmatter) | When Obsidian isn't running and you don't want to launch it |
| Getting file metadata (size, dates, links) |