> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mossx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Pi

> 配置 PI CLI、~/.pi/agent/auth.json 与订阅授权。

Pi 走本机 `pi`。认证和模型留在 `~/.pi/`。打开 **设置 → CLI配置管理 → PI CLI** 检测版本、安装，并配置凭证。

## 接入方式

1. 在该页覆盖 `pi` 可执行文件路径（可选）
2. 在 **供应商认证** 里填 API Key，或点 **登录** 走订阅授权
3. 未安装时在该页点 **安装**，或按下面的终端命令安装

<Note>
  配置只存在你的电脑上。客户端不会把 Key 上传到 CC GUI 自己的服务器。
</Note>

## 供应商认证

### API Key

写入 `~/.pi/agent/auth.json`（权限 `0600`），优先级高于环境变量。

常用项包括 Anthropic、OpenAI、Google Gemini、DeepSeek、xAI、OpenRouter、Groq、Mistral、智谱、Kimi For Coding、Qwen、MiniMax。其余供应商折叠在 **显示全部**。

### 订阅授权

点 **登录**：客户端打开内置终端启动 `pi`，再发送 `/login anthropic` 这类命令。也可以自己在系统终端执行 `pi /login`。

客户端不代你走 OAuth，只读 `auth.json` 状态。支持：

* Claude Pro / Max（`pi /login anthropic`）
* ChatGPT Plus / Pro (Codex)（`pi /login openai`）
* GitHub Copilot
* xAI
* OpenRouter
* Radius

### 解析顺序

`--api-key` → `auth.json` → 环境变量 → `models.json`

## 安装

```bash theme={null}
curl -fsSL https://pi.dev/install.sh | sh
pi --version
```

备选：

```bash theme={null}
npm install -g @earendil-works/pi-coding-agent
```

应用内 **安装** 预览的是备选里的 `npm install -g @earendil-works/pi-coding-agent`。

文档：[https://pi.dev/docs/latest/usage](https://pi.dev/docs/latest/usage)

## 能力差异

相对 Claude Code：

* 没有规划模式
* 不走客户端 MCP
* 支持推理强度、会话续写与图片输入
* 停止按钮会结束 `pi` 子进程
* 历史按 runtime 隔离

## 检测失败时

见 [检测与安装](/desktop/providers/cli)。

## 下一步

* [多供应商总览](/desktop/providers/overview)
* [发出第一条消息](/desktop/start/first-task)
