npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mxe

v2.1.3

Published

Markdown Export Tool - Convert Markdown to PDF/DOCX/HTML with Mermaid, TOC, and bookmarks support

Readme

MXE - Markdown Export Tool 📄

A powerful CLI for converting Markdown to PDF, DOCX, and HTML with diagrams, syntax highlighting, and custom fonts.

Features

  • 📄 Multiple formats: PDF, DOCX, HTML, Clipboard
  • 🎨 Mermaid v11.12: 18+ diagram types with ELK layout
  • 📊 WaveDrom: Digital timing diagrams, register definitions
  • ✏️ Hand-drawn style: Sketch-like diagrams
  • 🔤 Custom fonts: Inter, Roboto, Fira Code, JetBrains Mono, and more
  • 🌈 Syntax highlighting: GitHub-style code blocks
  • 📑 Table of Contents: Auto-generated TOC
  • 🔖 PDF Bookmarks: Navigate large documents
  • 🌐 URL support: Download web articles as Markdown
  • 🖼️ Image embedding: Local images embedded in output

Installation

npm install -g mxe

That's it! No additional dependencies required. MXE uses Puppeteer to render diagrams server-side.

Usage

mxe <input> [options]

Basic Examples

# Convert to PDF (default)
mxe document.md

# With table of contents
mxe document.md --toc

# Convert to DOCX
mxe document.md -f docx

# Convert to HTML
mxe document.md -f html

# Download URL and convert
mxe https://example.com/article -f pdf

Advanced Examples

# Full-featured PDF with custom fonts
mxe document.md --toc --font roboto --mono-font fira-code

# Hand-drawn Mermaid diagrams
mxe document.md --hand-draw --mermaid-theme forest

# Custom output path
mxe document.md -o ./output/my-doc.pdf

# With custom CSS
mxe document.md -s custom.css

Options

| Option | Description | |--------|-------------| | -f, --format <type> | Output format: pdf, docx, html, clipboard | | -o, --output <path> | Output file path | | -s, --style <file> | Custom CSS file | | --toc | Generate table of contents | | --toc-depth <n> | TOC heading depth (default: 3) | | --no-bookmarks | Disable PDF bookmarks |

Font Options

| Option | Description | |--------|-------------| | --font <family> | Body font family | | --mono-font <family> | Code font family |

Available fonts:

| Font | Type | Description | |------|------|-------------| | inter | Sans | Modern, readable (default) | | roboto | Sans | Google's clean font | | lato | Sans | Friendly, warm | | opensans | Sans | Neutral, legible | | source-sans | Sans | Adobe's UI font | | merriweather | Serif | Elegant reading | | jetbrains-mono | Mono | Developer favorite (default) | | fira-code | Mono | Ligatures support | | source-code | Mono | Adobe's code font |

Diagram Options

| Option | Description | |--------|-------------| | --mermaid-theme <theme> | Theme: default, forest, dark, neutral, base | | --mermaid-layout <layout> | Layout: elk (default), dagre | | --hand-draw | Hand-drawn/sketch style |

Supported Diagrams

Mermaid (v11.12)

MXE supports all 18+ Mermaid diagram types:

| Diagram | Description | |---------|-------------| | Flowchart | Process flows, decision trees | | Sequence | Interaction between components | | Class | Object-oriented design | | State | State machines | | ER Diagram | Database relationships | | Gantt | Project timelines | | Pie Chart | Data distribution | | Git Graph | Branch visualization | | Mindmap | Hierarchical ideas | | Timeline | Historical events | | Quadrant | Priority matrices | | Sankey | Flow quantities | | XY Chart | Bar/line charts | | Block | Block diagrams | | Requirement | Requirements tracing | | User Journey | User experience flows | | C4 | Software architecture | | ZenUML | Sequence (alternative) |

WaveDrom

Digital timing diagrams and register definitions for hardware documentation.

Examples

Flowchart with ELK Layout

```mermaid
flowchart TB
    A[Input] --> B{Process}
    B -->|Yes| C[Output 1]
    B -->|No| D[Output 2]
```

Sequence Diagram

```mermaid
sequenceDiagram
    autonumber
    Alice->>Bob: Hello
    Bob-->>Alice: Hi there!
```

Mindmap

```mermaid
mindmap
    root((Project))
        Planning
        Development
        Testing
        Deployment
```

WaveDrom Timing

```wavedrom
{
  "signal": [
    { "name": "clk", "wave": "P........" },
    { "name": "data", "wave": "x.345678x", "data": ["D0", "D1", "D2", "D3", "D4", "D5"] },
    { "name": "enable", "wave": "0.1.....0" }
  ]
}
```

WaveDrom Register

```wavedrom
{
  "reg": [
    { "name": "DATA", "bits": 8, "attr": "RW" },
    { "name": "STATUS", "bits": 4, "attr": "RO" },
    { "name": "reserved", "bits": 4, "type": 1 }
  ]
}
```

Code Block

```typescript
const greet = (name: string): void => {
  console.log(`Hello, ${name}!`);
};
```

AI Tools Integration

MXE is designed to work seamlessly with AI assistants:

  • Convert AI-generated content to professional PDFs
  • Download research articles for AI processing
  • Maintain documentation in Markdown format
  • Export to various formats on demand

Changelog

v2.1.2

  • Default to ELK layout for Mermaid diagrams
  • Better automatic node positioning

v2.1.0

  • Added WaveDrom support (timing diagrams, registers)
  • Inline SVG rendering (no external dependencies)

v2.0.0

  • Mermaid v11.12 with all diagram types
  • Custom font support
  • PDF bookmarks and TOC
  • Hand-drawn diagram style

License

ISC