3 GitHub Drawing Tools That Let You Generate Diagrams with One Line of Code

Ever found yourself wasting half an afternoon dragging boxes and arrows around in some diagramming app, just to end up with a chart that’s already outdated by the time you finish? Yeah, me too.

Turns out, there’s a better way—actually, three better ways. These GitHub projects let you describe your diagrams using plain text or a simple DSL, and they generate the visuals automatically. No manual alignment, no resizing, no frustration.

Here are three that I keep coming back to.

1. Mermaid Probably the most well-known one in this space. Mermaid lets you write diagrams with a Markdown-like syntax. Flowcharts, sequence diagrams, Gantt charts, even pie charts—all in a single code block. It’s supported natively by GitHub, Notion, and many other platforms, so you can embed diagrams directly into your documentation. The syntax is straightforward:

graph TD

A[Start] --> B{Decision} B -->|Yes| C[Proceed] B -->|No| D[Stop]

And boom, you get a neat flowchart. Super handy for README files or internal docs.

2. PlantUML If Mermaid feels a bit limited for complex diagrams, PlantUML is a great next step. It supports UML diagrams (class, sequence, use case, activity, etc.) and has a richer set of styling options. It’s a bit more verbose, but the output quality is higher. You can also integrate it with editors like VS Code, so you get live preview while typing. Perfect for software architecture diagrams where you need precise relationships.

3. Diagrams This one is a Python library that lets you define cloud system architectures programmatically. You import nodes like AWS::EC2::Instance or Azure::VM, connect them with edges, and generate diagrams as PNG or SVG. It’s especially useful for DevOps folks who want to version-control their infrastructure diagrams. The code looks like:

from diagrams import Diagram

from diagrams.aws.compute import EC2 from diagrams.aws.database import RDS

with Diagram("Simple Web Service"): EC2("Web") >> RDS("Database")

One script, one diagram, no manual drawing. Really practical for CI/CD pipelines where diagrams need to stay in sync with actual infrastructure.

So if you’re still manually aligning those boxes, maybe give these a try. They won’t make you a better architect overnight, but they’ll definitely save you time drawing.