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

@howaboua/pi-glm-via-anthropic

v0.1.1

Published

Use Z.ai GLM models in pi through Z.ai's Anthropic-compatible endpoint.

Readme

@howaboua/pi-glm-via-anthropic

Use Z.ai GLM models in pi through Z.ai's Anthropic-compatible endpoint.

It overrides pi's built-in zai provider to send requests to https://api.z.ai/api/anthropic.

Why

This package exists because many GLM Coding Plan users prefer Z.ai's Anthropic-compatible route over the default coding endpoint.

Why:

  • Z.ai officially exposes an Anthropic-compatible endpoint for coding tools.
  • Z.ai's Claude Code docs describe that setup around "Code faster" and "rock-solid reliability".
  • Community reports and benchmarks commonly describe the Anthropic route as faster, lower-latency, or less flaky than the default coding endpoint.

What it does

  • keeps the provider name as zai
  • reuses your existing Z.ai credentials in pi
  • switches pi to the Anthropic-compatible transport for these models:
    • zai/glm-5.1
    • zai/glm-5-turbo
    • zai/glm-4.7
    • zai/glm-4.5-air

Install

pi install npm:@howaboua/pi-glm-via-anthropic

Project-local install:

pi install npm:@howaboua/pi-glm-via-anthropic -l

One-off usage without installing:

pi -e npm:@howaboua/pi-glm-via-anthropic

Credentials

If you already use Z.ai in pi, you probably do not need to do anything.

This package keeps the provider name as zai, so pi continues using the normal Z.ai credential sources:

  1. ~/.pi/agent/auth.json
  2. ZAI_API_KEY

Example auth.json entry:

{
  "zai": { "type": "api_key", "key": "your-zai-key" }
}

Or use an environment variable:

export ZAI_API_KEY=your-zai-key

Remove

pi remove npm:@howaboua/pi-glm-via-anthropic

Optional override

If you want to point the adapter at a different Anthropic-compatible base URL, set:

export ZAI_ANTHROPIC_BASE_URL=https://your-proxy.example.com

References

  • Z.ai Claude Code guide: https://docs.z.ai/devpack/tool/claude
  • Z.ai third-party tool guide: https://docs.z.ai/guides/development/using-glm-api-with-third-party-tools
  • Roo Code issue discussing faster results via https://api.z.ai/api/anthropic: https://github.com/RooCodeInc/Roo-Code/issues/8488
  • Community discussion: https://www.reddit.com/r/ZaiGLM/comments/1rti3cy/psa_for_legacy_users_with_no_active_sub/
  • pi package docs: https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/packages.md