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

@lekman/mmd

v1.3.2

Published

Mermaid diagram management CLI — extract, render, and inject themed SVGs into Markdown

Readme

Mermaid Diagram Management

VS Code Marketplace npm version codecov

Extract, render, and inject themed SVGs into Markdown. Diagrams render correctly on GitHub, VS Code, Confluence, and Word exports — no <div> wrappers needed.

Installation

VS Code Extension (recommended)

Install from the VS Code Marketplace. Provides CodeLens actions, on-save sync, and command palette integration.

CLI (terminal, CI pipelines, AI agents)

Requires Bun runtime.

bunx @lekman/mmd sync            # run directly
bun add -g @lekman/mmd           # or install globally

AI Coding Assistant Rules

Installs rules for Claude Code, Cursor, and GitHub Copilot. Committed to the repo so all contributors benefit.

bunx @lekman/mmd init            # auto-detect and install
bunx @lekman/mmd init --all      # install all rule files

Quick Start

VS Code

  1. Add a mermaid fenced block to any .md file
  2. Click "Convert to SVG" on the CodeLens above the block
  3. The block is extracted, rendered to a self-styled SVG, and replaced with an image tag
  4. Edit the .mmd source file — SVGs re-render on save automatically

CLI / AI Agents

bunx @lekman/mmd convert README.md     # convert blocks in a file
bunx @lekman/mmd sync                  # sync all .md files
bunx @lekman/mmd render --force        # re-render after editing .mmd

Commands

| Command | Description | | ------- | ----------- | | mmd convert <file> | Convert mermaid blocks to SVG references | | mmd sync [files...] | Extract + render + inject (use --force to re-render all) | | mmd render [files...] | Render stale .mmd to .svg | | mmd extract [files...] | Extract fenced blocks to .mmd files | | mmd inject [files...] | Update anchor comments with image tags | | mmd check [files...] | Lint for orphaned inline mermaid blocks | | mmd config | Write default .mermaid.json | | mmd init | Install AI assistant rules (--all, --claude, --cursor, --copilot) |

Configuration

Place a .mermaid.json in your repository root:

{
  "outputDir": "docs/mmd",
  "mode": "light",
  "renderWidth": 1200,
  "svgStyle": {
    "background": "#ffffff",
    "borderColor": "#cccccc",
    "borderRadius": 10,
    "padding": 20
  }
}

Run mmd config to generate a full config with light and dark themes matching GitHub's color palettes.

| Field | Description | | ----- | ----------- | | outputDir | Directory for .mmd and .svg files | | mode | "light" or "dark" theme selection | | renderWidth | Puppeteer viewport width for mmdc (default: 1200) | | svgStyle | Background, border, corner radius, padding baked into SVGs | | themes | Light and dark Mermaid theme variables | | renderer | Primary renderer (beautiful-mermaid) | | fallbackRenderer | Fallback for unsupported types (mmdc) |

Renderer Support

| Renderer | Diagram Types | | -------- | ------------- | | beautiful-mermaid | flowchart, state | | mmdc (fallback) | sequence, class, ER, C4, gantt, pie, gitgraph, mindmap, timeline, quadrant, kanban, requirement, architecture |

Install mmdc for non-flowchart/state diagrams: npm install -g @mermaid-js/mermaid-cli

Documentation

| Document | Audience | | -------- | -------- | | Architecture | C4 diagrams, Clean Architecture layers, data flow | | Contributing | Dev setup, task commands, CI/CD, release process | | Quality Assurance | TDD workflow, coverage targets, test strategy | | Security | Vulnerability reporting, threat model | | Changelog | Release history | | Examples | .mmd files for all 15 supported diagram types |

License

MIT