Private
Public Access
1
0
Files
xcodecli-shells/docs/guide/index.md
sususu98 aea92bc1ec
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 33s
更新首页与指南文档
2025-12-26 15:54:28 +08:00

59 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 快速开始
欢迎使用 **XCodeCLI** 配置工具。本指南将帮助你快速配置常用的 AI CLI 工具,使其连接到 XCodeCLI 的 API 端点。
## 前置要求
在开始之前,请确保你拥有:
- **有效的 XCodeCLI API 密钥** (通常以 `sk-` 开头)
- **网络连接**:能够访问我们的 API 端点 (`https://api2.xcodecli.com``https://api.xcodecli.com`)
对于操作系统环境:
- **macOS / Linux**: 需要 `curl``bash` 环境。
- **Windows**: 需要 PowerShell 5.1 或更高版本。
## 全自动一键配置(推荐)
这是最简单的方法。运行一条命令,脚本会自动检测、安装并配置 **Claude Code**、**Gemini CLI** 和 **Codex**
::: code-group
```bash [macOS / Linux]
API_KEY='你的密钥' bash -c "$(curl -fsSL https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.sh)"
```
```powershell [Windows]
$key='你的密钥'; iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1 | iex
```
:::
> 💡 **提示**:请将命令中的 `你的密钥` 替换为你的实际 API 密钥。
### 脚本执行流程
1. **环境检测**:检查 Node.js 等必要运行时。如果缺失,脚本会尝试引导安装(如 fnm
2. **工具状态检查**:显示当前已安装的工具及其版本。
3. **自动化配置**:依次为检测到的或默认的工具写入配置文件(备份原有配置)。
4. **验证连接**:简单的 API 连接测试(部分脚本支持)。
5. **结果汇总**:显示所有配置文件的路径和最终状态。
## 单独配置
如果你只需要配置特定的工具,或者想了解每个工具的详细配置参数,请参考以下指南:
- [Claude Code 配置指南](/guide/claude-code)
- [Gemini CLI 配置指南](/guide/gemini-cli)
- [Codex 配置指南](/guide/codex)
## API 端点说明
我们的配置脚本会自动测试并选择最快的可用端点:
1. `https://api2.xcodecli.com` (主要,优先尝试)
2. `https://api.xcodecli.com` (备用)
所有的工具都会统一配置使用同一个有效的 API 端点。