layout: home
title: Trellis
Trellis
Mermaid diagrams that actually look good.
> Early access — join the discussion
Trellis is a drop-in replacement for the default Mermaid renderer. It produces clean, overlap-free diagrams — no tangled edges, no manual layout tweaking, no post-processing in a drawing tool.
→ trellislab.net — live comparison and interactive editor
Why Trellis
Standard Mermaid uses an aging layout engine that frequently produces diagrams with overlapping and crossing edges. The result is diagrams that are hard to read and not presentation-ready without significant manual effort.
Trellis replaces that engine. Every edge finds its own clear corridor. Diagrams come out clean the first time.
Standard Mermaid syntax. Zero migration. Existing .mmd files work without changes.
Supported diagram types
- Flowchart
- Class diagram
- Entity-relationship (ER)
- C4 architecture diagram
- Architecture (
architecture-beta) — with icon support (AWS and other Iconify sets)
Installation
VS Code extension
Install from the marketplace:
ext install trellislab.trellis-mermaid
Or search "Trellis" in the VS Code Extensions panel. Live preview updates as you type.
→ Marketplace page
Trellis Flow
Trellis Flow, part of the VS Code extension, plays a Mermaid sequenceDiagram on top of your C4 model, one message at a time. Each step lights up the C4 nodes and relations it uses and fades out the rest, so you can walk through how a request moves through the system. Open the Trellis view in the activity bar, pick a source folder, and choose a sequence to step through or play.
Trellis Flow is a commercial feature that requires a license key. Guide: docs/vscode.md
Homebrew (macOS and Linux)
brew tap trellis-lab/trellis
brew trust trellis-lab/trellis
brew install trellis
> Homebrew 6.0+ requires trusting third-party taps before their formulae can load. If you skip brew trust and see Error: Refusing to load formula ... from untrusted tap, run brew trust trellis-lab/trellis and retry the install.
winget (Windows)
winget install TrellisLab.Trellis
CLI binary
Download the pre-built binary for your platform from the releases page:
| Platform | File |
|---|
| macOS (Apple Silicon) | trellis-vX.Y.Z-aarch64-apple-darwin.tar.gz |
| macOS (Intel) | trellis-vX.Y.Z-x86_64-apple-darwin.tar.gz |
| Linux x86_64 | trellis-vX.Y.Z-x86_64-unknown-linux-gnu.tar.gz |
| Windows x86_64 | trellis-vX.Y.Z-x86_64-pc-windows-gnu.zip |
Extract and add the binary to your PATH.
Docker
docker pull trellislab/trellis-cli:latest
docker run --rm -v "$(pwd):/data" trellislab/trellis-cli:latest render input.mmd -o output.png
Formats other than PNG need a license key — see Docker usage.
CLI usage
# Render to SVG (default)
trellis render diagram.mmd -o diagram.svg
# Render to PNG
trellis render diagram.mmd -o diagram.png
# Render to interactive HTML
trellis render diagram.mmd -o diagram.html -f html
# Render to editable Draw.io
trellis render diagram.mmd -o diagram.drawio -f drawio
# Render from stdin
echo "flowchart LR
A --> B --> C" | trellis render - -o diagram.svg
# Render all diagrams in a directory (commercial feature — requires a license)
trellis render-batch ./diagrams -o ./output
# Validate syntax only (no render)
trellis validate diagram.mmd
# Render with custom config
trellis render diagram.mmd -o diagram.svg --config trellis.toml
# Anonymize a diagram for a bug report (commercial feature — requires a license)
trellis anonymize diagram.mmd -o anonymized.mmd
anonymize replaces ids, labels, comments and other text with random characters of the same length, keeping syntax, structure and styling, so you can share a diagram that reproduces a layout problem without exposing confidential names. Review the output before sharing it. Details: docs/cli.md
Full CLI reference: docs/cli.md
| Format | Description |
|---|
svg | Scalable, embeddable, publication-ready |
png | Rasterized for presentations and documentation |
html | Self-contained interactive file — click nodes and edges to explore |
ascii | UTF-8 box-drawing for terminal preview and AI-agent workflows |
drawio | Editable .mxfile for draw.io, Confluence, and the VS Code draw.io extension |
Full format details and purpose: docs/cli.md
Themes
default, paper, blueprint, dark, midnight, forest
Set via --config trellis.toml:
theme = "paper"
Pandoc integration
Trellis includes a Pandoc Docker image for rendering Markdown documents with embedded Mermaid diagrams directly to PDF or HTML — no pre-processing step, no local Trellis install required.
docker pull trellislab/trellis-pandoc:latest
docker run --rm -v "$(pwd):/data" trellislab/trellis-pandoc:latest document.md -o document.pdf
Full Pandoc guide: docs/pandoc.md
MCP server
Trellis ships an MCP server for use with Claude Desktop and other MCP-compatible clients. The server exposes a render tool backed by the CLI binary.
Setup guide: docs/mcp.md
Licensing
Two separate licenses apply, covering different things:
- Source in this repository (docs, MCP server wrapper, provisioning scripts, examples) — MIT License.
- Trellis CLI binary and Docker images — proprietary, closed-source. See the EULA. Trellis is free for everyday rendering;
render-batch, anonymize, Trellis Flow and MCP SVG/HTML/Draw.io output are commercial features that require a license key.
Bundled open-source dependencies of the binary are attributed in THIRD-PARTY-LICENSES.md.
👉 Subscribe to Trellis
Commercial terms and key activation: docs/licensing.md
Live editor
Try Trellis in the browser without installing anything:
→ trellislab.net/editor.html
Releases and changelog
→ github.com/trellis-lab/trellis/releases
Issues and feedback
→ github.com/trellis-lab/trellis/issues