# Obsidian CLI Reference This is a compact agent-facing reference derived from the official Obsidian CLI docs. Use it when `SKILL.md` does not include enough command detail. ## Invocation Rules - Run one command as `obsidian key=value flag`. - Use `vault=` or `vault=` as the first parameter to target a specific vault. - If the current working directory is a vault, that vault is used; otherwise the active Obsidian vault is used. - Use `path=` for exact paths and `file=` for wikilink-style name resolution. - Use `\n` for multiline content and quote values containing spaces. - Use `--copy` with any command to copy output to the clipboard. ## Discovery ```bash obsidian help obsidian version obsidian vault obsidian vaults verbose obsidian files folder="Work/Popdog" obsidian folders folder="Work" obsidian search query="text" path="Work/Popdog" obsidian search:context query="text" path="Work/Popdog" ``` ## Files ```bash obsidian read path="Work/Popdog/_Todo.md" obsidian open path="Work/Popdog/_Todo.md" newtab obsidian create path="Work/Popdog/New Note.md" content="# Title" open obsidian append path="Work/Popdog/_Todo.md" content="- [ ] Task" obsidian prepend path="Work/Popdog/_Todo.md" content="Intro" obsidian move path="Old.md" to="Archive/Old.md" obsidian rename path="Old.md" name="New" obsidian delete path="Scratch.md" ``` Use `overwrite` with `create` only when intentionally replacing an existing note. ## Daily Notes ```bash obsidian daily obsidian daily:path obsidian daily:read obsidian daily:append content="- [x] Finished task (PR# - Repo)" obsidian daily:prepend content="# Roundup" ``` Use daily commands for the active daily-note configuration. For Popdog roundup files with a known path, exact `path=` file commands are often safer. ## Tasks ```bash obsidian tasks obsidian tasks todo obsidian tasks done obsidian tasks path="Work/Popdog/_Todo.md" todo verbose obsidian tasks daily total obsidian task ref="Work/Popdog/_Todo.md:12" done obsidian task path="Work/Popdog/_Todo.md" line=12 toggle obsidian task path="Work/Popdog/_Todo.md" line=12 todo obsidian task path="Work/Popdog/_Todo.md" line=12 status="-" ``` Use `verbose` when you need file paths and line numbers before updating tasks. ## Metadata And Organization ```bash obsidian tags counts obsidian tag name="#project" verbose obsidian backlinks path="Work/Popdog/_Todo.md" counts obsidian links path="Work/Popdog/_Todo.md" obsidian unresolved counts verbose obsidian outline path="Work/Popdog/_Todo.md" format=md obsidian properties path="Work/Popdog/_Todo.md" format=yaml obsidian property:set path="Note.md" name=status value=active type=text obsidian property:read path="Note.md" name=status obsidian property:remove path="Note.md" name=status ``` ## Templates ```bash obsidian templates obsidian template:read name="Daily" resolve title="2026-05-11" obsidian create path="Work/Popdog/2026-05-11.md" template="Daily" open ``` ## History And Recovery ```bash obsidian diff path="Work/Popdog/_Todo.md" obsidian diff path="Work/Popdog/_Todo.md" from=2 to=1 obsidian history path="Work/Popdog/_Todo.md" obsidian history:read path="Work/Popdog/_Todo.md" version=1 obsidian history:restore path="Work/Popdog/_Todo.md" version=1 obsidian sync:history path="Work/Popdog/_Todo.md" total obsidian sync:read path="Work/Popdog/_Todo.md" version=1 ``` Prefer reading or diffing history before restoring anything. ## Developer And UI Commands ```bash obsidian commands filter="app:" obsidian command id="command-id" obsidian devtools obsidian dev:errors obsidian dev:console limit=100 level=error obsidian dev:screenshot path="screenshot.png" obsidian dev:dom selector=".workspace" text obsidian eval code="app.vault.getFiles().length" ``` Use developer commands only when working on Obsidian plugins/themes or diagnosing the running app. ## Troubleshooting - Obsidian CLI requires Obsidian 1.12.7+ and the CLI setting enabled in Settings -> General. - Obsidian must be running; if not, the first command may launch it. - On Linux, the CLI binary is normally copied to `~/.local/bin/obsidian`; ensure `~/.local/bin` is on `PATH`. - If commands fail after registration, restart the terminal and verify `obsidian version`.