Skip to content
Back to search

md2wechat-lite

📝 md2wechat Lite | 轻量版微信公众号 Markdown 排版 CLI,免费开源

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/geekjourneyx--md2wechat-lite/badge.svg)](/listings/geekjourneyx--md2wechat-lite)

HTML

<a href="/listings/geekjourneyx--md2wechat-lite"><img src="/api/listings/geekjourneyx--md2wechat-lite/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

curl -fsSL https://raw.githubusercontent.com/geekjourneyx/md2wechat-lite/main/cli/scripts/install.sh | sh

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 217 lines · 1 finding marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # md2wechat-lite
  2. <div align="center">
  3. **AI Agent 自动排版公众号 —— Markdown 转微信排版 CLI 工具**
  4. 打通公众号创作的最后一公里
  5. [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
  6. [![GitHub Release](https://img.shields.io/github/v/release/geekjourneyx/md2wechat-lite)](https://github.com/geekjourneyx/md2wechat-lite/releases)
  7. **像发朋友圈一样简单,用 Markdown 写公众号文章**
  8. md2wx CLI · [38+ 精美主题](https://md2wechat.app/theme-gallery) · 支持 [Claude Code](https://claude.ai/code) / [OpenClaw](https://openclaw.ai)
  9. </div>
  10. ---
  11. ## 前置准备
  12. 使用前请先获取 API Key:
  13. - [获取 API Key](https://md2wechat.app/api-docs)
  14. - [主题预览](https://md2wechat.app/theme-gallery)
  15. 图片参数约束(重要):
  16. - `--cover-image`、`newspic-draft --images`、`batch-upload --images` 仅支持公网 URL
  17. - 不支持本地文件路径(如 `./a.jpg`)或通配符(如 `*.jpg`)
  18. ---
  19. ## 快速开始
  20. ### 安装
  21. ```bash
  22. curl -fsSL https://raw.githubusercontent.com/geekjourneyx/md2wechat-lite/main/cli/scripts/install.sh | sh
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 39 on GitHub
  23. ```
  24. ### 配置
  25. ```bash
  26. md2wx config set wechat-appid "wx123..."
  27. md2wx config set wechat-appsecret "your_secret"
  28. md2wx config set api-key "wme_your_api_key"
  29. ```
  30. ### 第一个草稿
  31. ```bash
  32. md2wx article-draft --markdown "# 欢迎\n\n这是我的第一篇文章!" --cover-image "https://cdn.example.com/cover.jpg"
  33. ```
  34. ---
  35. ## 功能亮点
  36. ### 📝 图文草稿
  37. Markdown 转 WeChat 排版,一键生成草稿
  38. ```bash
  39. md2wx article-draft --file article.md --theme bytedance --cover-image "https://cdn.example.com/cover.jpg"
  40. ```
  41. 说明:部分后端场景会要求封面图,建议始终传入 `--cover-image`,避免 `invalid media_id` 等错误。
  42. ### 🖼️ 小绿书草稿
  43. 创建图片文章,支持多图上传
  44. ```bash
  45. md2wx newspic-draft --title "标题" --content "内容" --images "https://cdn.example.com/img1.jpg,https://cdn.example.com/img2.png"
  46. ```
  47. ### 📦 批量上传
  48. 上传图片到微信素材库,获取永久 URL
  49. ```bash
  50. md2wx batch-upload --images "https://cdn.example.com/a.jpg,https://cdn.example.com/b.jpg"
  51. ```
  52. ### 🎨 38+ 主题
  53. - **内置 6 种**:default, bytedance, chinese, apple, sports, cyber
  54. - **模板 32 种**:{minimal|focus|elegant|bold} × {gold|green|blue|orange|red|navy|gray|sky}
  55. ```bash
  56. md2wx themes list --verbose
  57. ```
  58. ---
  59. ## AI 创作工作流
  60. ### Claude Code
  61. 配合 [md2wechat-skill](https://github.com/geekjourneyx/md2wechat-skill) 使用:
  62. ```
  63. 1. 在 Claude Code 中激活 Skill
  64. 2. "帮我写一篇关于 AI 的文章"
  65. 3. "发布到公众号草稿箱"
  66. ```
  67. ### OpenClaw
  68. 支持 OpenClaw 自动化工作流
  69. ---
  70. ## 配置说明
  71. 配置文件:`~/.md2wx/config.yaml`(文件内容为 `key=value` 形式)
  72. **配置优先级**:命令行参数 > 环境变量 > 配置文件 > 默认值
  73. ```bash
  74. # 查看配置
  75. md2wx config list
  76. # 设置默认主题
  77. md2wx config set default-theme "bytedance"
  78. # 设置字体大小
  79. md2wx config set font-size "large"
  80. ```
  81. ---
  82. ## 常见问题
  83. <details>
  84. <summary>安装后提示 command not found?</summary>
  85. 将二进制文件目录添加到 PATH,或打开新终端窗口
  86. </details>
  87. <details>
  88. <summary>macOS 无法验证开发者?</summary>
  89. ```bash
  90. chmod +x md2wx
  91. xattr -d com.apple.quarantine md2wx
  92. ```
  93. </details>
  94. <details>
  95. <summary>草稿创建成功但后台找不到?</summary>
  96. 检查 AppID/AppSecret 是否正确,确认登录了对应公众号账号
  97. </details>
  98. <details>
  99. <summary>报错 invalid media_id 或创建草稿失败?</summary>
  100. 先确认封面图/配图使用的是公网可访问 URL(不是本地路径),并在 `article-draft` 中传入 `--cover-image`。
  101. </details>
  102. ---
  103. ## 开发
  104. ```bash
  105. git clone https://github.com/geekjourneyx/md2wechat-lite.git
  106. cd md2wechat-lite
  107. go build -o md2wx ./cli
  108. ```
  109. ---
  110. ## 相关项目
  111. - [md2wechat-skill](https://github.com/geekjourneyx/md2wechat-skill) - 用 Markdown 写公众号文章,像发朋友圈一样简单
  112. ---
  113. ## License
  114. [MIT License](LICENSE)
  115. ---
  116. ## 💰 打赏 Buy Me A Coffee
  117. 如果该项目帮助了您,请作者喝杯咖啡吧 ☕️
  118. ### WeChat
  119. <img src="https://raw.githubusercontent.com/geekjourneyx/awesome-developer-go-sail/main/docs/assets/wechat-reward-code.jpg" alt="微信打赏码" width="200" />
  120. ---
  121. ## 🧑‍💻 作者
  122. - **作者**:[geekjourneyx](https://geekjourney.dev)
  123. - **X (Twitter)**:https://x.com/seekjourney
  124. - **公众号**:极客杰尼
  125. 关注公众号,获取更多 AI 编程、AI 工具与 AI 出海建站的实战分享:
  126. <p align="center">
  127. <img src="https://raw.githubusercontent.com/geekjourneyx/awesome-developer-go-sail/main/docs/assets/qrcode.jpg" alt="公众号:极客杰尼" width="180" />
  128. </p>
  129. ---
  130. <div align="center">
  131. **让公众号写作更简单** ⭐
  132. Made with ❤️ by [geekjourneyx](https://geekjourney.dev)
  133. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.