Pi Coding Agent 新增了使用 GLM 模型的设置指南,支持 GLM Coding Plan,开发者可据此在终端中配置和使用 GLM 进行代码生成与调试
AI 摘要
Pi Coding Agent 新增了使用 GLM 模型的设置指南,支持 GLM Coding Plan,开发者可据此在终端中配置和使用 GLM 进行代码生成与调试。
推荐理由常规快讯,保留列表
原文
Pi Coding Agent is a minimalist terminal coding harness with a small core that can be extended via TypeScript extensions, Skills, prompt templates, themes, and Pi Packages. It handles code generation, debugging, project analysis, file operations, and more directly from the command line.
Step 1: Installing Pi Coding Agent
The easiest way to install Pi Coding Agent is with the official install script:
You can also install it with npm:
--ignore-scripts disables lifecycle scripts during dependency installation. Pi Coding Agent’s normal npm installation does not require install scripts.
Step 2: Connect to GLM Coding Plan
1. Obtain Your Z.AI API Key
Visit Z.AI to get your API Key.
2. Launch and Configure Pi Coding Agent
Navigate to your project directory, launch Pi Coding Agent, and run /login zai:
In the Pi Coding Agent interactive interface, run:
Enter the API key you obtained from Z.AI in the Pi Coding Agent interactive interface:
After a successful login, your credentials are saved in ~/.pi/agent/auth.json. Use the /model command in the Pi Coding Agent interactive interface to select the GLM model you want to use.
3. Alternative Configuration
If you prefer not to log in interactively via /login, you can also connect using an environment variable or a custom model configuration file.Set the environment variable before launching Pi Coding Agent:
Resources
- Pi Coding Agent Documentation: pi.dev/docs/latest
- Pi Coding Agent GitHub: earendil-works/pi
- Custom Model Configuration: pi.dev/docs/latest/models
- Provider Configuration: pi.dev/docs/latest/providers
讨论
暂无评论。