Mermaid CLI (mmdc) is the command-line interface for the Mermaid diagramming library. It converts text-based diagram definitions into SVG, PNG, and PDF output files, enabling automated diagram generation from code.
Scanned 6/8/2026
Install via CLI
openskills install agentskillexchange/skills---
name: "Mermaid CLI Diagram-as-Code Renderer"
slug: "mermaid-cli-diagram-as-code-renderer"
description: "Mermaid CLI (mmdc) is the command-line interface for the Mermaid diagramming library. It converts text-based diagram definitions into SVG, PNG, and PDF output files, enabling automated diagram generation from code."
github_stars: 4341
verification: "security_reviewed"
source: "https://github.com/mermaid-js/mermaid-cli"
author: "mermaid-js"
category: "Image & Creative Automation"
framework: "Multi-Framework"
tool_ecosystem:
github_repo: "mermaid-js/mermaid-cli"
github_stars: 4341
npm_package: "@mermaid-js/mermaid-cli"
npm_weekly_downloads: 438910
---
# Mermaid CLI Diagram-as-Code Renderer
Mermaid CLI (mmdc) is the command-line interface for the Mermaid diagramming library. It converts text-based diagram definitions into SVG, PNG, and PDF output files, enabling automated diagram generation from code.
## Installation
Use the upstream install or setup path that matches your environment:
- npm install -g @mermaid-js/mermaid-cli
- ## Use Docker/Podman:
- docker pull minlag/mermaid-cli
- docker pull ghcr.io/mermaid-js/mermaid-cli/mermaid-cli
Requirements and caveats from upstream:
- [](https://www.npmjs.com/package/@mermaid-js/mermaid-cli)
- [](https://hub.docker.com/r/minlag/mermaid-cli)
- [](https://github.com/mermaid-js/mermaid-cli/actions/workflows/compile-merma...
Basic usage or getting-started notes:
- sh
- Convert Mermaid mmd Diagram File To SVG
- mmdc -i input.mmd -o output.svg
- Source: https://github.com/mermaid-js/mermaid-cli
- Extracted from upstream docs: https://raw.githubusercontent.com/mermaid-js/mermaid-cli/HEAD/README.md
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/mermaid-cli-diagram-as-code-renderer/)
No comments yet. Be the first to comment!