Skills obsidian-cli-official
install
source · Clone the upstream repo
git clone https://github.com/openclaw/skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/alexanderkinging/obsidian-cli-official" ~/.claude/skills/clawdbot-skills-obsidian-cli-official && rm -rf "$T"
manifest:
skills/alexanderkinging/obsidian-cli-official/SKILL.mdsource content
Obsidian Official CLI
Official command-line interface for Obsidian (v1.12+). 115 commands.
Prerequisites
- Obsidian 1.12+ (free, public release since v1.12)
- Obsidian must be running (CLI connects via IPC)
- Enable CLI: Settings → General → Enable CLI
Setup
Add Obsidian to PATH:
macOS:
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"
Windows:
$env:PATH += ";$env:LOCALAPPDATA\Obsidian"
Linux:
- Snap: Already in PATH
- Flatpak:
alias obsidian='flatpak run md.obsidian.Obsidian' - AppImage: Move to
and~/.local/binchmod +x
Test:
obsidian version
Syntax
- Parameters:
orname=valuename="value with spaces" - Flags: just the name, e.g.
,openoverwrite - Newlines: use
in content strings\n - Target vault:
(must be first)obsidian vault="My Vault" <command> - Target file:
(wikilink-style) orfile=<name>
(exact)path=<folder/file.md> - Copy output: append
to any command--copy
Common Commands (with examples)
Daily Notes
obsidian daily # Open today obsidian daily:append content="- [ ] Buy milk" # Add to today obsidian daily:prepend content="# Important" # Add to top obsidian daily:read # Read today's content obsidian daily:path # Get daily note path
Files
obsidian create name="Note" content="# Hello" # Create note obsidian create name="Note" template=Meeting # Create from template obsidian read file="Note" # Read note obsidian append file="Note" content="More text" # Append to note obsidian prepend file="Note" content="Top text" # Prepend to note obsidian move file="Note" to="Archive/Note.md" # Move note obsidian rename file="Note" name="New Name" # Rename note obsidian delete file="Note" # Delete note obsidian open file="Note" # Open note
Search
obsidian search query="meeting notes" # Search vault obsidian search:context query="TODO" # Search with context obsidian search:open query="project" # Open search view
Tasks
obsidian tasks daily todo # Incomplete tasks in daily obsidian tasks todo # All incomplete tasks obsidian task daily line=3 toggle # Toggle task at line 3
Tags & Properties
obsidian tags counts # List all tags obsidian tags counts sort=count # Sort by frequency obsidian property:set name="status" value="done" file="Note" obsidian property:read name="status" file="Note" obsidian property:remove name="status" file="Note" obsidian properties file="Note" # List all properties
Links
obsidian backlinks file="Note" # Incoming links obsidian links file="Note" # Outgoing links obsidian orphans # No incoming links obsidian deadends # No outgoing links obsidian unresolved # Broken links
Developer
obsidian devtools # Open dev tools obsidian eval code="app.vault.getFiles().length" # Run JavaScript obsidian dev:screenshot path=screenshot.png # Screenshot obsidian plugin:reload id=my-plugin # Reload plugin
All Commands (115 total)
General (4)
- Show help / help for specific commandhelp
- Show Obsidian versionversion
- Reload the app windowreload
- Restart the apprestart
Daily Notes (5)
- Open daily notedaily
- Get daily note pathdaily:path
- Read daily note contentsdaily:read
- Append content to daily notedaily:append
- Prepend content to daily notedaily:prepend
Files & Folders (12)
- Show file infofile
- List files in vaultfiles
- Show folder infofolder
- List folders in vaultfolders
- Open a fileopen
- Create a new filecreate
- Read file contentsread
- Append content to a fileappend
- Prepend content to a fileprepend
- Move or rename a filemove
- Rename a filerename
- Delete a filedelete
Search (3)
- Search vault for textsearch
- Search with matching line contextsearch:context
- Open search viewsearch:open
Tasks (2)
- List tasks in the vaulttasks
- Show or update a tasktask
Tags (2)
- List tags in the vaulttags
- Get tag infotag
Properties (4)
- List properties in the vaultproperties
- Set a property on a fileproperty:set
- Remove a property from a fileproperty:remove
- Read a property valueproperty:read
Aliases (1)
- List aliases in the vaultaliases
Links (5)
- List backlinks to a filebacklinks
- List outgoing links from a filelinks
- List unresolved linksunresolved
- Files with no incoming linksorphans
- Files with no outgoing linksdeadends
Outline (1)
- Show headings for a fileoutline
Bookmarks (2)
- List bookmarksbookmarks
- Add a bookmarkbookmark
Bases / Database (4)
- List all base filesbases
- List views in a basebase:views
- Create a new item in a basebase:create
- Query a base and return resultsbase:query
Templates (3)
- List templatestemplates
- Read template contenttemplate:read
- Insert template into active filetemplate:insert
Commands & Hotkeys (4)
- List available command IDscommands
- Execute an Obsidian commandcommand
- List hotkeyshotkeys
- Get hotkey for a commandhotkey
Tabs & Workspaces (7)
- List open tabstabs
- Open a new tabtab:open
- Show workspace treeworkspace
- List saved workspacesworkspaces
- Load a saved workspaceworkspace:load
- Save current layoutworkspace:save
- Delete a saved workspaceworkspace:delete
File History & Diff (6)
- List or diff local/sync versionsdiff
- List file history versionshistory
- List files with historyhistory:list
- Read a file history versionhistory:read
- Restore a file history versionhistory:restore
- Open file recoveryhistory:open
Sync (7)
- Pause or resume sync (on/off)sync
- Show sync statussync:status
- List sync version historysync:history
- Read a sync versionsync:read
- Restore a sync versionsync:restore
- Open sync historysync:open
- List deleted files in syncsync:deleted
Publish (6)
- Show publish site infopublish:site
- List published filespublish:list
- Show publish statuspublish:status
- Publish filespublish:add
- Unpublish filespublish:remove
- Open published sitepublish:open
Themes & Snippets (9)
- List installed themesthemes
- Show active theme or get infotheme
- Set active themetheme:set
- Install a community themetheme:install
- Uninstall a themetheme:uninstall
- List installed CSS snippetssnippets
- List enabled CSS snippetssnippets:enabled
- Enable a CSS snippetsnippet:enable
- Disable a CSS snippetsnippet:disable
Plugins (9)
- List installed pluginsplugins
- List enabled pluginsplugins:enabled
- Toggle restricted modeplugins:restrict
- Get plugin infoplugin
- Enable a pluginplugin:enable
- Disable a pluginplugin:disable
- Install a community pluginplugin:install
- Uninstall a community pluginplugin:uninstall
- Reload a pluginplugin:reload
Vault (3)
- Show vault infovault
- List known vaultsvaults
- Open a vault (TUI only)vault:open
Random Notes (2)
- Open a random noterandom
- Read a random noterandom:read
Unique Notes (1)
- Create unique noteunique
Web Viewer (1)
- Open URL in web viewerweb
Word Count (1)
- Count words and characterswordcount
Recently Opened (1)
- List recently opened filesrecents
Developer (10)
- Toggle Electron dev toolsdevtools
- Execute JavaScripteval
- Take a screenshotdev:screenshot
- Show captured console messagesdev:console
- Show captured errorsdev:errors
- Inspect CSS with source locationsdev:css
- Query DOM elementsdev:dom
- Run Chrome DevTools Protocol commanddev:cdp
- Attach/detach CDP debuggerdev:debug
- Toggle mobile emulationdev:mobile
Troubleshooting
"Cannot connect to Obsidian"
- Ensure Obsidian is running
- Enable CLI in Settings → General → Enable CLI
"Command not found: obsidian"
- Add Obsidian to PATH (see Setup above)
"File not found"
resolves like wikilinks (no path, no .md)file=Name
for exact pathspath=folder/file.md
中文说明
前置条件
- Obsidian 1.12+(免费公开版本)
- Obsidian 必须运行中
- 启用 CLI:设置 → 通用 → 启用 CLI
常用命令
obsidian daily # 打开今日日记 obsidian create name="笔记" # 创建笔记 obsidian search query="关键词" # 搜索 obsidian tasks daily todo # 列出未完成任务 obsidian tags counts # 列出标签