md2wechat-lite
3
总安装量
1
周安装量
#62274
全站排名
安装命令
npx skills add https://github.com/geekjourneyx/md2wechat-lite --skill md2wechat-lite
Agent 安装分布
amp
1
cline
1
opencode
1
cursor
1
kimi-cli
1
codex
1
Skill 文档
md2wx – Markdown to WeChat
CLI tool for converting Markdown to WeChat Official Account formatted drafts.
Quick start
Install:
curl -fsSL https://raw.githubusercontent.com/geekjourneyx/md2wechat-lite/main/cli/scripts/install.sh | sh
Configure credentials:
md2wx config set wechat-appid "wx123..."
md2wx config set wechat-appsecret "your_secret"
md2wx config set api-key "wme_your_key"
Commands
| Command | Purpose |
|---|---|
article-draft |
Create article draft from Markdown |
newspic-draft |
Create Xiaolvshu (image card) draft |
batch-upload |
Upload images to WeChat CDN |
themes list |
List available themes |
config |
Manage settings (set/get/list/path) |
Article draft
Convert Markdown to WeChat article:
md2wx article-draft --file article.md --theme bytedance
Or pipe content:
cat article.md | md2wx article-draft --theme elegant-red
Newspic draft
Create image-rich card drafts:
md2wx newspic-draft --title "æ é¢" --content "å
容" --images img1.jpg,img2.png
Batch upload
Upload images and get WeChat CDN URLs:
md2wx batch-upload --images *.jpg
Themes
Built-in (6): default, bytedance, chinese, apple, sports, cyber
Template (32): {minimal|focus|elegant|bold}-{gold|green|blue|orange|red|navy|gray|sky}
List/search themes:
md2wx themes list [--verbose] [--search query]
For theme descriptions: See cli/pkg/themes/list.go
Configuration
Config file: ~/.md2wx/config.yaml
Priority: Command args > Environment vars > Config file > Defaults
Environment variables:
MD2WX_WECHAT_APPIDMD2WX_WECHAT_APPSECRETMD2WX_API_KEYMD2WX_API_BASE_URLMD2WX_DEFAULT_THEME
Project structure
cli/
âââ main.go # Root command
âââ article-draft.go # Article draft
âââ newspic-draft.go # Xiaolvshu draft
âââ batch-upload.go # Image upload
âââ config.go # Config management
âââ themes.go # Theme list command
âââ pkg/
âââ api/client.go # HTTP API client
âââ config/ # Config file I/O
âââ themes/ # Theme definitions
âââ output/ # JSON formatter
Output format
All commands output JSON:
{
"success": true,
"data": { "media_id": "...", "url": "..." }
}
Implementation details
- Zero dependencies (except cobra): Manual key=value config parsing
- Go 1.24+ required
- Single binary distribution
See source files for:
- API client:
cli/pkg/api/client.go - Config handling:
cli/pkg/config/config.go - Theme list:
cli/pkg/themes/list.go