feat: omind setup (MCP provisioning) + serve (web UI)#2
Merged
Conversation
Build out the two omind subcommands on top of the project skeleton. setup: idempotently provisions the obsidian-mcp server for the Claude Code CLI at user scope. Seeds an OMI folder (.obsidian config + Memory Template + index), never clobbering existing files, and only (re)registers the MCP server when the resolved path differs. Supports --vault/--folder/--server-name/--dry-run/--force, fails fast on missing node/npx/claude, and rejects a .obsidian path that is a file. serve: a localhost FastAPI app exposing JSON CRUD over the OMI markdown notes, fronted by a static card-catalog SPA (Tailwind + vanilla JS, Fraunces/Newsreader/JetBrains Mono). store.py does framework-free file I/O with a template parse/render round-trip, automatic index.md maintenance, and a path-traversal guard (safe_name) that every read/write/delete routes through. Covered by 40 tests (parse/render round-trip, filename sanitization, traversal rejection, provision idempotency/dry-run/prereq/bad-layout, and web CRUD + traversal). ruff, mypy --strict, and pytest all green. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1.
Summary
Implements both halves of
omind:omind setup— idempotently provisions the OMI/Obsidianobsidian-mcpwiring for the Claude Code CLI: creates the vault'sOMI/folder, seeds the.obsidian/config +Memory Template.md+index.md, and registers the MCP server at user scope (claude mcp add -s user). Re-runnable: skips when the registered path already matches, re-registers when it differs. Supports--vault,--folder,--server-name,--dry-run,--force.omind serve— a FastAPI + Tailwind localhost web app to view, add, and edit OMI memory entries. Card-catalog aesthetic, structured-form editing with a raw-markdown fallback, client-side markdown render with clickable[[wikilinks]]and#tags. JSON API with path-traversal-safe file I/O.Layout
provision.py— the setup logic (prereq checks, vault/config/seed creation, idempotent MCP registration, verify).store.py— framework-free markdown note CRUD + Memory-Template parse/render +index.mdmaintenance + traversal guard.web/app.py+web/static/— FastAPI routes + the single-page UI.seeds.py— the captured.obsidianJSON + template/index constants.cli.py— argparse subcommands.Test plan
ruff check .— cleanmypy src(--strict) — clean across 8 source filespytest -v— 40 passed (store round-trip/sanitization/traversal, provision idempotency/dry-run/missing-prereq, web CRUD + traversal rejection)omind setupagainst a throwaway vault →claude mcp getshows Connected; re-run idempotent;omind serveserves the UI and CRUD worksProudly Made in Nebraska. Go Big Red! 🌽 https://xkcd.com/2347/