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

@tornadoami/dreamai-wechat-cli

v2.0.4

Published

dreamai-wechat-cli — WeChat OA markdown render & draft publishing (Wenyan fork)

Readme

dreamai-wechat-cli

License Stars

本仓库是什么

dreamai-wechat-cli 是基于上游 caol64/wenyan-cli文颜 的命令行工具)的 独立维护分支,且 仅包含 CLI(命令行 + 可选 serve HTTP 服务):不提供 macOS / Windows 桌面应用或 MCP 安装包,那些由文颜其它仓库维护,见官网说明。

  • 本仓库以独立包名 @tornadoami/dreamai-wechat-cli 发布到 npm(并持续提供 GitHub 安装方式)。
  • 依赖中的 @wenyan-md/core 仍从 npm registry 拉取(上游核心库),与「本 fork 是否单独发包」不是一回事。
  • Issue、PR、迭代节奏与上游仓库分离;若使用上游已发布的 @wenyan-md/cli(全局命令为 wenyan),行为与版本以 npm 上游为准。

能做什么

微信公众号场景下,本 CLI 可将 Markdown 排版后写入草稿箱,并封装更多草稿箱相关 API(与微信公众平台草稿管理字段一致)。文颜生态还覆盖知乎、头条等能力,多由 @wenyan-md/core 演进;本仓库交付物只有这条 CLI 线,以公众号排版与发布为主。

特性

  • 一键发布 Markdown 到微信公众号草稿箱
  • 自动上传本地图片与封面
  • 草稿箱原始 APIdraft 子命令与 serve 下的 HTTP 接口(add / update / batchget / count / delete / get
  • 支持远程 Server 发布(绕过 IP 白名单限制)
  • 内置多套排版主题,支持自定义主题
  • 适合 CI/CD、脚本或与 Agent 配合使用

快速开始

安装(npm)

npm install -g @tornadoami/dreamai-wechat-cli

安装后命令名为:

dreamai-wechat-cli --help

安装(GitHub)

Node.js 18+,并能访问 GitHub 与 npm registry(用于安装依赖)。克隆后执行 prepare 时会运行 tsc 生成 dist/

npm install -g github:iamtornado/dreamai-wechat-cli

可将 github:… 改为指定分支或 tag,例如 github:iamtornado/dreamai-wechat-cli#main

全局安装后的命令名为 dreamai-wechat-cli(与上游 npm 包 @wenyan-md/cli 提供的全局命令 wenyan 不同)。

常用命令

dreamai-wechat-cli publish -f article.md
dreamai-wechat-cli draft --help

从本仓库克隆开发时:请先 npm installprepare / npm run build 会生成 dist/

命令概览

dreamai-wechat-cli <command> [options]

| 命令 | 说明 | | ------- | --------- | | publish | 发布文章 | | mass | 高级群发:mass sendall(默认全员图文 mpnews) | | draft | 草稿箱 API:count / list / get / update / delete / add / merge-adddreamai-wechat-cli draft --help) | | update | CLI 自更新:update / update --check / update --yes | | render | 渲染 HTML | | theme | 管理主题 | | serve | 启动 Server(含 /draft/*/publish 等) |

概念

内容输入

内容输入是指如何把 Markdown 文章交给本 CLI,支持以下方式:

| 方式 | 示例 | 说明 | | ------- | --------- |--------- | | 本地路径(推荐) | dreamai-wechat-cli publish -f article.md | 直接读取磁盘上的文章 | | URL | dreamai-wechat-cli publish -f http://test.md | 读取网络上的文章 | | 参数 | dreamai-wechat-cli publish "# 文章" | 适用于短内容 | | 管道 | cat article.md \| dreamai-wechat-cli publish | 适用于 CI/CD、脚本批量发布 |

环境变量配置

[!IMPORTANT]

发布到微信需配置下列环境变量,否则接口会失败。

  • WECHAT_APP_ID
  • WECHAT_APP_SECRET

微信公众号 IP 白名单

[!IMPORTANT]

请确保运行环境的 IP 已加入公众号后台 IP 白名单,否则接口会失败。

说明文档:https://yuzhi.tech/docs/wenyan/upload

文章格式

每篇 Markdown 顶部需要包含 frontmatter

---
title: 在本地跑一个大语言模型(2) - 给模型提供外部知识库
cover: /Users/xxx/image.jpg
author: xxx
source_url: http://
---
  • title(必填)、coverauthorsource_url 等说明见上游习惯;示例文章

文内图片和文章封面

发布前会将正文图片按微信要求上传至素材库,支持本地绝对路径、网络 URL;在「本地文件」作为输入时,也支持相对文章路径(如 ./assets/image.png)。

Server 模式

本地模式:dreamai-wechat-cli 直接调公众号 API。远程模式:CLI 将请求发到自建的 Wenyan 兼容 Server,由服务端调微信 API。详见 docs/server.md

flowchart LR
    CLI[dreamai-wechat-cli] --> Wechat[公众号 API]
flowchart LR
    CLI[dreamai-wechat-cli] --> Server[自建 Server] --> Wechat[公众号 API]
dreamai-wechat-cli publish -f article.md --server https://api.example.com --api-key your-api-key

赞助

以下为文颜上游项目的赞助入口;若你愿意支持原作者:

https://yuzhi.tech/sponsor

License

Apache License Version 2.0