Turn Markdown into beautiful shareable cards — from your terminal. Zero dependencies.
把 Markdown 一键变成精美的分享卡片(SVG),专为社交媒体、公众号、README 展示设计。零依赖,装完即用。
npx mdcard-cli note.md --theme gradient --footer "@yourname"- 🎨 3 themes:
light/dark/gradient - 🇨🇳 First-class CJK support — 中文排版不错行、不截断
- 📦 Zero dependencies — 零依赖,安全、快
- 🖼️ Markdown subset: headings, bold/italic/inline-code, links, lists, quotes, code blocks
- 🏷️ Window title bar + footer watermark (your handle)
npm install -g mdcard-cli
# or run once
npx mdcard-cli README.md -o card.svg --theme darkmdcard <input.md> [-o out.svg] [--theme light|dark|gradient] [--title "..."] [--footer "..."]
| Option | Description |
|---|---|
-o, --output |
Output SVG path (default: <input>.svg) |
-t, --theme |
light (default), dark, gradient |
--title |
Title in the window bar |
--footer |
Footer text, e.g. your GitHub/Twitter handle |
# Why I built mdcard
Sharing code snippets on social media
shouldn't require a screenshot editor.
- Zero dependencies
- CJK-friendly wrapping
- Beautiful by defaultSVG 无损缩放,可直接贴到公众号、Twitter、小红书;需要 PNG 时用任何 SVG→PNG 工具转换。
- PNG output (built-in, no native deps)
- More themes + custom colors
- GitHub Action: auto-generate README social cards
If mdcard saves you time, consider sponsoring: 如果这个工具对你有用,欢迎赞助支持,也可以在 README 里挂上你的作品:
- GitHub Sponsors — see
.github/FUNDING.ymlafter you fork
MIT