# How to Use Obsidian to Edit the ai-memory Wiki: A Complete Guide

> Learn how to use Obsidian to edit the ai-memory wiki. This guide covers the simple process of using your favorite Markdown editor for project contributions.

- Repository: [Fabio Akita/ai-memory](https://github.com/akitaonrails/ai-memory)
- Tags: how-to-guide
- Published: 2026-08-31

---

**Yes, you can use Obsidian to edit the ai-memory wiki because the project stores all content as plain-text Markdown files and implements a filesystem watcher that automatically detects and indexes changes from external editors.**

The ai-memory project maintains its wiki as a collection of plain-text Markdown files in a Git repository, making it fully compatible with **Obsidian** and other Markdown editors. Because the server continuously monitors the wiki directory for external changes, any edits you make in Obsidian are immediately detected and indexed for search. This architecture allows you to leverage Obsidian's rich editing features while retaining ai-memory's powerful CLI capabilities.

## Why ai-memory is Compatible with Obsidian

According to the source code, ai-memory stores all wiki content under `<data_dir>/wiki/` as standard Markdown files. The [`README.md`](https://github.com/akitaonrails/ai-memory/blob/main/README.md) explicitly states that the wiki is "openable in Obsidian" (line 62), and the usage documentation confirms you can "Open in Obsidian or any markdown viewer" ([`docs/usage.md`](https://github.com/akitaonrails/ai-memory/blob/main/docs/usage.md), line 402).

This compatibility stems from three architectural decisions:

- **Plain-text storage**: No proprietary database formats or binary blobs
- **Git-based versioning**: Full change history and synchronization
- **Filesystem watching**: Real-time detection of external modifications

## Setting Up Obsidian with ai-memory

Follow these steps to connect Obsidian to your ai-memory wiki and use Obsidian to edit the ai-memory wiki files directly.

1. Initialize or verify your ai-memory server is running:

```bash
ai-memory --data-dir ~/.local/share/ai-memory init
ai-memory status

```

2. Identify your wiki directory location (default shown):

```bash
WIKI_ROOT="$HOME/.local/share/ai-memory/wiki"

```

3. Open the directory in Obsidian:

```bash
obsidian "$WIKI_ROOT"

```

Obsidian will recognize the directory structure, preserving the hierarchy of `<workspace>/<project>/` subdirectories as folders and notes.

## How External Edits Are Detected

The ai-memory server implements a filesystem watcher in [`crates/ai-memory-wiki/src/wiki.rs`](https://github.com/akitaonrails/ai-memory/blob/main/crates/ai-memory-wiki/src/wiki.rs) (line 1242) that specifically handles edits from external editors such as **Obsidian** or **Vim**. When you save a file in Obsidian, the watcher detects the filesystem event, parses the modified Markdown, and updates the internal **SQLite index** automatically.

This means:

- No manual re-indexing required
- Changes appear in search results immediately
- Conflict resolution handled through Git if using version control

## Creating Content from the CLI for Obsidian

You can create wiki pages programmatically and then edit them in Obsidian. Use the `write-page` command:

```bash
ai-memory write-page \
  --path notes/my-new-note.md \
  --title "My New Note" \
  --body "# My New Note

This is the content that will appear in Obsidian."

```

This writes the file directly to the wiki root. When you open Obsidian, the new note appears instantly in your vault, and the watcher has already indexed it for search.

## Searching After Obsidian Edits

After editing files in Obsidian, verify the indexer caught your changes:

```bash
ai-memory search "My New Note"

```

The query returns results from the refreshed **SQLite index**, confirming that your Obsidian edits are fully integrated into the ai-memory ecosystem.

## Summary

- The ai-memory wiki uses plain-text Markdown stored under `<data_dir>/wiki/`, ensuring full compatibility with Obsidian
- The filesystem watcher in [`crates/ai-memory-wiki/src/wiki.rs`](https://github.com/akitaonrails/ai-memory/blob/main/crates/ai-memory-wiki/src/wiki.rs) (line 1242) automatically detects and indexes changes from external editors
- You can open the wiki directory directly in Obsidian using `obsidian "$WIKI_ROOT"`
- CLI commands like `write-page` create files that immediately appear in Obsidian
- All edits sync bidirectionally between Obsidian and the ai-memory search index

## Frequently Asked Questions

### Can I use Obsidian Mobile with ai-memory?

Yes, provided your wiki directory is synchronized to your mobile device via Git, iCloud, or another file sync service. Since ai-memory stores content as plain-text files in a standard directory structure, any Markdown editor—including Obsidian Mobile—can read and write to the wiki. The server will detect changes when the files sync back to your computer.

### What happens if I edit the same file in both Obsidian and the CLI simultaneously?

The filesystem watcher in [`crates/ai-memory-wiki/src/wiki.rs`](https://github.com/akitaonrails/ai-memory/blob/main/crates/ai-memory-wiki/src/wiki.rs) processes the last write event to reach the filesystem. If you use Git (as recommended in [`docs/ARCHITECTURE.md`](https://github.com/akitaonrails/ai-memory/blob/main/docs/ARCHITECTURE.md)), version control handles conflicts. Without Git, the last save wins. To avoid conflicts, save your work in one interface before switching to the other.

### Does ai-memory support Obsidian-specific syntax like [[wikilinks]]?

The ai-memory wiki stores standard Markdown files, so while Obsidian-specific syntax like `[[wikilinks]]` will be preserved in the file contents, the ai-memory search indexer may not resolve these as bidirectional links. The SQLite index focuses on full-text content search rather than Obsidian's graph database features.

### Where exactly are the wiki files stored on disk?

By default, the wiki resides at `~/.local/share/ai-memory/wiki/` (or your custom `--data-dir` path). This location is documented in [`docs/ARCHITECTURE.md`](https://github.com/akitaonrails/ai-memory/blob/main/docs/ARCHITECTURE.md) (line 255) and contains the directory hierarchy of workspaces and projects as subfolders, making it straightforward to open as an Obsidian vault.