Obsidian CLI Setup¶
Obsidian 1.12+ ships a built-in CLI that lets AI agents read, create, search, and manage vault notes. This is the preferred channel for agent ↔ vault interaction.
Setup Steps¶
- Update Obsidian to 1.12+ (Help → Check for updates)
- Enable CLI: Settings → General → Advanced → Command line interface → ON
- Add to PATH:
Windows (PowerShell as admin):
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";C:\Program Files\Obsidian", "Machine")
macOS (add to ~/.zshrc):
export PATH="/Applications/Obsidian.app/Contents/MacOS:$PATH"
- Restart your terminal for PATH changes to take effect
- Verify:
obsidian helpshould show available commands
WSL Users — Important¶
Do NOT install Obsidian CLI on Linux from WSL
The CLI must run on the same OS as your Obsidian app. From WSL, call the Windows CLI via cmd.exe:
/mnt/c/Windows/System32/cmd.exe /c "obsidian read file=Note vault=my-vault"
Related¶
- getting_started — Full installation guide
- agent-client-installation — ACP plugin (alternative integration channel)