Skip to content

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

  1. Obsidian — download from obsidian.md
  2. Obsidian CLI — included with Obsidian v1.12+. Verify installation:

    obsidian version
    
  3. Install aiobsidian:

pip install aiobsidian
uv add aiobsidian
poetry add 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

  1. Obsidian — download from obsidian.md
  2. 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
  3. Install aiobsidian with REST support:

pip install aiobsidian[rest]
uv add aiobsidian[rest]
poetry add aiobsidian[rest]

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:

client = ObsidianClient(api_key="...", verify_ssl=True)

Verify REST setup

import asyncio
from aiobsidian import ObsidianClient

async def main():
    async with ObsidianClient(api_key="your-api-key") as client:
        status = await client.system.status()
        print(f"Connected! Obsidian v{status.versions.obsidian}")

asyncio.run(main())