Skip to content

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.

  1. Obsidian CLI — Enable in Obsidian: Settings → General → Command line interface (requires Obsidian 1.12+ installer).
  2. Obsidian running — The app must be running for CLI commands to work.
CommandPurposeKey Parameters
sync-vault:helpShow CLI helphelp=true
sync-vault:doctorDiagnose plugin healthcloud
sync-vault:infoGet account & storage infocloud
sync-vault:listList cloud directory filespath cloud limit offset type minSize modifiedAfter recursive
sync-vault:searchSearch cloud filesquery cloud limit offset path type
sync-vault:readRead cloud file contentpath cloud maxLength
sync-vault:configView or change config
sync-vault:deviceManage devices

Run commands from your terminal with the obsidian prefix:

Terminal window
obsidian sync-vault:list path=/ cloud=aliyun
obsidian sync-vault:search query="meeting notes" cloud=baidu
obsidian sync-vault:read path=/notes.md cloud=quark maxLength=8192
obsidian sync-vault:info cloud=onedrive
obsidian sync-vault:doctor cloud=aliyun

All subcommands support help=true to show command-specific usage:

Terminal window
obsidian sync-vault:list help=true

List PDFs on Alibaba Cloud Disk:

Terminal window
obsidian sync-vault:list path=/Documents cloud=aliyun type=pdf

Search for markdown files on Quark:

Terminal window
obsidian sync-vault:search query=obsidian cloud=quark type=markdown

Read a file from Baidu Netdisk:

Terminal window
obsidian sync-vault:read path=/Notes/Welcome.md cloud=baidu maxLength=4096

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.