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

@gulibs/wechat-official-link-splicing

v0.0.1

Published

CLI: 输入公众号文章链接,解析或拉取得到 __biz,拼接并输出公众号关注页链接

Readme

@gulibs/wechat-official-link-splicing

根据公众号文章或相关链接,解析或拉取得到 __biz(与浏览器控制台中的 window.biz 一致),拼接并输出公众号关注页链接的 Node 命令行工具。使用 TypeScript 编写。

要求

  • Node.js >= 18(使用原生 fetch

安装与构建

npm install
npm run build
npm link
# 或全局安装
npm i -g .

用法

wechat-follow-link "<公众号文章或相关链接>"

或使用 npx(无需安装):

npx @gulibs/wechat-official-link-splicing "https://mp.weixin.qq.com/s?__biz=MzA4MzEwODEyOA==&mid=..."

参数

  • 位置参数:一条公众号文章链接或相关链接。支持:
    • __biz 的完整文章链接(如 https://mp.weixin.qq.com/s?__biz=xxx&mid=...
    • 短链(如 https://mp.weixin.qq.com/s/xxx),工具会请求该链接并从最终 URL 或页面内容中提取 __biz
  • --no-fetch:仅从当前 URL 解析 __biz,不请求页面。若 URL 中无 __biz 则直接报错。

输出

  • 成功:向 stdout 输出一行,即拼接后的关注页链接,例如:
    https://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzA4MzEwODEyOA==#wechat_redirect
  • 失败:错误信息输出到 stderr,进程退出码为 1。

说明

  • 关注页链接仅在微信客户端内打开有效,在普通浏览器中可能无法正常使用。
  • 若链接为短链或未带 __biz,工具会请求该页面,从源码中提取与控制台一致的 biz:优先匹配页面 script 里的 var biz = ""||"xxx"window.biz = "xxx",再匹配 __biz= 或最终重定向 URL 中的 __biz

License

MIT