AAPIGATEAPI 文档
返回控制台

接入 GitHub Copilot CLI

GitHub Copilot CLI 支持 BYOK。使用 Anthropic Provider 可以连接 APIGATE 的 Anthropic 兼容接口。

本工具由第三方提供。请从官方渠道安装,确认其密钥存储方式,并根据实际版本核对配置入口。

安装

需要 Node.js 22 或更高版本:

npm install -g @github/copilot

Linux / macOS

export COPILOT_PROVIDER_TYPE=anthropic
export COPILOT_PROVIDER_BASE_URL=https://apigate.online
export COPILOT_PROVIDER_API_KEY=YOUR_API_KEY
export COPILOT_MODEL=YOUR_MODEL

Windows PowerShell

$env:COPILOT_PROVIDER_TYPE="anthropic"
$env:COPILOT_PROVIDER_BASE_URL="https://apigate.online"
$env:COPILOT_PROVIDER_API_KEY="YOUR_API_KEY"
$env:COPILOT_MODEL="YOUR_MODEL"

启动

cd /path/to/your-project
copilot

如果工具提示模型不在内置目录中,请按当前模型能力设置 COPILOT_PROVIDER_MAX_PROMPT_TOKENS 和 COPILOT_PROVIDER_MAX_OUTPUT_TOKENS。