Skill v1.0.1
currentAutomated scan100/1005 files
version: "1.0.1" name: obsidian description: "Use the official Obsidian CLI (v1.12+) to manage vaults, notes, daily notes, search, tasks, tags, properties, links, templates, sync, publish, and workspaces. Use when the user mentions Obsidian, vaults, notes, or wants to automate note-taking and knowledge base workflows."
Obsidian CLI
Use the official Obsidian CLI (help.obsidian.md/cli) to control Obsidian from the terminal. The CLI connects to a running Obsidian instance via IPC.
When to Use
- User asks about Obsidian or vaults.
- User wants to manage notes (open, create, read, append, move, delete).
- User wants daily notes, search, tasks, tags, or properties.
- User wants to automate templates, sync, publish, or workspaces.
- User asks for rich documentation with LaTeX, callouts, or diagrams (create content with Obsidian-flavored markdown).
Prerequisites
- Obsidian 1.12+ installed and running
- CLI enabled: Settings → General → Command line interface
- The
obsidianbinary in your PATH
Important: The CLI talks to the running app via IPC. Obsidian must be open for commands to work.
Platform Notes
- macOS/Windows: Installer usually adds the CLI to PATH.
- Linux: You may need a wrapper so Electron flags don’t break CLI args; ensure IPC socket is available (e.g.
PrivateTmp=falsefor systemd).
Command Overview (from official docs)
Syntax: obsidian [vault=Name] <command> [params]. Use param=value; quote values with spaces. Use vault= as the first parameter to target a vault.
General
obsidian help # List commands or help for a commandobsidian version # Obsidian versionobsidian reload # Reload the app windowobsidian restart # Restart the app
Vault
obsidian vault # Current vault info (name, path, files, size)obsidian vault info=name # Vault name onlyobsidian vault info=path # Vault path onlyobsidian vaults # List known vaults (desktop)obsidian vault=MyVault <cmd> # Run command in vault MyVault (must be first)
Files and Folders
obsidian read file=Recipe # Read by name (wikilink resolution)obsidian read path="Work/notes.md" # Read by exact pathobsidian file file=Recipe # File info (path, size, dates)obsidian create name=Note # Create empty note (prefer path + write_file for content)obsidian create name=Note template=Travel # Create from templateobsidian create path="Work/note.md" # Create empty at pathobsidian create name=Note overwrite # Overwrite if existsobsidian open file=Recipe # Open in Obsidianobsidian open file=Recipe newtab # Open in new tabobsidian append file=Log content="Line" # Append to fileobsidian prepend file=Log content="# H" # Prepend (after frontmatter)obsidian move file=Old to="Archive/Old.md" # Move/rename (include .md)obsidian delete file=Old # Delete to trashobsidian delete file=Old permanent # Delete permanentlyobsidian files total # File countobsidian files folder="Work" ext=md # Filter by folder/extensionobsidian folders # List foldersobsidian folder path="Work" info=size # Folder size
Daily Notes
obsidian daily # Open today's daily noteobsidian daily silent # Open without focusingobsidian daily:read # Read daily note contentsobsidian daily:path # Get daily note pathobsidian daily:append content="- [ ] Task"obsidian daily:prepend content="# Header"
Search
obsidian search query="meeting notes"obsidian search query="TODO" matches # With contextobsidian search query="x" path="Work" limit=10obsidian search:open query="TODO" # Open search in app
Tasks
obsidian tasks daily # Tasks in daily noteobsidian tasks daily todo # Incompleteobsidian tasks all todo # All incomplete in vaultobsidian task daily line=3 toggle # Toggle completionobsidian task daily line=3 done # Mark doneobsidian task ref="path/to.md:5" toggle
Tags and Properties
obsidian tags all countsobsidian tags file=Noteobsidian tag name=project totalobsidian properties file=Noteobsidian property:read name=status file=Noteobsidian property:set name=status value=done file=Noteobsidian property:remove name=status file=Noteobsidian aliases
Links and Outline
obsidian backlinks file=Noteobsidian links file=Noteobsidian unresolvedobsidian orphansobsidian deadendsobsidian outline file=Note
Templates
obsidian templatesobsidian template:read name=Dailyobsidian template:read name=Daily resolve title="My Note"obsidian template:insert name=Daily # Into active file
History and Sync
obsidian history file=Noteobsidian history:listobsidian history:read file=Note version=3obsidian history:restore file=Note version=3obsidian diff file=Note from=1 to=3obsidian sync:statusobsidian sync:history file=Noteobsidian sync:restore file=Note version=2
Other
obsidian randomobsidian random:readobsidian wordcount file=Noteobsidian bookmarksobsidian bookmark file="note.md" title="My Note"obsidian basesobsidian base:query file=MyBase format=jsonobsidian workspace:save name="coding"obsidian workspace:load name="coding"obsidian pluginsobsidian plugin:enable id=dataviewobsidian theme:set name="Minimal"obsidian publish:add file=Noteobsidian web url="https://example.com"
Best Practices
- Vault: Always specify
vault=Name. If CWD is inside a vault, that vault is used; otherwise confirm vault to use. - Ask first: For big or structured notes, confirm depth, visuals (images, LaTeX, Mermaid), and organization (single note, folder, canvas).
- File vs path:
file=uses wikilink-style resolution (name only). Usepath=for an exact path from vault root. - Quoting: Use quotes for values with spaces:
content="Hello world". - Rich content: Use Obsidian Advanced Syntax and Obsidian Flavored Markdown for callouts, LaTeX, Mermaid. Add YAML frontmatter (tags, status, dates) for discoverability.
- Canvas: For
.canvasfiles, use colors "1"–"6" as strings; text nodes support full markdown. Seereferences/canvas-format.mdfor structure.
Writing note content: use path + write_file
The CLI can create empty notes or notes with very small content via create, but for any real note content always use the CLI only to get the path, then write with write_file:
- Get the full path with the Obsidian CLI:
- Vault root:
obsidian vault info=path(then join with your relative path, e.g.Research/MyNote.md). - Daily note:
obsidian daily:path. - Existing note path:
obsidian file file=NoteName(or build path from vault root). - New note:
obsidian vault info=paththenpath_from_vault_root/NoteName.md.
- Write the content using the write_file skill (or your environment’s file write tool) to that absolute path.
Use obsidian create name=Note (no content) only when you need an empty file; for any content, get the path and use write_file. This avoids quoting/escaping, length limits, and fragile CLI argument handling.
Troubleshooting
- "Cannot connect": Obsidian must be running and CLI enabled in Settings → General.
- "Command not found": Ensure
obsidianis in PATH. - Linux: Use a wrapper that doesn’t inject Electron flags; for systemd, set
PrivateTmp=falseso IPC works.
References
- Obsidian CLI — Official CLI docs
- Obsidian Advanced Syntax
- Obsidian Flavored Markdown
- references/canvas-format.md — Canvas JSON
- references/markdown-features.md — LaTeX, callouts, Mermaid