openflowkit/openflowkit

Free, open-source diagram canvas. Draw it, write it as code (Mermaid, D2, Structurizr in), ask any AI model or a local one, let Claude Code edit it live over MCP, or map a GitHub repo with every arrow cited to a file and line. MIT, local-first, no account.

OpenFlowKit in plain English

OpenFlowKit is a free, open-source tool for creating architecture diagrams — the kind that show how software systems fit together. It's designed to be flexible: you can draw diagrams by hand, write them as short text, or let an AI agent draw them for you. Everything runs locally in your browser or on your machine, and there's no account required.

What makes it special?

  1. Your AI agent can draw on your canvas, live. If you use coding assistants like Claude Code, Cursor, or any tool that supports the MCP (Model Context Protocol) standard, you can connect OpenFlowKit to them. Then you can ask the agent to create or modify a diagram, and it will do so right in front of you — each change is a single undo step, just like your own edits.

  2. Text and canvas are the same diagram. You can write a diagram as simple text (using OpenFlowKit's own DSL — a small, forgiving language) and it becomes a visual diagram. You can also drag shapes around on the canvas and the text updates to match. The two are always in sync. You can even paste diagrams written in Mermaid, Structurizr, or D2 and they'll be converted.

  3. Paste a GitHub repo and get its map. Type owner/repo into the app and it will read the repository from GitHub and draw a map of its components, with every connection cited to the exact file:line in the code. This works without installing anything or needing a key. For private repos, you can add a read-only token or map a local checkout.

  4. Export in many formats, including animations. You can export your diagram as PNG, SVG, PDF, JSON, or even as an animated SVG, GIF, MP4, or WebM. You can also copy it as Mermaid text to embed in a README.

  5. Ten diagram types, one language. OpenFlowKit supports architecture, sequence, flowchart, ERD, state, class, mind map, git graph, chart, and wireframe diagrams — all using the same simple text syntax. Each type has its own documentation and examples.

How it works

At the core is a text-based DSL (Domain-Specific Language) that describes diagrams. The app compiles this text into shapes and connections on a canvas. Because the language is plain TypeScript with no heavy dependencies, the same compiler runs in the browser, in the MCP server, and in the command-line tool. This means you can use the same diagram text everywhere.

Getting started

  • In the browser: Go to app.openflowkit.com — nothing to install.
  • In a terminal: Run npx openflowkit (requires Node 20.11+).
  • Run locally: Clone the repo, run npm install && npm run dev, and open http://localhost:3000.

Connecting your AI agent

OpenFlowKit provides a set of tools (via an MCP server) that agents can use. Depending on where your agent runs, you can:

  • On your computer (Claude Code, Cursor, VS Code, etc.): Install the MCP server and the agent can draw on your open canvas, edit .openflow.json files, map codebases, and take screenshots.
  • In a chat app (claude.ai, ChatGPT): Add a custom connector and the agent can generate a diagram as a card that you can open in OpenFlowKit.
  • In a browser (experimental): If your browser supports WebMCP, the agent can read and edit the diagram you have open.

Setup instructions for each client are in the app's Connect agent panel.

Using the CLI and CI

The openflowkit CLI runs the same engine as the app, so you can render diagrams, validate them, convert between formats, and even discover the architecture of a codebase — all from a terminal or CI job. For example:

npx openflowkit render diagram.ofk -o diagram.svg
npx openflowkit validate diagram.ofk --strict
npx openflowkit convert flow.mmd -o flow.openflow.json
npx openflowkit discover . --out architecture.ofk
npx openflowkit drift .

You can commit .ofk files next to your code and use drift to check if the code has moved on from the diagram. There's also a GitHub Action that comments on pull requests with diagram changes.

Sharing and privacy

You can share a view-only link that is encrypted in your browser, or an editable copy where the diagram code is embedded in the link — nothing is uploaded to a server.

Keyboard shortcuts

OpenFlowKit has keyboard shortcuts for almost everything. Press ? in the app to see them all. For example, V selects, R draws a rectangle, ⌥C opens the code panel, and ⌘↵ generates the diagram from text.

The bottom line

OpenFlowKit is a flexible, local-first diagramming tool that bridges hand-drawn, text-based, and AI-assisted creation. It's free, open source (MIT license), and designed to fit into your existing workflow — whether you're working alone, with an agent, or in a CI pipeline.

Related

  • Project
  • Project
  • Project
  • Project
  • Project