From ca8c5d5ff5f97c0448ea8ded594db16dade6d603 Mon Sep 17 00:00:00 2001 From: sususu98 Date: Thu, 4 Dec 2025 13:30:21 +0800 Subject: [PATCH] fix: reorder API endpoint testing sequence in scripts and documentation --- CLAUDE.md | 4 ++-- README.md | 4 ++-- setup-claude-code.ps1 | 8 ++++---- setup-claude-code.sh | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 4c3cbb1..61413f3 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,8 +40,8 @@ XCodeCLI-Shells 是一个智能配置工具集,用于设置 Claude Code 与 XC ### 支持的 API 端点 脚本会按顺序测试以下端点,选择第一个可用的: -1. `https://api.xcodecli.com` -2. `https://api2.xcodecli.com` +1. `https://api2.xcodecli.com` +2. `https://api.xcodecli.com` ## 常用命令 diff --git a/README.md b/README.md index 6e537e7..eade07c 100644 --- a/README.md +++ b/README.md @@ -150,8 +150,8 @@ sudo dnf install jq > **自动端点发现**: 脚本会自动测试以下端点并选择第一个可用的: > -> - `https://api.xcodecli.com` > - `https://api2.xcodecli.com` +> - `https://api.xcodecli.com` ### Bash 脚本参数 @@ -176,7 +176,7 @@ sudo dnf install jq ```json { "env": { - "ANTHROPIC_BASE_URL": "https://api.xcodecli.com", + "ANTHROPIC_BASE_URL": "https://api2.xcodecli.com", "ANTHROPIC_AUTH_TOKEN": "your-api-key", "CLAUDE_CODE_MAX_OUTPUT_TOKENS": 20000, "DISABLE_TELEMETRY": 1, diff --git a/setup-claude-code.ps1 b/setup-claude-code.ps1 index 30f00df..7802a96 100644 --- a/setup-claude-code.ps1 +++ b/setup-claude-code.ps1 @@ -14,7 +14,7 @@ param( if (-not $ApiKey -and (Test-Path Variable:key)) { $ApiKey = $key } # Configuration -$DefaultBaseUrl = "https://api.xcodecli.com" +$DefaultBaseUrl = "https://api2.xcodecli.com" $ClaudeConfigDir = "$env:USERPROFILE\.claude" $ClaudeSettingsFile = "$ClaudeConfigDir\settings.json" @@ -51,8 +51,8 @@ Claude Code Configuration Script for XCodeCLI (Windows) Usage: powershell -ExecutionPolicy Bypass -File setup-claude-code.ps1 [OPTIONS] This script automatically tests multiple API endpoints and selects the working one: - - https://api.xcodecli.com - https://api2.xcodecli.com + - https://api.xcodecli.com Options: -ApiKey Set the API key @@ -112,8 +112,8 @@ function Test-ApiConnection { ) $testUrls = @( - "https://api.xcodecli.com", - "https://api2.xcodecli.com" + "https://api2.xcodecli.com", + "https://api.xcodecli.com" ) Write-Info "Testing API connections..." diff --git a/setup-claude-code.sh b/setup-claude-code.sh index c9b85fc..a68bc0d 100644 --- a/setup-claude-code.sh +++ b/setup-claude-code.sh @@ -14,7 +14,7 @@ BLUE='\033[0;34m' NC='\033[0m' # No Color # Configuration -DEFAULT_BASE_URL="https://api.xcodecli.com" +DEFAULT_BASE_URL="https://api2.xcodecli.com" CLAUDE_CONFIG_DIR="$HOME/.claude" CLAUDE_SETTINGS_FILE="$CLAUDE_CONFIG_DIR/settings.json" @@ -79,8 +79,8 @@ test_api_connection() { local api_key="$1" local test_urls=( - "https://api.xcodecli.com" "https://api2.xcodecli.com" + "https://api.xcodecli.com" ) print_info "Testing API connections..." >&2 @@ -206,8 +206,8 @@ main() { Usage: $0 [OPTIONS] This script automatically tests multiple API endpoints and selects the working one: - - https://api.xcodecli.com - https://api2.xcodecli.com + - https://api.xcodecli.com Options: -k, --key KEY Set the API key