npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@shawnxie666/wechat-draft-from-md

v0.1.2

Published

Create WeChat Official Account drafts from Lumina, Infinitum, Markdown URLs, or local Markdown files.

Downloads

331

Readme

wechat-draft-from-md

Create WeChat Official Account drafts from Lumina pages, Infinitum daily pages, Markdown URLs, or local Markdown files.

Install

npm install -g @shawnxie666/wechat-draft-from-md

Or run without installing. npx uses npm's cache, but it may still resolve package metadata; --prefer-offline reduces registry checks when the package is already cached:

npx --yes --prefer-offline --package @shawnxie666/wechat-draft-from-md wechat-draft-from-md --help

Usage

Prefer a local command when it exists:

if command -v wechat-draft-from-md >/dev/null 2>&1; then
  wechat-draft-from-md create "https://infinitum.shawnxie.top/daily/2026-04-26"
elif [ -x ./node_modules/.bin/wechat-draft-from-md ]; then
  ./node_modules/.bin/wechat-draft-from-md create "https://infinitum.shawnxie.top/daily/2026-04-26"
else
  npx --yes --prefer-offline --package @shawnxie666/wechat-draft-from-md \
    wechat-draft-from-md create "https://infinitum.shawnxie.top/daily/2026-04-26"
fi

Dry run:

wechat-draft-from-md create "SOURCE" --dry-run

Explicit cover:

wechat-draft-from-md create "SOURCE" --cover-image /path/to/cover.png

Initialize config:

wechat-draft-from-md init-config

Create a local config in the current skill directory:

wechat-draft-from-md init-config --path config.local.json

Install the Codex skill wrapper:

wechat-draft-from-md install-skill

Configuration

The CLI loads config in this order. Later sources override earlier sources with a deep merge:

  1. bundled defaults
  2. ~/.config/wechat-draft-from-md/config.json
  3. current directory config.json
  4. current directory config.local.json
  5. file pointed to by WECHAT_DRAFT_CONFIG
  6. optional --config <file>
  7. environment variables

Example config.local.json:

{
  "wechat": {
    "app_id": "YOUR_APP_ID",
    "app_secret": "YOUR_APP_SECRET",
    "author": "作者名",
    "default_thumb_media_id": "",
    "need_open_comment": 0,
    "only_fans_can_comment": 0
  },
  "formatting": {
    "theme": "grace",
    "primary_color": "classic-blue",
    "justify": true
  }
}

WeChat authentication can be provided with WECHAT_ACCESS_TOKEN, WECHAT_ACCESS_TOKEN_COMMAND, or WECHAT_APP_ID plus WECHAT_APP_SECRET.

Supported environment overrides:

  • Formatting: MD_CLI_THEME, MD_CLI_FONT_FAMILY, MD_CLI_FONT_SIZE, MD_CLI_PRIMARY_COLOR, MD_CLI_HEADING_STYLE, MD_CLI_CODE_THEME, MD_CLI_LEGEND, MD_CLI_MAC_CODE_BLOCK, MD_CLI_LINE_NUMBERS, MD_CLI_CITE, MD_CLI_COUNT, MD_CLI_INDENT, MD_CLI_JUSTIFY
  • WeChat: WECHAT_APP_ID, WECHAT_APP_SECRET, WECHAT_ACCESS_TOKEN, WECHAT_ACCESS_TOKEN_COMMAND, WECHAT_ACCESS_TOKEN_CACHE_FILE, WECHAT_API_BASE_URL, WECHAT_DEFAULT_THUMB_MEDIA_ID, WECHAT_DEFAULT_COVER_IMAGE, WECHAT_FOOTER_TEMPLATE, WECHAT_FOOTER_ENABLED, WECHAT_AUTHOR, WECHAT_DIGEST, WECHAT_CONTENT_SOURCE_URL, WECHAT_NEED_OPEN_COMMENT, WECHAT_ONLY_FANS_CAN_COMMENT
  • Extra config file: WECHAT_DRAFT_CONFIG

Boolean environment values treat 1, true, yes, and on as true. Other values are false.

Inspect the merged config:

wechat-draft-from-md show-config