# Obsidian Plugin — obsidian-demarkus Section home for the Obsidian community plugin that connects Obsidian vaults to demarkus servers. **Repo:** `latebit-io/obsidian-demarkus` on GitHub **Install:** via BRAT — `latebit-io/obsidian-demarkus` **Current release:** v0.1.0 ## What it does Fetch, edit, and publish markdown documents to demarkus servers directly from an Obsidian vault. Shells out to the `demarkus` CLI binary. ## Pages - [Plan](/plugins/obsidian/plan.md) — architecture, scope, implementation steps, future ideas ## Installation (BRAT) The plugin is distributed as a **community beta** plugin via BRAT (Beta Reviewer's Auto-update Tool). ### Prerequisites - Obsidian v1.3+ - BRAT plugin installed in Obsidian - A `demarkus` CLI binary in your PATH ### Steps 1. Open Obsidian settings → Community plugins → Turn on "Safe Mode" if it's on, then turn it off 2. Browse community plugins, search "BRAT" and install it 3. Open BRAT settings → Add Beta Plugin 4. Paste: `litebit-io/obsidian-demarkus` 5. Close BRAT settings 6. Find "Obsidian Demarkus" in Community plugins and enable it 7. Configure in settings: enter your demarkus server address and auth token ### Configuration In plugin settings: - **Server URL:** Mark protocol server (e.g., `mark://localhost:6309`) - **Auth Token:** Your capability token (passed to the CLI via `DEMARKUS_AUTH` env var) - **Fetch Behavior:** By default uses cached server state; toggle "Fresh fetch" to bypass cache ## Development ### Source & Release - **Source of truth:** `plugins/obsidian/` in the demarkus monorepo (this repo) - **Standalone repo:** `litebit-io/obsidian-demarkus` (what users install from) - **Release flow:** Build in monorepo → copy `manifest.json` + `main.js` to standalone repo → create GitHub release ### Build ```bash cd plugins/obsidian npm run build ``` Outputs `manifest.json` and `main.js` in the root directory. ### Key Files - `src/main.ts` — plugin lifecycle and command registration - `src/cli.ts` — invokes `demarkus` CLI binary, passes auth via `DEMARKUS_AUTH` - `src/frontmatter.ts` — YAML frontmatter parsing and generation - `src/settings.ts` — configuration UI and data persistence ### Architecture The plugin shells out to the `demarkus` CLI binary rather than linking the library directly. Auth is passed via environment variable (`DEMARKUS_AUTH`) — never on CLI args to avoid exposure in process listings. See [obsidian-details.md](/obsidian-details.md) for full technical notes.