Install
Install with PiG
pig install npm:pi-zcodeInstall with Pi
pi install npm:pi-zcodePackages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.
Pi manifest JSON
The pi field of package.json.
{
"extensions": [
"./src/index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.4 (README.md). PiG does not review it.
pi-zcode
Standalone ZCode / Z.AI / BigModel provider extension for Pi Coding Agent.
Overview
pi-zcode is a lightweight, zero-dependency standalone provider extension that connects the Pi Coding Agent directly to ZCode, Z.AI, and BigModel cloud services. It brings GLM-5.3, GLM-5.3-Flash, and GLM-5.x reasoning models directly into your terminal coding workflow with zero external CLI or desktop application dependencies.
Features
- Pure Standalone: Connects directly via upstream HTTP/SSE APIs. No local ZCode desktop client, CLI daemon, or proxy processes required.
- Auto Plan Detection: Automatically identifies account entitlements (
Start PlanandIndividual Plan) and dynamically registers providers (zcode,zcode-start-plan,zcode-individual-plan). - Dynamic Model Discovery: Queries models live from upstream APIs instead of relying on hardcoded lists.
- In-Process Headless CAPTCHA Solver: Integrates an in-memory DOM simulation (
happy-dom) solving Aliyun CAPTCHA challenges in under 1 second in the background. Completely automated with zero browser popups or workflow interruptions. - Full Reasoning & Tool Support: Native streaming of thinking content (
reasoning_content/ Anthropic thinking blocks) and structured tool calls. - Quota & Diagnostics: Real-time quota inspection via
/zcode.usageand connection diagnostics via/zcode.doctor.
Quick Start
Install the extension in Pi:
pi install npm:pi-zcodeOr install from local source:
pi install /path/to/pi-zcodeAuthenticate with your ZCode account:
/login zcodeSelect your preferred OAuth provider (
BigModelfor China mainland orZ.aifor Global).Select a model: Use Pi's native model picker:
/model zcode/glm-5.3-flashor flagship reasoning model:
/model zcode/glm-5.3
Commands
| Command | Description |
|---|---|
/login zcode | Log in via Z.ai or BigModel browser OAuth flow. |
/model | Pi native model selector showing all entitled ZCode models. |
/zcode.usage | View detected plan tier, daily balance, and quota reset timestamps. |
/zcode.doctor | Show diagnostic stats (latency, request IDs, endpoint, error history). |
Configuration & Environment Variables
| Variable | Description | Default |
|---|---|---|
PI_ZCODE_DEVICE_ID | Override persistent device MID | Stored in ~/.pi/zcode/device.json |
PI_ZCODE_BASE_URL | Override PaaS API endpoint | Auto-resolved |
CAPTCHA_DEBUG | Enable verbose CAPTCHA solver logs | false |