Skip to content

First-party source

Desktop command contract: Obsidian CLI, retrieved 2026-08-29 EDT. See the dated source ledger.

File history

Fresh

Diff, list, read, restore, and open versions from local File Recovery and Obsidian Sync history.

diff

List or compare versions from local File recovery and Sync. Versions are numbered from newest to oldest.

bash
file=<name>          # file name
path=<path>          # file path
from=<n>             # version number to diff from
to=<n>               # version number to diff to
filter=local|sync    # filter by version source

Examples:

shell
# List all versions of the active file
diff

# List all versions of a specific file
diff file=Recipe

# Compare the latest version to the current file
diff file=Recipe from=1

# Compare two versions
diff file=Recipe from=2 to=1

# Only show Sync versions
diff filter=sync

history

List versions from File recovery only. See sync:history for the equivalent Sync command.

bash
file=<name>        # file name
path=<path>        # file path

history:list

List all files with local history.

history:read

Read a local history version.

bash
file=<name>        # file name
path=<path>        # file path
version=<n>        # version number (default: 1)

history:restore

Restore a local history version.

bash
file=<name>        # file name
path=<path>        # file path
version=<n>        # (required) version number

history:open

Open file recovery.

bash
file=<name>        # file name
path=<path>        # file path

See also

Unofficial SOP mirror. Built for terminal-driven and agentic Obsidian workflows.