Your README's architecture diagram, redrawn on every push
flowgraph sync redraws the diagrams in your README from your code and configuration in CI, on GitHub, GitLab, Bitbucket or Azure DevOps, and commits only the ones that changed.
The architecture diagram in a README is usually right on the day someone draws it. Then a service is added, a queue replaces a direct call, and the picture quietly stops matching the code. Nobody updates it, because nobody notices.
From today, the README can update itself. flowgraph sync redraws the diagrams you list from the repository's own files on every push, renders the ones that changed, and commits them, in your own CI on GitHub, GitLab, Bitbucket or Azure DevOps.

How it works
flowchart LR
push[Push to main] --> ci[Your CI job]
ci --> draw[Draw the diagrams<br/>from the checkout]
draw --> same{Changed?}
same -->|no| done[Nothing to do]
same -->|yes| render[Render the image]
render --> commit[Commit the image<br/>and the README block]You list the diagrams once, in a flowgraph.yml at the root of the repository:
diagrams:
architecture: map # the codebase map
services: compose # services from docker-compose.yml
data-model:
draw: sql # the ER diagram from your migrations
out: docs/data-model.png
Then you mark where each one goes in the README:
## Architecture
<!-- flowgraph:architecture -->
<!-- /flowgraph:architecture -->
On each run, sync replaces whatever is between those two lines with a link to the freshly rendered image, and leaves the rest of the README alone.
What it can draw
The diagrams come from the same generators as the repository import in the app, so the same commit always gives the same diagram, with no AI involved:
- From the code: a codebase map, module dependencies, routes, class diagrams, a call map, or one function's flowchart, for TypeScript, JavaScript, Python, Java, Go and C#.
- From the configuration: services from Docker Compose, Kubernetes manifests, Terraform, OpenAPI endpoints, the CI pipeline itself, the data model from SQL or Prisma, and workspace packages.
- From your Flowgraph Studio account: a diagram you drew and styled in the app, with its own theme. On Pro and Pro Max, sync can also keep a saved diagram up to date with the code, keeping the positions you gave its nodes.
Your code stays where it is
Sync runs in your pipeline, on the code your CI already checked out, so private repositories need no extra access and the code never leaves the runner. Only the Mermaid of a diagram that needs rendering is sent to Flowgraph Studio's API.
Unchanged diagrams aren't rendered again, so a push that doesn't change the architecture uses none of your monthly renders. And sync commits only its own files: the images, the README blocks and a small .flowgraph-sync.json that remembers what it rendered. Anything else in the checkout stays out of the commit.
On your Git host
| Host | Ready-made integration |
|---|---|
| GitHub | The theorence-labs/flowgraph-sync-action Action |
| GitLab | The flowgraph-sync CI/CD component, with a merge request check |
| Bitbucket | The theorencelabs/flowgraph-sync-pipe Pipe |
| Azure DevOps | A pipeline template to copy into your repository |
On GitHub, the whole workflow is:
name: Diagrams
on:
push:
branches: [main]
permissions:
contents: write
concurrency: diagrams # one run at a time
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: theorence-labs/flowgraph-sync-action@v1
with:
api-key: ${{ secrets.FLOWGRAPH_API_KEY }}
Anything else that runs Node.js 20 can call the CLI directly: npx flowgraph-cli@0.3.0 sync --push.
The commit carries [skip ci], so it doesn't set off another run. In a pull request, sync --check tells you whether the diagrams will change once it's merged, without changing anything.
Get started
- Create an API key under Account settings → Render API. A free account works; its images carry a small watermark.
- Add
flowgraph.ymland the README markers. - Add the integration for your host.
Keep README architecture diagrams up to date in CI walks through the setup on each host, and the flowgraph-cli README has every setting. For diagrams you draw by hand, see Diagrams you draw in Flowgraph Studio, now in your README. For the diagrams themselves, start with Draw a GitHub repository's architecture, and see Keep architecture diagrams up to date for reviews and version history in the app.
More from the blog
- Edit Mermaid diagrams visually, inside VS CodeThe Flowgraph Studio extension now opens diagrams on the website's canvas inside VS Code. Drag, connect and restyle, and every change lands in your file as plain code.
- Your diagram's style now travels with its codeA new %% flowgraph-theme line keeps a Mermaid diagram's Flowgraph theme inside the file, so it looks the same in a repository, in VS Code, in CI and through the API.
- Connect Claude to Flowgraph Studio by signing inClaude, Claude Code, Cursor and VS Code can now connect to Flowgraph Studio's MCP server with its address alone. Approve the app once, revoke it whenever you like, and no API key changes hands.