Skip to main content

merrow

Mermaid diagram automation for people, now updated for AI too.

You describe a diagram as a small YAML file, or write the Mermaid yourself. merrow writes it as Mermaid in a house style, ready to drop into Markdown. It renders that Mermaid to light and dark SVG for places that don't run Mermaid, and checks it against a diagram standard. Agents get the same loop people do: write, render, lint, fix.

The point is one look from many sources. Your diagrams arrive as Visio pages, PowerPoint slides, draw.io files, Structurizr models and publisher icon sets, each styled differently. merrow reads them into one graph and draws them all the same way. Where a source has style rules worth keeping, merrow keeps them: AWS diagrams keep AWS's group styles and icon sizes. tests/test_one_look.py and tests/test_aws_profile.py check both.

What it does

  • Draws a graph of nodes, groups and arrows as Mermaid, in a profile's look. No hand-typed colours or style lines.
  • Keeps a library of objects (aws.s3, or your shop.orders) so a thing looks the same in every diagram that uses it.
  • Builds icon packs from the SVG, Visio, PowerPoint or PDF files AWS, Kubernetes, GCP, IBM Carbon, Tabler, the ASF and others publish, and draws AWS diagrams with AWS's icons and group styles.
  • Ships 34 generic icons from IBM Carbon (Apache-2.0), so icon.server, icon.database and the like draw before any pack is built.
  • Renders light and dark SVGs, and lints each diagram for size, crossed lines, skip arrows, labels and captions.
  • Reads draw.io, PPTX, Visio, Excalidraw, Graphviz, Structurizr and PDF files into the same graph. A PDF keeps only ink, so its boxes, labels and arrows are rebuilt from where they are drawn.

Quick start

It's a CLI for Linux and macOS. The installer uses your uv, or fetches a pinned uv release and checks its SHA256 when you have none. Then it installs merrow, the pinned Mermaid bundle and a headless browser. On Debian and Ubuntu it also asks sudo for the browser's system libraries.

git clone https://github.com/hyperi-io/merrow
./merrow/install.sh
merrow graph render demo.yaml --out out

Already have uv? uv tool install --python 3.14 merrow takes the release from PyPI, then run merrow tools ensure. uv caches PyPI's index, so for a version out in the last few minutes add --refresh.

Windows is best effort, and we guarantee nothing there because we don't run it. Install uv yourself, then run the same two commands.

With a demo.yaml like this one:

title: L2 Services -- Log pipeline
description: Shippers send logs to a collector, which writes them to a store.
nodes:
  - {id: shippers, label: Log shippers}
  - {id: collector, label: Collector}
  - {id: store, label: Log store}
edges:
  - {source: shippers, target: collector, label: logs}
  - {source: collector, target: store}

you get the Mermaid and a light and a dark SVG:

{"diagram": "demo", "theme": "light", "svg": "out/demo-light.svg"}
{"diagram": "demo", "theme": "dark", "svg": "out/demo-dark.svg"}

merrow diagram lint out/demo.mmd then measures it. merrow graph write writes the Mermaid alone, with no browser. merrow --help lists the rest.

Configuration

Settings come in layers: merrow's defaults, then the reference repos you list, then settings.yaml in the working directory, then MERROW_* environment variables. A reference repo is where your company's objects, profiles and brand live, so merrow itself stays neutral. Ours is hyperi-merrow.

Setting What it does
references Your reference repo directories, org first, then personal
profile The look to draw in: house, aws, or one a reference repo adds
destination Where it is published: page, slide, or one a reference repo adds. It sets the width and height limits and the themes rendered
font One font stack for every profile, such as [Arial, Helvetica, sans-serif] for PowerPoint and Visio
packs_dir, cache_dir Where built icon packs and downloads go. Neither is ever in a repo

merrow config get prints every setting with all the layers merged.

Documentation

Getting help

Open an issue: https://github.com/hyperi-io/merrow/issues

Contributing

Read CONTRIBUTING.md first. Start with its Context section.

Licence

Apache-2.0. See LICENSE.

Why Merrow? Because Lee, SQUIRREL!

Metadata

Release files for merrow 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for merrow 0.1.9
File Size Uploaded Provenance Actions
merrow-0.1.9.tar.gz 545.4 kB Without provenance Details for merrow-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for merrow 0.1.9
File Interpreter ABI Platform Actions
merrow-0.1.9-py3-none-any.whl Python 3 none any Details for merrow-0.1.9-py3-none-any.whl

Total release size: 716.0 kB

Release files / merrow-0.1.9.tar.gz

Download URL merrow-0.1.9.tar.gz
Size 545.4 kB
Tags Source
SHA-256 checksum
How to use checksums
09362238e827e95ddac0230ce8e82410ae45b6be071f15ec027e42881cf42706
BLAKE2b-256 checksum
How to use checksums
a781535e947179167bbad2ee16b2377e62be8abb6360451495c392c387219b54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / merrow-0.1.9-py3-none-any.whl

Download URL merrow-0.1.9-py3-none-any.whl
Size 170.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9ba5fa12916159b2437c20009de5944aa3bed5f4ba3d75743e62610bbd7ebaf
BLAKE2b-256 checksum
How to use checksums
f655d3c1b1b9815351577ade1c2fa0911d2ed58179ecc5c1c2d7adb30f468625
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for merrow 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page