By LarchLiu
Convert Markdown to PDF, DOCX, HTML, or images with built-in diagram support (Mermaid, Graphviz, node-based, infographics, Vega-Lite).
Create spatial node-based diagrams with free positioning. Best for mind maps, knowledge graphs, concept maps, and planning boards where precise spatial layout matters. Use JSON format with x/y coordinates. NOT for sequential flows (use mermaid) or data charts (use vega).
Create complex directed/undirected graphs with precise layout control. Best for dependency trees, org charts, network topologies, and module relationships. Use when you need fine-grained edge routing or hierarchical layouts with many levels. NOT for simple flowcharts (use mermaid) or data charts (use vega).
Create beautiful infographics with pre-designed templates. Best for KPI cards, timelines, roadmaps, step-by-step processes, A vs B comparisons, SWOT analysis, funnels, org trees, pie/bar charts. Use when you need quick visual impact with 4-8 items. Simple YAML-like syntax. NOT for complex data analysis (use vega) or technical flowcharts (use mermaid).
Convert Markdown files to PDF, DOCX, HTML, or full-page images (png/jpg/webp). Use `npx md2x <input.md> -f <docx|pdf|html|png|jpg|jpeg|webp> [options]`.
Create flowcharts, sequence diagrams, state machines, class diagrams, Gantt charts, mindmaps, and more. Best for process flows, API interactions, system architecture, and technical documentation. NOT for data-driven charts (use vega) or quick KPI visuals (use infographic).
Based on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
![]()
pdf, docx, html, png, jpg/jpeg, webpskills/md2x/SKILL.md for repeatable conversions/workflowsmd2x blocks with Vue SFC (.vue) and Svelte 5 (.svelte) templates (plus plain HTML)Export to PDF:
npx md2x input.md
Export to DOCX:
npx md2x input.md -f docx
Export to HTML:
npx md2x input.md -f html
Export to PNG:
npx md2x input.md -f png -o output.png
List themes:
npx md2x --list-themes
Use a theme:
npx md2x input.md -o output.pdf --theme academic
Help:
npx md2x -h
| Option | Alias | Description | Default | Values |
|---|---|---|---|---|
--help | -h | Show help message | - | - |
--version | -v | Show version number | - | - |
--output | -o | Output file path | Input name with format extension | File path |
--format | -f | Output format | pdf | pdf, docx, html, png, jpg/jpeg, webp |
--theme | -t | Theme name | default | See --list-themes |
--diagram-mode | - | HTML/Image diagram rendering mode | live | img, live, none |
--hr-page-break | - | Convert horizontal rules to page breaks | true for PDF/DOCX, false for HTML/Image | true, false |
--templates-dir | - | Extra template dir for md2x blocks (repeatable; resolved against input dir when relative) | - | Directory path |
--list-themes | - | List all available themes | - | - |
live (default): Render diagrams in the browser on load using online CDN scripts (Mermaid, @viz-js/viz, Vega-Lite, Infographic)img: Pre-render diagrams as embedded images (offline, stable; no CDN)none: Keep diagram source blocks only (no rendering)When converting a markdown file, you can put options in YAML front matter (the CLI merges front matter with CLI flags; explicit CLI flags win).
---
format: pdf # pdf | docx | html | png | jpg | jpeg | webp
theme: default
hrAsPageBreak: true
---
---
format: pdf
title: "My Doc" # used for PDF metadata/header templates
pdf:
format: A4 # A4 | Letter | Legal | A3 | A5
landscape: false
margin:
top: 1cm
bottom: 1cm
left: 1cm
right: 1cm
printBackground: true
scale: 1
displayHeaderFooter: false
headerTemplate: "<div style='font-size:10px;width:100%;text-align:center;'><span class='title'></span></div>"
footerTemplate: "<div style='font-size:10px;width:100%;text-align:center;'>Page <span class='pageNumber'></span> / <span class='totalPages'></span></div>"
---
---
format: docx
theme: default
hrAsPageBreak: true
---
---
format: html
title: "My Doc"
standalone: true # full HTML document (default)
baseTag: true # emit <base href="file://.../"> for resolving relative paths (default)
diagramMode: live # img | live | none
cdn: # optional: override CDN URLs (used when diagramMode: live)
mermaid: "https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"
# Template blocks:
vue: "https://unpkg.com/vue@3/dist/vue.global.js"
vueSfcLoader: "https://cdn.jsdelivr.net/npm/vue3-sfc-loader/dist/vue3-sfc-loader.js"
svelteCompiler: "https://esm.sh/svelte@5/compiler"
svelteBase: "https://esm.sh/svelte@5/"
---
---
format: png
diagramMode: live # or "img" for offline (no CDN)
image:
# selector can be a string or an array of selectors (CSS selector list).
selector:
- 'div.md2x-diagram[data-md2x-diagram-kind="mermaid"]'
- 'div.md2x-diagram[data-md2x-diagram-kind="infographic"]'
# selectorMode: first | each | union | stitch (default: stitch)
# - union: capture the union bounding box (includes in-between page content)
# - stitch: stack matched elements and capture only them (no in-between content)
selectorMode: stitch
selectorGap: 16 # optional: vertical gap (px) between stitched elements
selectorPadding: 8 # optional: padding (px) around the stitched region
split: auto # optional: split very tall output into multiple images
---
When image.split produces multiple parts, outputs are written as output.part-001.png, output.part-002.png, ...
Diagram blocks are tagged with data-md2x-diagram-kind so you can target specific types via selectors:
npx claudepluginhub larchliu/md2x --plugin md2xIntegrates Claude Code with the Eggs animated desktop companion. Shows real-time notifications for user prompts, tool usage, permissions, and agent responses as interactive bubbles on your desktop pet.
Cyberpunk motorcycle racing game for Claude Code using Three.js, MediaPipe Hands, and a native macOS WKWebView host
Gesture-controlled Pong for Claude Code using MediaPipe Hands, three.js, and a native macOS WKWebView host
AI fitness coach – real-time pose scoring with MediaPipe PoseLandmarker via native macOS WKWebView
Gesture-based confirmation for Claude Code — OK gesture/fist for allow/deny, finger count 1-5 for option selection via MediaPipe hand tracking and native WKWebView host
Transform Markdown text to DOCX, PPTX, XLSX, PDF, PNG, HTML, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash, JS and etc files.
Documentation suite plugin that exposes document conversion, Mermaid diagram generation, PDF/PPT/DOCX creation, and documentation cleanup skills under one shared namespace
Convert any file, URL, or media to clean Markdown — PDF, EPUB, HTML, images, YouTube, audio, video, and more
在 Windows + Microsoft Word 流水线中把 Markdown 稳定导出为 Word,支持模板复用、图片、表格、Mermaid 和 Office Math 后处理。
Generate natively editable PPTX from PDF / DOCX / URL / Markdown — real DrawingML shapes, text boxes, charts, and animations. Note: this plugin ships only the skill files; you must also `pip install -r requirements.txt` from the project root for the Python post-processing scripts to run.
Vercel skill for streaming and markdown processing. Useful for handling large document transformations and real-time content processing.