Private
Public Access
1
0

feat: 增强三个 CLI 工具配置脚本

- Gemini CLI: 添加 GEMINI_MODEL 环境变量、settings.json 输出及备份逻辑
- Codex: 修复模型名称一致性 (gpt-5-codex)、添加 auth.json 备份逻辑
- Claude Code: 添加 VSCode 插件 config.json 配置支持
- CLAUDE.md: 重构文档,添加三个工具配置差异表

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2025-12-11 18:15:54 +08:00
parent badf8e6bb6
commit 2314140bce
9 changed files with 292 additions and 497 deletions

View File

@@ -54,6 +54,12 @@ backup_settings() {
cp "$CLAUDE_SETTINGS_FILE" "$backup_file"
print_info "Backed up existing settings to: $backup_file"
fi
local config_json_path="$CLAUDE_CONFIG_DIR/config.json"
if [ -f "$config_json_path" ]; then
local backup_file="${config_json_path}.backup.$(date +%Y%m%d_%H%M%S)"
cp "$config_json_path" "$backup_file"
print_info "Backed up existing config to: $backup_file"
fi
}
# Function to create settings directory
@@ -153,6 +159,15 @@ create_settings() {
# Write settings file
echo "$settings_json" > "$CLAUDE_SETTINGS_FILE"
print_success "Claude Code settings written to: $CLAUDE_SETTINGS_FILE"
# Write config.json for VSCode Claude extension
local config_json_path="$CLAUDE_CONFIG_DIR/config.json"
cat <<EOF > "$config_json_path"
{
"primaryApiKey": "xcodecli"
}
EOF
print_success "VSCode Claude config written to: $config_json_path"
}
# Function to display current settings