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

kuaifa

v0.3.5

Published

内容分发 CLI 工具 — 好内容别留着,快发。

Downloads

77

Readme


为什么需要快发?

微信公众号 API 要求配置固定 IP 白名单,但个人开发者通常没有公网固定 IP,而且运营商分配的 IP 随时会变。

快发提供了一套云端中转服务来解决这个问题:

  1. kuaifa.art 注册账号,获取 API Key
  2. 在快发官网绑定你的公众号 AppID / AppSecret
  3. 快发服务端使用已在微信后台备案的固定 IP 代你调用微信 API

你只需要在本地写好 Markdown,一行命令就能发布到公众号草稿箱,不用操心 IP 白名单、图片上传、排版样式。

特性

  • Markdown → 微信公众号 — 一行命令完成发布
  • 图片消息(newspic) — 支持图文笔记、多图展示类型内容
  • 图片全自动处理 — 本地 & 远程图片自动扫描、压缩、上传
  • MD5 缓存去重 — 相同图片不会重复上传,节省流量和时间
  • Obsidian 兼容 — 支持 ![[image.png]] 嵌入语法
  • 多账号管理 — Profile 机制,一台电脑管理多个公众号
  • 模板 & 预设 — 丰富的排版模板,一键切换风格

安装

npm install -g kuaifa

需要 Node.js >= 18

快速开始

1. 注册 & 获取 API Key

前往 kuaifa.art 注册账号,在控制台获取你的 API Key,并绑定公众号的 AppID 和 AppSecret。

2. 本地配置

kuaifa config set api-key YOUR_API_KEY
kuaifa config set appid YOUR_WECHAT_APPID
kuaifa config set appsecret YOUR_WECHAT_APPSECRET
kuaifa config set default-author "你的名字"

3. 验证配置

kuaifa config verify-wechat
# → 微信凭证验证通过 ✓

4. 发布文章

kuaifa publish article.md --title "我的第一篇文章" --cover cover.jpg

文章会出现在公众号的草稿箱中,确认无误后在微信后台点击发布即可。

命令参考

kuaifa publish <file>

发布 Markdown 文章到微信公众号。

| 参数 | 说明 | |------|------| | --title <title> | 必填 文章标题 | | --cover <path\|url> | 必填 封面图片(本地路径或远程 URL) | | --author <name> | 作者名(或通过 default-author 配置) | | --template <id> | 排版模板 ID 或预设名称 | | --digest <text> | 文章摘要 | | --source-url <url> | "阅读原文" 链接 | | --recommend | 插入往期文章推荐 | | --send | 直接群发(默认发到草稿箱) | | --draft | 发布到草稿箱(默认) |

# 基本用法
kuaifa publish article.md --title "标题" --cover cover.jpg

# 指定模板 + 作者
kuaifa publish article.md --title "标题" --cover cover.jpg --template elegant --author "石臻"

# 直接群发
kuaifa publish article.md --title "标题" --cover cover.jpg --send

kuaifa publish-newspic

发布图片消息(newspic)到微信公众号,适用于图文笔记、多图展示等场景。

| 参数 | 说明 | |------|------| | --title <title> | 必填 图片消息标题 | | --images <paths...> | 必填 图片路径或 URL 列表(至少1张,支持多张) | | --caption <text> | 图片描述文字(选填) | | --send | 直接群发(默认发到草稿箱) | | --draft | 发布到草稿箱(默认) |

# 发布单张图片
kuaifa publish-newspic --title "标题" --images photo.jpg

# 发布多张图片(推荐用于图文笔记)
kuaifa publish-newspic --title "今日AI资讯" --images img1.jpg img2.jpg img3.jpg --caption "精选内容"

# 支持远程 URL
kuaifa publish-newspic --title "标题" --images https://example.com/img1.jpg https://example.com/img2.jpg

# 直接群发
kuaifa publish-newspic --title "标题" --images img1.jpg img2.jpg --send

kuaifa template list

查看可用的排版模板和用户预设。

kuaifa template list

kuaifa config

管理本地配置(存储于 ~/.kuaifa/config.json)。

kuaifa config set <key> <value>     # 设置配置项
kuaifa config get <key>             # 获取配置项
kuaifa config list                  # 列出所有配置
kuaifa config verify-wechat         # 验证微信凭证

配置项一览:

| Key | 说明 | |-----|------| | api-key | 快发 API Key(在 kuaifa.art 获取) | | appid | 微信公众号 AppID | | appsecret | 微信公众号 AppSecret | | default-author | 默认作者名 | | account-name | 公众号名称 |

kuaifa config remote

管理服务端远程配置。

kuaifa config remote show                           # 查看服务端配置
kuaifa config remote set wechat-appid YOUR_APPID    # 设置远程 appid

多账号管理

通过 Profile 管理多个公众号,每个 Profile 可以有独立的 API Key、AppID 等配置。

kuaifa config profile add work            # 创建 profile
kuaifa config profile use work            # 切换到 profile
kuaifa config profile set api-key KEY     # 在 profile 中设置配置
kuaifa config profile list                # 列出所有 profile
kuaifa config profile del work            # 删除 profile
kuaifa config profile use none            # 切回全局配置

# 临时使用某个 profile(不切换)
kuaifa --account work publish article.md --title "标题" --cover cover.jpg

工作原理

┌──────────┐     Markdown + 图片      ┌────────────────┐     微信 API     ┌──────────┐
│  你的电脑  │ ──────────────────────→ │  api.kuaifa.art │ ──────────────→ │  微信服务器  │
│  kuaifa   │    (HTTPS, API Key)     │   固定 IP 白名单  │                │  公众号后台  │
└──────────┘                          └────────────────┘                 └──────────┘
  1. 本地扫描 — 解析 Markdown,提取所有图片引用
  2. 智能上传 — MD5 去重,仅上传新增/变更的图片,已缓存的图片直接签名
  3. 云端渲染 — 服务端将 Markdown 渲染为微信兼容的 HTML,应用排版模板
  4. 发布投递 — 通过已备案的固定 IP 调用微信 API,投递到草稿箱或直接群发

License

MIT