ObsidianCLI¶
ObsidianCLI(vault, *, binary='auto', timeout=DEFAULT_CLI_TIMEOUT)
¶
Async wrapper for the Obsidian CLI.
Provides access to vault operations, daily notes, search, properties, tags, links, tasks, commands, templates, bookmarks, plugins, themes, snippets, sync, publish, history, workspaces, hotkeys, outline, random notes, aliases, bases, system, tabs, web, and dev through resource properties.
Can be used as an async context manager:
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vault
|
str
|
Name of the Obsidian vault to operate on. |
required |
binary
|
str
|
Path to the Obsidian CLI binary. Use |
'auto'
|
timeout
|
float
|
Default command timeout in seconds. |
DEFAULT_CLI_TIMEOUT
|
Source code in src/aiobsidian/_cli.py
vault
cached
property
¶
Access vault file operations (read, create, append, move, delete, list).
daily
cached
property
¶
Access daily note operations (read, path, create, append, prepend).
search
cached
property
¶
Search vault content.
properties
cached
property
¶
Access note properties (list, read, set, remove).
tags
cached
property
¶
Access tag operations (list, get, rename).
links
cached
property
¶
Access link operations (outgoing, incoming, unresolved, orphans).
tasks
cached
property
¶
Access task operations (list, create, complete).
commands
cached
property
¶
Access Obsidian command operations (list, execute).
templates
cached
property
¶
Access template operations (list, read).
bookmarks
cached
property
¶
Access bookmark operations (list, add).
plugins
cached
property
¶
Access plugin management.
themes
cached
property
¶
Access theme management (list, current, set, install, uninstall).
snippets
cached
property
¶
Access CSS snippet management (list, enabled, enable, disable).
sync
cached
property
¶
Access Obsidian Sync operations (status, history, read, restore, deleted).
publish
cached
property
¶
Access Obsidian Publish operations (site, list, status, add, remove).
history
cached
property
¶
Access local file history (list, read, restore).
workspaces
cached
property
¶
Access workspace management (list, current, save, load, delete).
hotkeys
cached
property
¶
Access hotkey operations (list, get).
outline
cached
property
¶
Access document outline (headings).
random
cached
property
¶
Access random note operations (read).
aliases
cached
property
¶
Access note alias operations (get).
tabs
cached
property
¶
Access workspace tabs management (list, open, recents).
system
cached
property
¶
Access system commands (version, help, reload, restart, vaults).
bases
cached
property
¶
Access Obsidian Bases / database operations (list, views, create, query).
web
cached
property
¶
Access web viewer operations (open).
dev
cached
property
¶
Access developer/debugging tools.