CLI Reference
All commands: obs vault="<YOUR_VAULT>" <command> [options]
File resolution: file=<name> (wikilink-style) or path=<path> (exact from vault root).
Read file contents.
read file=<name> | path=<path>create
Section titled “create”Create a new file.
create name=<name> | path=<path> [content=<text>] [template=<name>] [overwrite] [open] [newtab]append
Section titled “append”Append content to a file.
append file=<name> | path=<path> content=<text> [inline]inline appends without newline.
prepend
Section titled “prepend”Prepend content to a file.
prepend file=<name> | path=<path> content=<text> [inline]delete
Section titled “delete”Delete a file.
delete file=<name> | path=<path> [permanent]permanent skips trash.
Move or rename a file.
move file=<name> | path=<path> to=<path>rename
Section titled “rename”Rename a file.
rename file=<name> | path=<path> name=<name>Open a file in Obsidian.
open file=<name> | path=<path> [newtab]Show file info.
file file=<name> | path=<path>random
Section titled “random”Open a random note.
random [folder=<path>] [newtab]random:read
Section titled “random:read”Read a random note.
random:read [folder=<path>]Daily Notes
Section titled “Daily Notes”Open daily note.
daily [paneType=tab|split|window]daily:read
Section titled “daily:read”Read daily note contents.
daily:readdaily:append
Section titled “daily:append”Append content to daily note.
daily:append content=<text> [inline] [open] [paneType=tab|split|window]daily:prepend
Section titled “daily:prepend”Prepend content to daily note.
daily:prepend content=<text> [inline] [open] [paneType=tab|split|window]daily:path
Section titled “daily:path”Get daily note file path.
daily:pathSearch
Section titled “Search”search
Section titled “search”Search vault for text.
search query=<text> [path=<folder>] [limit=<n>] [total] [case] [format=text|json]search:context
Section titled “search:context”Search with matching line context.
search:context query=<text> [path=<folder>] [limit=<n>] [case] [format=text|json]search:open
Section titled “search:open”Open search view in Obsidian.
search:open [query=<text>]List tasks in the vault.
tasks [file=<name>] [path=<path>] [total] [done] [todo] [status="<char>"] [verbose] [format=json|tsv|csv] [active] [daily]todo— incomplete onlydone— completed onlyverbose— group by file with line numbersdaily— daily note tasks only
Show or update a single task.
task [ref=<path:line>] [file=<name>] [path=<path>] [line=<n>] [toggle] [done] [todo] [daily] [status="<char>"]Properties (Frontmatter)
Section titled “Properties (Frontmatter)”property:set
Section titled “property:set”Set a property on a file.
property:set name=<name> value=<value> [type=text|list|number|checkbox|date|datetime] [file=<name>] [path=<path>]property:read
Section titled “property:read”Read a property value.
property:read name=<name> [file=<name>] [path=<path>]property:remove
Section titled “property:remove”Remove a property.
property:remove name=<name> [file=<name>] [path=<path>]properties
Section titled “properties”List properties in the vault.
properties [file=<name>] [path=<path>] [name=<name>] [total] [sort=count] [counts] [format=yaml|json|tsv] [active]Graph & Links
Section titled “Graph & Links”backlinks
Section titled “backlinks”List backlinks to a file.
backlinks [file=<name>] [path=<path>] [counts] [total] [format=json|tsv|csv]List outgoing links from a file.
links [file=<name>] [path=<path>] [total]orphans
Section titled “orphans”List files with no incoming links.
orphans [total] [all]deadends
Section titled “deadends”List files with no outgoing links.
deadends [total] [all]unresolved
Section titled “unresolved”List unresolved links in vault.
unresolved [total] [counts] [verbose] [format=json|tsv|csv]Organization
Section titled “Organization”List files in the vault.
files [folder=<path>] [ext=<extension>] [total]folders
Section titled “folders”List folders in the vault.
folders [folder=<path>] [total]List tags in the vault.
tags [file=<name>] [path=<path>] [total] [counts] [sort=count] [format=json|tsv|csv] [active]Get tag info.
tag name=<tag> [total] [verbose]aliases
Section titled “aliases”List aliases in the vault.
aliases [file=<name>] [path=<path>] [total] [verbose] [active]outline
Section titled “outline”Show headings for a file.
outline [file=<name>] [path=<path>] [format=tree|md|json] [total]wordcount
Section titled “wordcount”Count words and characters.
wordcount [file=<name>] [path=<path>] [words] [characters]recents
Section titled “recents”List recently opened files.
recents [total]Bookmarks
Section titled “Bookmarks”bookmark
Section titled “bookmark”Add a bookmark.
bookmark [file=<path>] [subpath=<subpath>] [folder=<path>] [search=<query>] [url=<url>] [title=<title>]bookmarks
Section titled “bookmarks”List bookmarks.
bookmarks [total] [verbose] [format=json|tsv|csv]Templates
Section titled “Templates”templates
Section titled “templates”List templates.
templates [total]template:read
Section titled “template:read”Read template content.
template:read name=<template> [resolve] [title=<title>]resolve resolves template variables.
template:insert
Section titled “template:insert”Insert template into active file.
template:insert name=<template>Base (Databases)
Section titled “Base (Databases)”List all base files in vault.
basesbase:views
Section titled “base:views”List views in a base file.
base:viewsbase:query
Section titled “base:query”Query a base and return results.
base:query [file=<name>] [path=<path>] [view=<name>] [format=json|csv|tsv|md|paths]base:create
Section titled “base:create”Create a new item in a base.
base:create [file=<name>] [path=<path>] [view=<name>] [name=<name>] [content=<text>] [open] [newtab]History & Sync
Section titled “History & Sync”history
Section titled “history”List file history versions.
history [file=<name>] [path=<path>]history:list
Section titled “history:list”List files with history.
history:listhistory:read
Section titled “history:read”Read a file history version.
history:read [file=<name>] [path=<path>] [version=<n>]Default version: 1 (most recent).
history:restore
Section titled “history:restore”Restore a file history version.
history:restore [file=<name>] [path=<path>] version=<n>history:open
Section titled “history:open”Open file recovery view.
history:open [file=<name>] [path=<path>]List or diff local/sync versions.
diff [file=<name>] [path=<path>] [from=<n>] [to=<n>] [filter=local|sync]Pause or resume sync.
sync on | offsync:status
Section titled “sync:status”Show sync status.
sync:statussync:history
Section titled “sync:history”List sync version history for a file.
sync:history [file=<name>] [path=<path>] [total]sync:read
Section titled “sync:read”Read a sync version.
sync:read [file=<name>] [path=<path>] version=<n>sync:restore
Section titled “sync:restore”Restore a sync version.
sync:restore [file=<name>] [path=<path>] version=<n>sync:deleted
Section titled “sync:deleted”List deleted files in sync.
sync:deleted [total]Plugins & Themes
Section titled “Plugins & Themes”plugins
Section titled “plugins”List installed plugins.
plugins [filter=core|community] [versions] [format=json|tsv|csv]plugins:enabled
Section titled “plugins:enabled”List enabled plugins.
plugins:enabled [filter=core|community] [versions] [format=json|tsv|csv]plugin
Section titled “plugin”Get plugin info.
plugin id=<plugin-id>plugin:enable / plugin:disable
Section titled “plugin:enable / plugin:disable”plugin:enable id=<id> [filter=core|community]plugin:disable id=<id> [filter=core|community]plugin:install / plugin:uninstall
Section titled “plugin:install / plugin:uninstall”plugin:install id=<id> [enable]plugin:uninstall id=<id>plugin:reload
Section titled “plugin:reload”Reload a plugin (for developers).
plugin:reload id=<id>plugins:restrict
Section titled “plugins:restrict”Toggle or check restricted mode.
plugins:restrict [on] [off]themes
Section titled “themes”List installed themes.
themes [versions]Show active theme or get info.
theme [name=<name>]theme:set
Section titled “theme:set”Set active theme.
theme:set name=<name>theme:install / theme:uninstall
Section titled “theme:install / theme:uninstall”theme:install name=<name> [enable]theme:uninstall name=<name>snippets / snippets:enabled
Section titled “snippets / snippets:enabled”snippetssnippets:enabledsnippet:enable / snippet:disable
Section titled “snippet:enable / snippet:disable”snippet:enable name=<name>snippet:disable name=<name>Commands & Hotkeys
Section titled “Commands & Hotkeys”commands
Section titled “commands”List available command IDs.
commands [filter=<prefix>]command
Section titled “command”Execute an Obsidian command.
command id=<command-id>hotkeys
Section titled “hotkeys”List hotkeys.
hotkeys [total] [verbose] [format=json|tsv|csv] [all]hotkey
Section titled “hotkey”Get hotkey for a command.
hotkey id=<command-id> [verbose]Vault & UI
Section titled “Vault & UI”Show vault info.
vault [info=name|path|files|folders|size]vaults
Section titled “vaults”List known vaults.
vaults [total] [verbose]reload
Section titled “reload”Reload the vault.
reloadrestart
Section titled “restart”Restart the app.
restartList open tabs.
tabs [ids]tab:open
Section titled “tab:open”Open a new tab.
tab:open [group=<id>] [file=<path>] [view=<type>]workspace
Section titled “workspace”Show workspace tree.
workspace [ids]