Skip to main content
  1. Projects/

Mermaid CLI: A Command line tool for compiling mermaid diagrams

··116 words·1 min

While working on my blog, I realized that I want to make it run even faster by removing the mermaid diagram loading in the frontend. We can do this by preprocessing the markdown file before it is built and deployed on netlify.

Introduction #

Mermaid CLI Go is a go port of the mermaid-cli.

Goals of the project #

  • A command line tool that compiles mermaid into images.
  • Support parsing markdown files into mermaid SVGs automatically.

Current Features #

  1. Support file formats
    1. Markdown
    2. SVG
    3. PNG
    4. Webp
    5. PDF
  2. Themes
  3. Background colors
  4. CSS Support

Installing the package #

go install github.com/jh123x/mermaid-cli-go@v0.0.2

This will install the latest version of mermaid-cli-go (as of writing this article)