Comparison
A Mermaid alternative where diagrams are validated, not just drawn
Mermaid earned its place: text in, diagram out, right inside Markdown. Chiltepin keeps that idea and changes one thing that changes everything — diagrams are typed YAML with a schema, so a validator can prove them right, an AI agent can write them reliably, and CI can fail the build when they drift.
You do not have to rewrite anything first
A ```mermaid fence is converted into a typed Chiltepin block when the file is parsed. Five grammars are covered — sequenceDiagram, flowchart / graph, erDiagram, stateDiagram and pie — and the result validates and renders identically to a hand-written block. Any other Mermaid grammar stays prose, exactly as before, and is never flagged.
So the migration is: keep your fences, run chiltepin check, and let the first structured edit rewrite each one to its canonical tag. The exact supported subset, and what is dropped, is documented rather than implied — reference/mermaid.md. DBML and Prisma fences convert the same way, and chiltepin sync sql | dbml | prisma <file> converts a whole schema file.
The same diagram, side by side
Mermaid:
sequenceDiagram
Client->>API: POST /orders
API-->>Client: 201 CreatedChiltepin:
```sequence
id: seq-place-order
title: Place order
actors:
- { id: Client, name: Client }
- { id: API, name: Orders API }
messages:
- { from: Client, to: API, label: POST /orders, kind: sync }
- { from: API, to: Client, label: 201 Created, kind: response }
```Chiltepin is more explicit on purpose. Named actors, typed message kinds, and a required id are what make the block checkable: chiltepin check verifies every field, every referenced actor, and every cross-reference between blocks — and fails CI on errors, exactly like a test suite. A Mermaid string that parses is "valid" even when it's wrong.
Where the two tools differ
| Mermaid | Chiltepin | |
|---|---|---|
| Syntax | Free-form DSL per diagram type | Typed YAML blocks in Markdown, one grammar |
| Validation | Parses or it doesn't | Strict schema — chiltepin check fails CI on errors |
| Rendering | JavaScript at view time | Build-time SVG, zero runtime JS |
| Scope | Diagrams | Whole documents — a growing set of block types, incl. tables, APIs, ADRs |
| Output | Wherever Mermaid is embedded | Themed website, slide decks, or PDF from one source |
| AI authoring | Prompt and hope | One-command agent skill (npx skills add); output verified by schema |
| License | MIT | MIT |
When Mermaid is still the right call
One diagram in a GitHub README that GitHub renders for free? Use Mermaid — it's the shortest path and we'd pick it too. Chiltepin is for the step after that: when diagrams live inside real documents that need review, validation, theming, and export — and when an AI agent is doing the writing and you need to trust the result. It's the docs-as-code workflow applied to everything visual, not just prose.
Try it without installing anything
The whole editor runs in your browser — open a prefilled template in Studio, or paste your own Markdown into the playground and watch the real pipeline render it. Nothing is uploaded, and there's no signup.
Frequently asked questions
- Why look for a Mermaid alternative?
- Mermaid is excellent for a quick flowchart in a README. Teams usually outgrow it for three reasons: the DSL is free-form, so CI cannot tell a wrong diagram from a right one; rendering needs JavaScript at view time, so output depends on where the diagram is viewed; and it stops at diagrams, so the rest of the document — tables, API specs, decision records — has no equivalent rigor.
- How is Chiltepin different from Mermaid?
- Chiltepin diagrams are typed YAML blocks inside Markdown, validated against a strict schema by chiltepin check — invalid diagrams fail CI, like failing tests. Rendering happens at build time to self-contained SVG with zero runtime JavaScript, and the same pipeline covers many block types beyond diagrams: tables, API endpoints, ADRs, roadmaps, and slide decks.
- Can AI write Chiltepin diagrams reliably?
- Yes — that is the design center. Run npx skills add jdiejim/chiltepin -g once and Claude Code, Cursor, Codex, Copilot or any of 70+ agents learns the block grammar. Because every block has a schema, the agent’s output is verifiable: chiltepin check proves the structure is right before you review the content. With a free-form DSL there is nothing to check against.
- Does Chiltepin support the same diagram types as Mermaid?
- The common ground is covered — sequence diagrams, flowcharts, state machines, ER diagrams, C4, Gantt, git graphs, Sankey, quadrants, timelines — plus document-oriented types Mermaid does not have, like API endpoints, architecture maps, wireframes, and ADR decision blocks. It is one growing library of typed blocks.
- Is Chiltepin free?
- Yes. Chiltepin is MIT-licensed open source; npx chiltepin runs the CLI with nothing installed. The browser Studio at chiltepin.dev/studio runs entirely client-side with no signup and nothing uploaded.