mermaid-cli

Render Mermaid diagrams to SVG, PNG, or PDF from the command line.

5|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/colinwilliams91/gaitor-orchestrator-cli --skill mermaid-cli-colinwilliams91
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mermaid-cli
Source: https://github.com/colinwilliams91/gaitor-orchestrator-cli/tree/main/.agents/skills/mermaid-cli
Command: npx skills add https://github.com/colinwilliams91/gaitor-orchestrator-cli --skill mermaid-cli-colinwilliams91

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate and render Mermaid diagrams directly from the command line, saving time by producing visual outputs from textual definitions.

Core Features & Use Cases

  • Convert Mermaid definitions into SVG, PNG, or PDF diagrams from the CLI.
  • Support input from files or standard input, with configurable theme, size, and style options.
  • Integrate into automation scripts and CI pipelines to produce ready-to-share diagrams.

Quick Start

Run the mermaid CLI to convert a Mermaid definition into image outputs by specifying an input file and an output path.

Frequently Asked Questions about mermaid-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I render Mermaid diagrams to SVG or PNG from the command line?

You can render Mermaid diagrams to SVG or PNG from the command line by using the mmdc command with a specified input file and output path, requiring @mermaid-js/mermaid-cli as a devDependency.

Can I convert Mermaid definitions to PDF in CLI workflows?

Yes, you can convert Mermaid definitions to PDF in CLI workflows by running the mmdc command and specifying PDF as the output file format.

Does the Mermaid CLI support input from standard input for automation scripts?

Yes, the Mermaid CLI supports input from standard input, allowing you to integrate diagram generation directly into automation scripts and CI pipelines.

How do I configure the theme and size when generating Mermaid diagram outputs?

You can configure the theme and size of generated Mermaid diagram outputs by passing configuration options such as theme and config to the mmdc command during rendering.

Do I need to install any dependencies to convert Mermaid to image files?

Yes, you must install @mermaid-js/mermaid-cli as a devDependency in your project to convert Mermaid definitions to image files from the command line.

What is the best way to automate Mermaid diagram generation in CI pipelines?

The best way to automate Mermaid diagram generation in CI pipelines is using the CLI to render definitions from files or stdin into SVG, PNG, or PDF outputs with configurable options.