CLI Tool Utilities & Power Tools ★ 5,183 stars on GitHub

Mermaid CLI

This tool converts simple text-based diagrams into high-quality images like PNG, SVG, or PDF files for your documents.

Get Command-Line Tool →
Command-Line Utility (No Graphical Interface): This program runs inside your system terminal or command prompt rather than opening a desktop window. Follow the official installation instructions below.

Guide and Overview

What it does in plain English

Mermaid CLI takes simple text instructions and turns them into clean, professional diagrams. It allows you to create flowcharts, sequence diagrams, and other visual aids without needing to draw them manually. You can save these diagrams as image files to include in your reports, presentations, or websites.

Who it’s for

  • Technical Writers: People who need to keep documentation updated with diagrams that change frequently.
  • Students and Researchers: Anyone who wants to quickly sketch out complex ideas or processes into a visual format for study notes.

Key features

  • Versatile Output: Save your diagrams as SVG, PNG, or PDF files depending on your needs.
  • Markdown Integration: Automatically find and convert diagrams embedded within your markdown files.
  • Customizable Themes: Easily switch between light and dark themes to match your document style.
  • Flexible Sizing: Adjust the dimensions of your output images to ensure they fit perfectly in your layout.
  • Automation Ready: Perfect for including in automated workflows to keep your visual documentation in sync with your text.

How to install (Download)

To use this tool, you will need to have Node.js installed on your computer. Once installed, you can set it up using your computer’s command terminal:

  • Standard Installation: Run npm install -g @mermaid-js/mermaid-cli in your terminal.
  • Using Docker: If you prefer using containers, you can pull the official image by running docker pull minlag/mermaid-cli.

Pros and Cons

  • Pros: Completely free and open-source, excellent for version control, and highly customizable.
  • Cons: Requires basic familiarity with using a command terminal, and setting up custom fonts or complex CSS may require a bit of learning.

Optional commercial services unrelated to the open-source developer. Clicking an #ad link helps fund HubHum at no extra cost to you.

  • ★ Top Recommended — Systeme.io: Free-forever all-in-one platform to build landing pages, newsletters, and automated workflows with zero monthly fees — Activate Systeme.io → (#ad)
  • AdGuard: Block intrusive ads, tracking scripts, and phishing domains system-wide across all browsers and desktop apps — AdGuard (#ad)
  • InterServer: Launch and host self-hosted web apps 24/7 on managed Linux cloud VPS servers starting at $3/month — InterServer (#ad)

Official Source & Credits: Official Source / Credits

Affiliate transparency (#ad): Some links on this page are affiliate links. If you choose to activate a service through them, we may earn a commission at no extra cost to you.

Your Saved Favorites

Your favorite apps are saved right here in this browser.


Sign in with one click to link your GitHub profile and sync favorites.