← Browse

@miantiao-me/bmmd

B

更好用的 Markdown 排版助手|微信公众号专门适配,支持输出到网页与图片。

mcp_servermcp

Install

agr install @miantiao-me/bmmd --target claude

This artifact does not publish files for Claude.

Document

{ "name": "bmmd", "type": "module", "version": "0.2.0", "private": false, "packageManager": "pnpm@11.11.0", "description": "Markdown 排版 CLI,支持微信公众号与 HTML 输出。", "license": "AGPL-3.0-only", "homepage": "https://github.com/miantiao-me/bm.md#readme", "repository": { "type": "git", "url": "git+https://github.com/miantiao-me/bm.md.git" }, "bugs": { "url": "https://github.com/miantiao-me/bm.md/issues" }, "keywords": [ "markdown", "cli", "wechat", "formatter" ], "bin": { "bmmd": "bin/bmmd.mjs" }, "files": [ "bin" ], "engines": { "node": ">=20" }, "publishConfig": { "registry": "https://registry.npmjs.org/", "access": "public" }, "scripts": { "dev": "vite dev --port 2663", "prebuild": "pnpm openapi:generate ", "build": "vite build", "build:cli": "tsdown --config tsdown.cli.config.ts", "openapi:generate": "tsx scripts/generate-openapi.ts", "preview": "vite preview", "prepack": "pnpm build:cli", "test": "vitest run", "lint": "eslint", "lint:fix": "eslint --fix", "typecheck": "tsc --noEmit", "shadcn": "shadcn", "prepare": "simple-git-hooks", "doctor": "npx react-doctor@latest" }, "devDependencies": { "@antfu/eslint-config": "^9.1.0", "@antv/infographic": "^0.2.19", "@base-ui/react": "^1.6.0", "@catppuccin/highlightjs": "^1.0.1", "@codemirror/commands": "^6.10.4", "@codemirror/lang-markdown": "^6.5.0", "@codemirror/language": "^6.12.4", "@codemirror/language-data": "^6.5.2", "@codemirror/state": "^6.7.1", "@codemirror/view": "^6.43.6", "@eslint-react/eslint-plugin": "^5.14.1", "@lezer/highlight": "^1.2.3", "@modelcontextprotocol/sdk": "^1.29.0", "@orpc/client": "^1.14.7", "@orpc/openapi": "^1.14.7", "@orpc/server": "^1.14.7", "@orpc/zod": "^1.14.7", "@rolldown/plugin-babel": "^0.2.3", "@shadcn/react": "^0.2.1", "@tailwindcss/typography": "^0.5.20", "@tailwindcss/vite": "^4.3.2", "@tanstack/devtools-vite": "^0.8.1", "@tanstack/react-devtools": "^0.10.8", "@tanstack/react-router": "^1.170.17", "@tanstack/react-router-devtools": "^1.167.0", "@tanstack/react-start": "^1.168.27", "@tsdown/css": "^0.22.4", "@types/file-saver": "^2.0.7", "@types/hast": "^3.0.5", "@types/mdast": "^4.0.4", "@types/node": "^26.1.1", "@types/react": "^19.2.17", "@types/react-dom": "^19.2.3", "@uiw/codemirror-themes": "^4.25.11", "@uiw/react-codemirror": "^4.25.11", "@vitejs/plugin-react": "^6.0.3", "@zumer/snapdom": "^2.15.0", "aws4fetch": "^1.0.20", "babel-plugin-react-compiler": "^1.0.0", "beautiful-mermaid": "^1.1.3", "cac": "^7.0.0", "class-variance-authority": "^0.7.1", "clipboard-polyfill": "^4.1.1", "clsx": "^2.1.1", "cmdk": "^1.1.1", "embla-carousel-react": "^8.6.0", "es-toolkit": "^1.49.0", "eslint": "^10.7.0", "eslint-plugin-better-tailwindcss": "^4.6.1", "eslint-plugin-format": "^2.0.1", "eslint-plugin-react-hooks": "^7.1.1", "eslint-plugin-react-refresh": "^0.5.3", "fake-indexeddb": "^6.2.5", "file-saver": "^2.0.5", "highlight.js": "^11.11.1", "idb": "^8.0.3", "input-otp": "^1.4.2", "jspdf": "^4.2.1", "juice": "^12.1.1", "katex": "^0.17.0", "lightningcss": "^1.32.0", "lint-staged": "^17.0.8", "lucide-react": "^1.24.0", "markdownlint": "^0.41.0", "mcp-config": "github:iannuttall/mcp-config", "mdast-util-from-markdown": "^2.0.3", "mdast-util-gfm": "^3.1.0", "micromark-extension-gfm": "^3.0.0", "morphdom": "^2.7.8", "motion": "^12.42.2", "next-themes": "^0.4.6", "nitro": "3.0.260610-beta", "ofetch": "^1.5.1", "react": "^19.2.7", "react-day-picker": "^10.0.1", "react-dom": "^19.2.7", "react-resizable-panels": "^4.12.1", "recharts": "^3.9.2", "rehype-external-links": "^3.0.0", "rehype-github-alert": "^1.0.0", "rehype-highlight": "^7.0.2", "rehype-katex": "^7.0.1", "rehype-parse": "^9.0.1", "rehype-raw": "^7.0.0", "rehype-remark": "^10.0.1", "rehype-sanitize": "^6.0.0", "rehype-stringify": "^10.0.1", "remark-frontmatter": "^5.0.0", "remark-gfm": "^4.0.1", "remark-math": "^6.0.0", "remark-parse": "^11.0.0", "remark-rehype": "^11.1.2", "remark-retext": "^6.0.1", "remark-stringify": "^11.0.0", "retext-english": "^5.0.0", "retext-stringify": "^4.0.0", "shadcn": "^4.13.0", "simple-git-hooks": "^2.13.1", "smol-toml": "^1.7.0", "sonner": "^2.0.7", "std-env": "^4.1.0", "tailwind-merge": "^3.6.0", "tailwindcss": "^4.3.2", "tsdown": "^0.22.4", "tsx": "^4.23.0", "tw-animate-css": "^1.4.0", "typescript": "^5.9.3", "unified": "^11.0.5", "unist-util-visit": "^5.1.0", "vaul": "^1.1.2", "vite": "^8.1.4", "vite-plugin-pwa": "^1.3.0", "vitest": "^4.1.10", "workbox-core": "^7.4.1", "workbox-expiration": "^7.4.1", "workbox-precaching": "^7.4.1", "workbox-routing": "^7.4.1", "workbox-strategies": "^7.4.1", "workbox-window": "^7.4.1", "wrangler": "^4.110.0", "yaml": "^2.9.0", "zod": "^4.4.3", "zustand": "^5.0.14" }, "overrides": { "glob": "11.1.0", "serialize-javascript": "7.0.5", "workbox-build": "7.4.1" }, "simple-git-hooks": { "pre-commit": "pnpm lint-staged" }, "lint-staged": { "*": "eslint --fix" } }

