更新首页与指南文档
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 33s
All checks were successful
Deploy to Cloudflare Pages / deploy (push) Successful in 33s
This commit is contained in:
172
docs/index.md
172
docs/index.md
@@ -3,23 +3,26 @@ layout: home
|
||||
|
||||
hero:
|
||||
name: XCodeCLI
|
||||
text: AI CLI 配置工具
|
||||
tagline: 一键配置 Claude Code / Gemini CLI / Codex 连接到 XCodeCLI API
|
||||
text: 全能 AI 开发配置中心
|
||||
tagline: 统一管理 Claude Code / Gemini CLI / Codex 及 Cherry Studio 配置
|
||||
actions:
|
||||
- theme: brand
|
||||
text: 快速开始
|
||||
link: /guide/
|
||||
- theme: alt
|
||||
text: Cherry Studio 教程
|
||||
link: /cherry-studio-nanobana
|
||||
|
||||
features:
|
||||
- icon: 🚀
|
||||
title: 一键配置
|
||||
details: 运行一条命令,自动检测 API 端点并写入配置文件
|
||||
- icon: 🔧
|
||||
title: 跨平台支持
|
||||
details: 支持 macOS、Linux、Windows,提供 Bash 和 PowerShell 脚本
|
||||
title: CLI 一键配置
|
||||
details: 一行命令自动配置 Claude Code、Gemini CLI 和 Codex
|
||||
- icon: 🍒
|
||||
title: Cherry Studio 支持
|
||||
details: 完美适配 Cherry Studio,支持 Gemini 系列模型可视化交互
|
||||
- icon: 🔒
|
||||
title: 安全备份
|
||||
details: 自动备份现有配置,支持回滚
|
||||
title: 安全可靠
|
||||
details: 自动备份现有配置,本地化管理 API 密钥
|
||||
---
|
||||
|
||||
<script setup>
|
||||
@@ -40,62 +43,118 @@ function copyCommand() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="quick-install">
|
||||
<h2>⚡ 一键安装配置</h2>
|
||||
<p class="desc">运行一条命令,自动安装并配置 Claude Code、Gemini CLI、Codex</p>
|
||||
<div class="setup-section">
|
||||
|
||||
## 1. CLI 工具一键配置
|
||||
|
||||
<p class="desc">适用于 <strong>Claude Code</strong>、<strong>Gemini CLI</strong> 和 <strong>Codex</strong> 的自动化配置。</p>
|
||||
|
||||
<div class="install-card">
|
||||
<div class="tabs">
|
||||
<button :class="{ active: activeTab === 'bash' }" @click="activeTab = 'bash'">
|
||||
<span class="icon">🍎/🐧</span> macOS / Linux
|
||||
</button>
|
||||
<button :class="{ active: activeTab === 'powershell' }" @click="activeTab = 'powershell'">
|
||||
<span class="icon">🪟</span> Windows
|
||||
</button>
|
||||
<div class="tabs">
|
||||
<button :class="{ active: activeTab === 'bash' }" @click="activeTab = 'bash'">
|
||||
<span class="icon">🍎/🐧</span> macOS / Linux
|
||||
</button>
|
||||
<button :class="{ active: activeTab === 'powershell' }" @click="activeTab = 'powershell'">
|
||||
<span class="icon">🪟</span> Windows
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="code-block-wrapper">
|
||||
<div class="code-block">
|
||||
<code>{{ commands[activeTab] }}</code>
|
||||
</div>
|
||||
<button class="copy-btn" @click="copyCommand" :class="{ copied: copied }">
|
||||
{{ copied ? '已复制' : '复制命令' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="code-block-wrapper">
|
||||
<div class="code-block">
|
||||
<code>{{ commands[activeTab] }}</code>
|
||||
</div>
|
||||
<button class="copy-btn" @click="copyCommand" :class="{ copied: copied }">
|
||||
{{ copied ? '已复制' : '复制命令' }}
|
||||
</button>
|
||||
</div>
|
||||
<p class="tip">💡 提示:运行前请将命令中的 <code>你的密钥</code> 替换为实际 API Key</p>
|
||||
|
||||
</div>
|
||||
|
||||
<p class="tip">💡 提示:将命令中的 <code>你的密钥</code> 替换为你的实际 API 密钥</p>
|
||||
<div class="setup-section">
|
||||
|
||||
## 2. Cherry Studio 配置
|
||||
|
||||
<p class="desc">在 Cherry Studio 中使用 XCodeCLI 服务,享受可视化的对话体验。</p>
|
||||
|
||||
::: danger ⚠️ 重要提示:模型兼容性
|
||||
**Cherry Studio 仅支持 Gemini 系列模型!**
|
||||
|
||||
- ❌ **Claude 模型**:暂不支持在 Cherry Studio 中使用(请在 Claude Code 内使用)
|
||||
- ❌ **GPT 模型**:暂不支持在 Cherry Studio 中使用(请在 Codex 内使用)
|
||||
- ✅ **Gemini 模型**:完美支持
|
||||
:::
|
||||
|
||||
### 配置参数
|
||||
|
||||
请在 Cherry Studio 设置中添加 **自定义提供商**:
|
||||
|
||||
| 配置项 | 值 | 说明 |
|
||||
| :------------- | :-------------------------- | :----------------------- |
|
||||
| **提供商类型** | `Gemini` | **必选** (不要选 OpenAI) |
|
||||
| **API 密钥** | `sk-...` | 你的 XCodeCLI 密钥 |
|
||||
| **API 地址** | `https://api2.xcodecli.com` | Base URL |
|
||||
|
||||
::: tip 📝 详细教程
|
||||
查看完整的 [Cherry Studio 图文配置指南](/cherry-studio-nanobana)
|
||||
:::
|
||||
|
||||
</div>
|
||||
|
||||
<div class="setup-section">
|
||||
|
||||
## 3. 参考信息
|
||||
|
||||
### CLI 配置文件位置
|
||||
|
||||
| 工具 | 配置文件 | 格式 |
|
||||
| :-------------- | :------------------------ | :--- |
|
||||
| **Claude Code** | `~/.claude/settings.json` | JSON |
|
||||
| **Gemini CLI** | `~/.gemini/.env` | ENV |
|
||||
| **Codex** | `~/.codex/config.toml` | TOML |
|
||||
|
||||
### API 端点
|
||||
|
||||
脚本会自动测试以下端点,选择第一个可用的:
|
||||
|
||||
- `https://api2.xcodecli.com` (主要)
|
||||
- `https://api.xcodecli.com` (备用)
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.quick-install {
|
||||
margin: 0 auto 4rem;
|
||||
padding: 0 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
.quick-install h2 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0.5rem;
|
||||
border-top: none;
|
||||
font-size: 2rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: -0.5px;
|
||||
}
|
||||
.quick-install .desc {
|
||||
margin: 0 auto 2rem;
|
||||
color: var(--vp-c-text-2);
|
||||
font-size: 1.1rem;
|
||||
max-width: 600px;
|
||||
.setup-section {
|
||||
margin: 3rem auto;
|
||||
max-width: 960px;
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
.setup-section h2 {
|
||||
border-top: none;
|
||||
font-size: 1.8rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.desc {
|
||||
color: var(--vp-c-text-2);
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
/* Install Card Styles */
|
||||
.install-card {
|
||||
max-width: 780px;
|
||||
margin: 0 auto;
|
||||
background: var(--vp-c-bg-soft);
|
||||
border: 1px solid var(--vp-c-divider);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.05);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.tabs {
|
||||
@@ -145,7 +204,6 @@ function copyCommand() {
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
padding-right: 0.5rem;
|
||||
/* Hide scrollbar for cleaner look */
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.code-block::-webkit-scrollbar {
|
||||
@@ -179,7 +237,6 @@ function copyCommand() {
|
||||
}
|
||||
|
||||
.tip {
|
||||
margin-top: 1.5rem;
|
||||
font-size: 0.9rem;
|
||||
color: var(--vp-c-text-2);
|
||||
}
|
||||
@@ -190,18 +247,3 @@ function copyCommand() {
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
|
||||
## 支持的工具
|
||||
|
||||
| 工具 | 配置位置 | 配置格式 |
|
||||
| ----------- | ------------------------- | -------- |
|
||||
| Claude Code | `~/.claude/settings.json` | JSON |
|
||||
| Gemini CLI | `~/.gemini/.env` | ENV |
|
||||
| Codex | `~/.codex/config.toml` | TOML |
|
||||
|
||||
## API 端点
|
||||
|
||||
脚本会自动测试以下端点,选择第一个可用的:
|
||||
|
||||
- `https://api2.xcodecli.com` (主要)
|
||||
- `https://api.xcodecli.com` (备用)
|
||||
|
||||
Reference in New Issue
Block a user