fix: reorder API endpoint testing sequence in scripts and documentation
This commit is contained in:
@@ -40,8 +40,8 @@ XCodeCLI-Shells 是一个智能配置工具集,用于设置 Claude Code 与 XC
|
|||||||
|
|
||||||
### 支持的 API 端点
|
### 支持的 API 端点
|
||||||
脚本会按顺序测试以下端点,选择第一个可用的:
|
脚本会按顺序测试以下端点,选择第一个可用的:
|
||||||
1. `https://api.xcodecli.com`
|
1. `https://api2.xcodecli.com`
|
||||||
2. `https://api2.xcodecli.com`
|
2. `https://api.xcodecli.com`
|
||||||
|
|
||||||
## 常用命令
|
## 常用命令
|
||||||
|
|
||||||
|
|||||||
@@ -150,8 +150,8 @@ sudo dnf install jq
|
|||||||
|
|
||||||
> **自动端点发现**: 脚本会自动测试以下端点并选择第一个可用的:
|
> **自动端点发现**: 脚本会自动测试以下端点并选择第一个可用的:
|
||||||
>
|
>
|
||||||
> - `https://api.xcodecli.com`
|
|
||||||
> - `https://api2.xcodecli.com`
|
> - `https://api2.xcodecli.com`
|
||||||
|
> - `https://api.xcodecli.com`
|
||||||
|
|
||||||
### Bash 脚本参数
|
### Bash 脚本参数
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ sudo dnf install jq
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"env": {
|
"env": {
|
||||||
"ANTHROPIC_BASE_URL": "https://api.xcodecli.com",
|
"ANTHROPIC_BASE_URL": "https://api2.xcodecli.com",
|
||||||
"ANTHROPIC_AUTH_TOKEN": "your-api-key",
|
"ANTHROPIC_AUTH_TOKEN": "your-api-key",
|
||||||
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": 20000,
|
"CLAUDE_CODE_MAX_OUTPUT_TOKENS": 20000,
|
||||||
"DISABLE_TELEMETRY": 1,
|
"DISABLE_TELEMETRY": 1,
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ param(
|
|||||||
if (-not $ApiKey -and (Test-Path Variable:key)) { $ApiKey = $key }
|
if (-not $ApiKey -and (Test-Path Variable:key)) { $ApiKey = $key }
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
$DefaultBaseUrl = "https://api.xcodecli.com"
|
$DefaultBaseUrl = "https://api2.xcodecli.com"
|
||||||
$ClaudeConfigDir = "$env:USERPROFILE\.claude"
|
$ClaudeConfigDir = "$env:USERPROFILE\.claude"
|
||||||
$ClaudeSettingsFile = "$ClaudeConfigDir\settings.json"
|
$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]
|
Usage: powershell -ExecutionPolicy Bypass -File setup-claude-code.ps1 [OPTIONS]
|
||||||
|
|
||||||
This script automatically tests multiple API endpoints and selects the working one:
|
This script automatically tests multiple API endpoints and selects the working one:
|
||||||
- https://api.xcodecli.com
|
|
||||||
- https://api2.xcodecli.com
|
- https://api2.xcodecli.com
|
||||||
|
- https://api.xcodecli.com
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-ApiKey <KEY> Set the API key
|
-ApiKey <KEY> Set the API key
|
||||||
@@ -112,8 +112,8 @@ function Test-ApiConnection {
|
|||||||
)
|
)
|
||||||
|
|
||||||
$testUrls = @(
|
$testUrls = @(
|
||||||
"https://api.xcodecli.com",
|
"https://api2.xcodecli.com",
|
||||||
"https://api2.xcodecli.com"
|
"https://api.xcodecli.com"
|
||||||
)
|
)
|
||||||
|
|
||||||
Write-Info "Testing API connections..."
|
Write-Info "Testing API connections..."
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ BLUE='\033[0;34m'
|
|||||||
NC='\033[0m' # No Color
|
NC='\033[0m' # No Color
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
DEFAULT_BASE_URL="https://api.xcodecli.com"
|
DEFAULT_BASE_URL="https://api2.xcodecli.com"
|
||||||
CLAUDE_CONFIG_DIR="$HOME/.claude"
|
CLAUDE_CONFIG_DIR="$HOME/.claude"
|
||||||
CLAUDE_SETTINGS_FILE="$CLAUDE_CONFIG_DIR/settings.json"
|
CLAUDE_SETTINGS_FILE="$CLAUDE_CONFIG_DIR/settings.json"
|
||||||
|
|
||||||
@@ -79,8 +79,8 @@ test_api_connection() {
|
|||||||
local api_key="$1"
|
local api_key="$1"
|
||||||
|
|
||||||
local test_urls=(
|
local test_urls=(
|
||||||
"https://api.xcodecli.com"
|
|
||||||
"https://api2.xcodecli.com"
|
"https://api2.xcodecli.com"
|
||||||
|
"https://api.xcodecli.com"
|
||||||
)
|
)
|
||||||
|
|
||||||
print_info "Testing API connections..." >&2
|
print_info "Testing API connections..." >&2
|
||||||
@@ -206,8 +206,8 @@ main() {
|
|||||||
Usage: $0 [OPTIONS]
|
Usage: $0 [OPTIONS]
|
||||||
|
|
||||||
This script automatically tests multiple API endpoints and selects the working one:
|
This script automatically tests multiple API endpoints and selects the working one:
|
||||||
- https://api.xcodecli.com
|
|
||||||
- https://api2.xcodecli.com
|
- https://api2.xcodecli.com
|
||||||
|
- https://api.xcodecli.com
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-k, --key KEY Set the API key
|
-k, --key KEY Set the API key
|
||||||
|
|||||||
Reference in New Issue
Block a user