Repository README

Describes miantiao-me/bm.md as a whole, which may contain artifacts other than this one. Where this artifact had no useful description of its own, its summary was taken from here.

bm.md

更好用的 Markdown 排版助手|微信公众号专门适配,支持输出到网页与图片。


✨ 特性

  • 📝 实时预览 - 基于 CodeMirror 6 的 Markdown 编辑器,所见即所得
  • 🎨 15 种排版样式 - 从专业商务到复古怀旧,满足不同场景需求
  • 🌈 14 种代码主题 - 支持浅色/深色多种代码高亮风格
  • 📱 平台适配 - 微信公众号专门适配,同时支持通用 HTML 输出
  • 📊 图表与信息图 - 支持 Mermaid 与 AntV Infographic
  • 🖼️ 图片导出 - 下载 JPEG 或复制 PNG 图片
  • 📄 PDF 与打印 - 支持高质量分页 PDF 导出和直接打印
  • 🌓 明暗模式 - 支持浅色、深色界面切换
  • 🔌 开发者友好 - 提供 CLI、REST API 和 MCP 协议集成
  • ⌨️ 快捷操作 - 命令面板 + 全局快捷键,高效操作

🚀 快速开始

# 克隆项目
git clone https://github.com/miantiao-me/bm.md.git
cd bm.md

# 安装依赖
pnpm install

# 启动开发服务器
pnpm dev

访问 http://localhost:2663 开始使用。

CLI 使用

bmmd 可在命令行中复用核心 Markdown 处理能力,支持文件输入或 stdin,默认输出到 stdout。安装后直接使用 bmmd;未安装时可通过 pnpm dlx bmmd 临时运行。

# 全局安装后运行
pnpm add -g bmmd
bmmd render article.md --platform wechat --output article.html

# 临时运行,无需安装
pnpm dlx bmmd render article.md --platform wechat --output article.html

# 管道输入
cat article.md | bmmd extract

# 修复 Markdown 并写回源文件
bmmd lint article.md --fix

本地开发可执行 pnpm build:cli 构建 CLI,入口文件为 bin/bmmd.mjs

🛠️ 技术栈

阿里云部署配置:

安装命令: pnpm install
构建命令: pnpm run build
根目录: /
静态资源目录: dist/client
函数文件路径: dist/server/server.js

腾讯云 EdgeOne 部署配置:

框架预设: Other
根目录: ./
输出目录: .edgeone
编译命令: pnpm run build
安装命令: pnpm install

EdgeOne 构建环境由 std-env 自动识别,Nitro 会自动选择官方 preset。

其他环境部署配置参考 Nitro 文档。

📖 文档

🙏 致谢

  • Kami — 「Kami」排版风格的灵感来源。

🤝 贡献

欢迎提交 Issue 和 Pull Request。

📄 许可证

AGPL-3.0

Trustgrade B

  • passBody integrity

    Whether the stored document is plausibly the kind of file the artifact declares, rather than something fetched by mistake.

  • warnType matchbest-effort: server code not analyzed

    Whether the artifact is really the kind of thing its metadata claims it is.

  • passFreshness

    How long since the source repository was last pushed to.

  • passPrompt injection

    Scans the artifact's own text for instructions aimed at your agent rather than at you.

  • warnLicensecopyleft/unknown — index-and-link only

    Whether the source repository declares an SPDX license permissive enough to redistribute.

How the grade is calculated

Each check contributes 0 points when it passes, 1 when it warns, and 2 when it fails. The total maps to a letter:

  • Aevery check passed
  • Bone warning
  • Ctwo warnings
  • Dprompt injection or body integrity failed, or three warnings
  • Fone of those failed, and something else is wrong

These are automated hygiene checks, not a security audit, and not a dependency or vulnerability scan. A grade of A means nothing was flagged — not that the artifact is safe.

Versions

  • git-8a0d4f8c88d92026-08-06