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

pi-zcode

v0.1.4

Published

ZCode / Z.AI model provider for Pi Coding Agent

Readme

pi-zcode


概述

pi-zcode 是为 Pi Coding Agent 打造的纯原生、高内聚 ZCode / Z.AI / 智谱 BigModel 扩展插件。支持在终端 Coding Agent 工作流中直接调用 GLM-5.3、GLM-5.3-Flash 及 GLM-5 系列大模型,无需依赖任何本地 ZCode 桌面应用或外部 CLI。


核心特性

  • 纯独立运行(Zero Dependency):直连官方 HTTP/SSE 接口,不需要安装或运行本地 ZCode 桌面客户端或 CLI 守护进程,凭据安全保存在 Pi 原生 ~/.pi/agent/auth.json
  • 自动计划探测与提供者注册:自动识别账号所属的 Start Plan(每日免费额度)与 Individual Plan(专业订阅),并按需动态注册 Provider。
  • 动态模型发现:启动及登录后自动从云端接口拉取当前账号实际可用的模型列表,无需手动维护静态配置。
  • 纯内存 Headless 静默验证码求解:内置基于 happy-dom 的内存级阿里云验证码求解器,后台毫秒级(约 700ms)自动完成无感验证与 Token 预热,大段自动化 Agent 编码任务 100% 不被打断。
  • 原生思考链与工具调用:完整支持 GLM 系列模型的深度思考链(thinking_delta / reasoning_content)流式输出以及结构化工具调用(Tool Calling)。
  • 配额与健康诊断:内置 /zcode.usage(查看计划与每日余额)和 /zcode.doctor(查看网络延迟与诊断信息)。

快速开始

  1. 在 Pi 中安装插件

    pi install npm:pi-zcode

    或从本地源码安装:

    pi install /path/to/pi-zcode
  2. 登录账号

    /login zcode

    在弹出的选择框中选择 BigModel (China)Z.ai (Global) 完成网页 OAuth 授权。

  3. 选择并使用模型: 使用 Pi 原生的 /model 选择器:

    /model zcode/glm-5.3-flash

    或体验旗舰大模型:

    /model zcode/glm-5.3

快捷指令

| 命令 | 说明 | | :-------------- | :---------------------------------------------------------- | | /login zcode | 发起 Z.ai / BigModel 官方网页 OAuth 登录流程。 | | /model | Pi 原生模型选择器,展示当前账号所有可用模型。 | | /zcode.usage | 查询当前计划状态、每日模型余量与重置时间。 | | /zcode.doctor | 显示连接诊断(Endpoint、请求延迟、Request ID 与报错日志)。 |


环境变量

| 环境变量 | 说明 | 默认值 | | :------------------- | :----------------------- | :------------------------------------- | | PI_ZCODE_DEVICE_ID | 自定义设备指纹 MID | 自动持久化于 ~/.pi/zcode/device.json | | PI_ZCODE_BASE_URL | 自定义 PaaS 接口地址 | 自动按账号解析 | | CAPTCHA_DEBUG | 开启验证码求解器详细日志 | false |


开源协议

MIT