Installation¶
Choose your interface¶
aiobsidian supports two interfaces for interacting with Obsidian:
| Interface | Requirements | Install |
|---|---|---|
| CLI (primary) | Obsidian CLI v1.12+ | pip install aiobsidian |
| REST (optional) | Local REST API plugin + httpx | pip install aiobsidian[rest] |
CLI setup¶
- Obsidian — download from obsidian.md
-
Obsidian CLI — included with Obsidian v1.12+. Verify installation:
-
Install aiobsidian:
Verify CLI setup¶
import asyncio
from aiobsidian import ObsidianCLI
async def main():
async with ObsidianCLI("MyVault") as cli:
files = await cli.vault.list()
print(f"Found {len(files)} files")
asyncio.run(main())
Note
Obsidian must be running in the background for the CLI to work — it communicates with the desktop app via IPC.
REST setup¶
- Obsidian — download from obsidian.md
-
Local REST API plugin — install from the Obsidian Community Plugins:
- Open Obsidian Settings → Community Plugins → Browse
- Search for "Local REST API"
- Install and enable the plugin
- Copy the API key from the plugin settings
-
Install aiobsidian with REST support:
SSL certificates¶
The Local REST API plugin uses self-signed HTTPS certificates by default. aiobsidian disables SSL verification (verify_ssl=False) to handle this automatically.
Warning
If you need strict SSL verification (e.g. behind a reverse proxy with real certificates), pass verify_ssl=True when creating the client: