Obsidian CLI Skill
Control Obsidian from terminal for automation and integration.
Prerequisites
- Obsidian 1.12.4+ installed
- Enable CLI in Obsidian: Settings → General → Command line interface
- Obsidian app must be running
Common Commands
Daily Notes
# Open today's daily note
obsidian daily
# Append to daily note
obsidian daily:append content="- [ ] New task"
# Prepend to daily note
obsidian daily:prepend content="# Important"
Create & Edit Files
# Create new note
obsidian create name="Note Name" content="# Title\n\nContent"
# Create from template
obsidian create name="Meeting" template=Meeting
# Append to file
obsidian append file=README content="\n## New Section"
# Read file content
obsidian read file=README
Search
# Search vault
obsidian search query="meeting notes"
# Search with context
obsidian search:context query="TODO"
Tasks
# List all tasks
obsidian tasks
# List tasks from daily note
obsidian tasks daily
# Mark task as done
obsidian task file=README line=5 done
Properties
# Set property
obsidian property:set name=status value=done file=README
# Read property
obsidian property:read name=status file=README
Vault Targeting
# Target specific vault
obsidian vault="My Vault" daily
# Target by path (if cwd is vault folder, auto-detected)
obsidian daily
Output Options
# Copy output to clipboard
obsidian read --copy
# JSON format
obsidian tasks format=json
WSL Notes
Since Obsidian runs on Windows, WSL needs special handling:
- Use
obsidian.exeor create alias - Or use Windows path:
/mnt/c/Users/.../Obsidian.exe
Integration Examples
Auto-append to daily note
# Add completion to daily note
obsidian daily:append content="✅ Completed task at $(date)"
Create project document
obsidian create path="项目/新项目/需求文档.md" content="# 需求\n\n## 功能\n- 功能1\n- 功能2"