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.

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
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.2

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.2
File Size Uploaded Provenance Actions
merrow-0.1.2.tar.gz 498.1 kB Without provenance Details for merrow-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 660.0 kB

Release files / merrow-0.1.2.tar.gz

Download URL merrow-0.1.2.tar.gz
Size 498.1 kB
Tags Source
SHA-256 checksum
How to use checksums
85a2317b26ed80d184fc8a47ebb3cf5ec6e0b438ae8b0d7b478dbc1cafb4678b
BLAKE2b-256 checksum
How to use checksums
13556c777792766cd7130196c2725db78fdaef3a91780b08a39904c9002b20eb
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.2-py3-none-any.whl

Download URL merrow-0.1.2-py3-none-any.whl
Size 162.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
baa0b6a8f1f260192450969a08620bab7841e053fa1d8a7b526535b9743c08c6
BLAKE2b-256 checksum
How to use checksums
e509ed976ab65a744a579f933d89aac726984fe57f0af0cad9dc353696afa83b
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.2

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