diff --git a/skills/research/llm-wiki/SKILL.md b/skills/research/llm-wiki/SKILL.md index db172438f..753bc3af0 100644 --- a/skills/research/llm-wiki/SKILL.md +++ b/skills/research/llm-wiki/SKILL.md @@ -380,6 +380,62 @@ For best results: If using the Obsidian skill alongside this one, set `OBSIDIAN_VAULT_PATH` to the same directory as the wiki path. +### Obsidian Headless (servers and headless machines) + +On machines without a display, use `obsidian-headless` instead of the desktop app. +It syncs vaults via Obsidian Sync without a GUI — perfect for agents running on +servers that write to the wiki while Obsidian desktop reads it on another device. + +**Setup:** +```bash +# Requires Node.js 22+ +npm install -g obsidian-headless + +# Login (requires Obsidian account with Sync subscription) +ob login --email --password '' + +# Create a remote vault for the wiki +ob sync-create-remote --name "LLM Wiki" + +# Connect the wiki directory to the vault +cd ~/wiki +ob sync-setup --vault "" + +# Initial sync +ob sync + +# Continuous sync (foreground — use systemd for background) +ob sync --continuous +``` + +**Continuous background sync via systemd:** +```ini +# ~/.config/systemd/user/obsidian-wiki-sync.service +[Unit] +Description=Obsidian LLM Wiki Sync +After=network-online.target +Wants=network-online.target + +[Service] +ExecStart=/path/to/ob sync --continuous +WorkingDirectory=/home/user/wiki +Restart=on-failure +RestartSec=10 + +[Install] +WantedBy=default.target +``` + +```bash +systemctl --user daemon-reload +systemctl --user enable --now obsidian-wiki-sync +# Enable linger so sync survives logout: +sudo loginctl enable-linger $USER +``` + +This lets the agent write to `~/wiki` on a server while you browse the same +vault in Obsidian on your laptop/phone — changes appear within seconds. + ## Pitfalls - **Never modify files in `raw/`** — sources are immutable. Corrections go in wiki pages.