Skip to content

Integrations

GitHub sync

Push and pull Mermaid to a gist or repo file, with optional Auto-sync via the GitHub App (Pro/Team).

On this page4 sections
  1. Overview
  2. Install App and connect OAuth
  3. Push, pull, and Auto-sync
  4. README tip

Overview

GitHub sync keeps a diagram’s Mermaid source linked to a gist or a single file in a repository. Manual push/pull always works. For repos, you can enable Auto-sync: SayDiagram pushes after you save, and pulls when GitHub receives a push webhook.

  • Pro and Team only (including Team members with Pro quotas).
  • Install the GitHub App for repo Auto-sync (Profile → Integrations).
  • Connect GitHub OAuth for gists (and as a repo fallback).
  • Link a diagram from Export → Sync with GitHub…
  • Sync writes Mermaid text only (.mmd / .mermaid / .md) — not Arrange layout or PNG.
  • Gists stay manual — Auto-sync is repo files only.

Install App and connect OAuth

  1. Open Profile → Integrations → GitHub sync.
  2. Install GitHub App on your user or org (Contents read/write).
  3. Optionally Connect GitHub OAuth for private gists.
  4. You can disconnect OAuth without unlinking your SayDiagram login.

Push, pull, and Auto-sync

  1. In the editor, open Export → Sync with GitHub…
  2. Choose Gist or Repo file (owner, repo, branch, path).
  3. Push uploads Mermaid source. Pull downloads remote source (version snapshot first).
  4. For repo links, enable Auto-sync to push ~8s after save and pull on GitHub push events.

Conflicts never force-overwrite. Auto-sync pauses and notifies you; resolve with Pull first / Overwrite, then Resume Auto-sync.

README tip

For GitHub READMEs, prefer a .md file with a fenced Mermaid block so GitHub renders the diagram:

```mermaid
flowchart LR
  A[Idea] --> B[Arrange]
  B --> C[Ship]
```

Raw .mmd files stay as source in the repo; many tools and the SayDiagram IDE extension (VS Code, Cursor, Windsurf, VSCodium) open them directly.

Learn Mermaid · FAQ · Pricing · Dashboard