№ 0114GitHub
MdChat Markdown editor with Muse Spark
MdChat is a native macOS Markdown previewer and vim-keyed editor with an AI side panel that answers questions about selected blocks and rewrites them behind a diff, using Gemini or Muse Spark.
# MdChat Native macOS Markdown previewer and vim-keyed editor, with a Gemini chat panel that answers questions about whatever part of the document you pick — and can rewrite it in place, behind a diff you approve. ## Requirements - macOS 13 or newer - Xcode command line tools, Swift 5.9+ — `xcode-select --install` if `swift --version` comes back empty - An API key for at least one provider: Gemini or Meta Model API (Muse Spark) No Xcode project and no SwiftPM dependencies. The only third-party code is vendored JavaScript: markdown-it, Mermaid, and CodeMirror 5 with its vim keymap. ## Setup ```sh git clone <your-remote> MdChat cd MdChat chmod +x fetch-deps.sh build.sh ./fetch-deps.sh # downloads the pinned JS into Resources/vendor ./build.sh # -> MdChat.app open MdChat.app ``` `fetch-deps.sh` needs network access and only has to run once — but it is required, because `vendor/` is gitignored and the app renders nothing without it. `build.sh` takes `debug` or `release` (default `release`) and ad-hoc signs the bundle so Keychain and network access behave. The app icon comes from `Icon/AppIcon.icns`, which `build.sh` copies into the bundle. To change the artwork, replace `Icon/icon-1024.png` and run `./make-icon.sh` (which uses `sips` and `iconutil`). Move `MdChat.app` wherever you like, or leave it in the tree. Rebuilding replaces it, so keep it where `build.sh` puts it if you plan to iterate. ## Providers and API keys Two backends, one conversation. Press **⌘,**, pick the provider tab, paste its key, set a model ID, **Save**. The checkbox in that sheet is what makes a provider active — saving a key doesn't switch to it, so you can keep both configured and flip between them from the toolbar menu or the Chat menu. | | Gemini | Muse Spark | | --- | --- | --- | | Key from | <https://aistudio.google.com/apikey> | Meta Model API (`MODEL_API_KEY`) | | Endpoint | `streamGenerateContent?alt=sse` | `https://api.meta.ai/v1/chat/completions` | | Auth header | `x-goog-api-key` | `Authorization: Bearer` | | Default model | `gemini-3.8-flash` | `muse-spark-1.3-contributor` | Keys go into your login Keychain under service `MdChat`, one account per provider — never a file in the project or a plist. Nothing in the repo will ever contain one. To check or remove them outside the app: ```sh security find-generic-password -s MdChat -a gemini -w




ChatForm
Tgmlabs