Introduction

When DSH Agent delivers documents, it often needs to convert Markdown into editable Word documents. Manually handling Chinese typesetting, Mermaid diagram screenshots, or LaTeX formula entry is inefficient. bruce-md2word is a plugin that provides local conversion capabilities, delivering Markdown directly as standard Word documents.

Overview

Name: bruce-md2word
One-line introduction: A Markdown-to-Word tool for AI Agents: Chinese typesetting, Mermaid diagrams to images, editable mathematical formulas.
Owner: bruc3van
Category: Workflow
Star Count: 3
License: MIT

Core Features

  1. Chinese typesetting: Supports A4 pages, uses SimSun/SimHei for body text, and automatically handles headings, lists, and tables.
  2. Mermaid diagrams to images: Supports flowcharts, sequence diagrams, state diagrams, ER diagrams, and more, renders diagrams as images and embeds them in Word, with support for Chinese labels.
  3. LaTeX math to native Word equations: Supports fractions, radicals, matrices, and more, and the converted equations can remain editable in Word.

Installation and Activation

Install the DSH plugin bruce-md2word from npm:

npm install bruce-md2word

After installation, the Agent can call it directly via the word_export tool.

Usage

Three usage methods are provided:

  1. DSH plugin: Invoke it via the word_export tool.
  2. Standalone CLI: After installing the global CLI, export using the command line.
  3. Skill: An independent skill file for Agents with command execution capabilities.

Runtime Environment and Dependencies

  • Node.js version: Requires 24 or 26.
  • Chinese fonts: Chinese fonts must be installed to render diagrams.
  • Runtime behavior: Local conversion; does not upload documents and does not call LLM APIs.

Applicable Scenarios and Notes

  • Use cases: Structured documents such as project reports, implementation plans, meeting minutes, and technical notes.
  • Strict mode: Use the --strict parameter to reject saving documents with degraded content.
  • Security: The conversion process is completed locally, without uploading files or using API keys.

Conclusion

bruce-md2word solves formatting and formula challenges when Agents deliver documents through local parsing and rendering. For more details, visit GitHub or the catalog page.