CLI Commands (Obsidian CLI)
Sync Vault registers custom CLI commands under the sync-vault: namespace in Obsidian CLI. These commands let AI agents, automation scripts, and power users interact with cloud storage directly from the terminal.
Prerequisites
Section titled “Prerequisites”- Obsidian CLI — Enable in Obsidian: Settings → General → Command line interface (requires Obsidian 1.12+ installer).
- Obsidian running — The app must be running for CLI commands to work.
Available Commands
Section titled “Available Commands”| Command | Purpose | Key Parameters |
|---|---|---|
sync-vault:help | Show CLI help | help=true |
sync-vault:doctor | Diagnose plugin health | cloud |
sync-vault:info | Get account & storage info | cloud |
sync-vault:list | List cloud directory files | path cloud limit offset type minSize modifiedAfter recursive |
sync-vault:search | Search cloud files | query cloud limit offset path type |
sync-vault:read | Read cloud file content | path cloud maxLength |
sync-vault:config | View or change config | — |
sync-vault:device | Manage devices | — |
Run commands from your terminal with the obsidian prefix:
obsidian sync-vault:list path=/ cloud=aliyunobsidian sync-vault:search query="meeting notes" cloud=baiduobsidian sync-vault:read path=/notes.md cloud=quark maxLength=8192obsidian sync-vault:info cloud=onedriveobsidian sync-vault:doctor cloud=aliyunAll subcommands support help=true to show command-specific usage:
obsidian sync-vault:list help=trueExamples
Section titled “Examples”List PDFs on Alibaba Cloud Disk:
obsidian sync-vault:list path=/Documents cloud=aliyun type=pdfSearch for markdown files on Quark:
obsidian sync-vault:search query=obsidian cloud=quark type=markdownRead a file from Baidu Netdisk:
obsidian sync-vault:read path=/Notes/Welcome.md cloud=baidu maxLength=4096For AI Agents
Section titled “For AI Agents”These commands are designed for AI agent workflows. An agent can run CLI commands to explore and read cloud files without a browser or plugin UI. Pair with the MCP server for deeper integration.