Private
Public Access
1
0

docs: 更新 API 分组说明、客户端推荐及重启终端提醒
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 1m4s

- 文档新增 ccmax/cc2api 分组说明:cc2api 推荐优先使用(Claude 系列,无客户端限制),ccmax 仅限 Claude Code
- 推荐 OpenCode、OpenClaw 作为 cc2api 客户端,GPT 模型推荐 v1/responses 端点
- Cherry Studio 兼容性说明更新:支持所有模型,仅 ccmax 分组 Claude 模型不可用
- 所有脚本重启终端提示改为中文
- 三个工具文档页及快速开始页添加重启终端 warning 框
This commit is contained in:
2026-02-25 17:13:22 +08:00
parent a443b11326
commit 7c4d947400
17 changed files with 283 additions and 543 deletions

View File

@@ -200,39 +200,65 @@ function Install-Tool {
[hashtable]$Tool
)
# 确保 Node.js 环境就绪
if (-not (Ensure-NodeEnvironment)) {
return $false
if ($Tool.Command -eq "claude") {
# Claude Code: 使用官方原生安装脚本
Write-Info "使用官方安装脚本安装 $($Tool.Name)..."
Write-Host " 执行: irm https://claude.ai/install.ps1 | iex" -ForegroundColor Gray
try {
Invoke-Expression "& { $(Invoke-RestMethod https://claude.ai/install.ps1) }"
Refresh-Path
if (Test-Command $Tool.Command) {
Write-Success "$($Tool.Name) 安装成功!"
return $true
}
else {
Write-Warning "$($Tool.Name) 可能已安装,但需要重新打开终端才能生效"
$continue = Read-Host "是否继续进行配置? (Y/n)"
return ($continue -ne "n" -and $continue -ne "N")
}
}
catch {
Write-Error "安装失败: $($_.Exception.Message)"
return $false
}
}
Write-Info "使用 npm 安装 $($Tool.Name)..."
$installCmd = "npm install -g $($Tool.Package)"
Write-Host " 执行: $installCmd" -ForegroundColor Gray
try {
Invoke-Expression $installCmd
$exitCode = $LASTEXITCODE
Refresh-Path
if ($exitCode -ne 0) {
Write-Error "安装命令返回错误码: $exitCode"
else {
# Gemini CLI / Codex: 使用 npm 安装 (需要 Node.js)
if (-not (Ensure-NodeEnvironment)) {
return $false
}
if (Test-Command $Tool.Command) {
Write-Success "$($Tool.Name) 安装成功!"
return $true
Write-Info "使用 npm 安装 $($Tool.Name)..."
$installCmd = "npm install -g $($Tool.Package)"
Write-Host " 执行: $installCmd" -ForegroundColor Gray
try {
Invoke-Expression $installCmd
$exitCode = $LASTEXITCODE
Refresh-Path
if ($exitCode -ne 0) {
Write-Error "安装命令返回错误码: $exitCode"
return $false
}
if (Test-Command $Tool.Command) {
Write-Success "$($Tool.Name) 安装成功!"
return $true
}
else {
Write-Warning "$($Tool.Name) 可能已安装,但需要重新打开终端才能生效"
$continue = Read-Host "是否继续进行配置? (Y/n)"
return ($continue -ne "n" -and $continue -ne "N")
}
}
else {
Write-Warning "$($Tool.Name) 可能已安装,但需要重新打开终端才能生效"
$continue = Read-Host "是否继续进行配置? (Y/n)"
return ($continue -ne "n" -and $continue -ne "N")
catch {
Write-Error "安装失败: $($_.Exception.Message)"
return $false
}
}
catch {
Write-Error "安装失败: $($_.Exception.Message)"
return $false
}
}
# ========== 远程配置脚本调用 ==========