Private
Public Access
1
0
Files
xcodecli-shells/docs/index.md
sususu98 c97d3fbdbb
Some checks failed
Deploy to Cloudflare Pages / deploy (push) Has been cancelled
feat: 添加 VitePress 文档站和 Gitea CI 部署
- 新增 docs/ 目录,使用 VitePress 构建文档站
- 添加 .gitea/workflows/deploy.yaml,部署到 Cloudflare Pages
- 新增 setup.sh 一站式安装脚本(兼容 macOS bash 3.x)
- 修复 Gemini CLI 脚本认证头(改用 Authorization: Bearer)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 10:25:37 +08:00

4.8 KiB
Raw Blame History

layout, hero, features
layout hero features
home
name text tagline actions
XCodeCLI AI CLI 配置工具 一键配置 Claude Code / Gemini CLI / Codex 连接到 XCodeCLI API
theme text link
brand 快速开始 /guide/
icon title details
🚀 一键配置 运行一条命令,自动检测 API 端点并写入配置文件
icon title details
🔧 跨平台支持 支持 macOS、Linux、Windows提供 Bash 和 PowerShell 脚本
icon title details
🔒 安全备份 自动备份现有配置,支持回滚
<script setup> import { ref } from 'vue' const activeTab = ref('bash') const copied = ref(false) const commands = { bash: `API_KEY='你的密钥' bash -c "$(curl -fsSL https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.sh)"`, powershell: `$key='你的密钥'; iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1 | iex` } function copyCommand() { navigator.clipboard.writeText(commands[activeTab.value]) copied.value = true setTimeout(() => copied.value = false, 2000) } </script>

一键安装配置

运行一条命令,自动安装并配置 Claude Code、Gemini CLI、Codex

🍎/🐧 macOS / Linux 🪟 Windows
{{ commands[activeTab] }}
{{ copied ? '已复制' : '复制命令' }}

💡 提示:将命令中的 你的密钥 替换为你的实际 API 密钥

<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; } .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); } .tabs { display: flex; background: var(--vp-c-bg-mute); border-bottom: 1px solid var(--vp-c-divider); } .tabs button { flex: 1; padding: 1rem; font-size: 0.95rem; font-weight: 600; color: var(--vp-c-text-2); background: transparent; border: none; cursor: pointer; transition: color 0.2s, background-color 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px; } .tabs button:hover { color: var(--vp-c-text-1); background-color: var(--vp-c-bg-soft); } .tabs button.active { color: var(--vp-c-brand); background: var(--vp-c-bg-soft); box-shadow: inset 0 -2px 0 var(--vp-c-brand); } .code-block-wrapper { position: relative; padding: 1.5rem; text-align: left; display: flex; gap: 1rem; align-items: center; } .code-block { flex: 1; font-family: var(--vp-font-family-mono); font-size: 0.9rem; color: var(--vp-c-text-1); overflow-x: auto; white-space: pre; padding-right: 0.5rem; /* Hide scrollbar for cleaner look */ scrollbar-width: thin; } .code-block::-webkit-scrollbar { height: 6px; } .code-block::-webkit-scrollbar-thumb { background-color: var(--vp-c-divider); border-radius: 3px; } .copy-btn { flex-shrink: 0; padding: 0.5rem 1rem; border: 1px solid var(--vp-c-divider); border-radius: 6px; background: var(--vp-c-bg); color: var(--vp-c-text-1); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; } .copy-btn:hover { border-color: var(--vp-c-brand); color: var(--vp-c-brand); } .copy-btn.copied { border-color: var(--vp-c-green); color: var(--vp-c-green); background-color: var(--vp-c-bg-mute); } .tip { margin-top: 1.5rem; font-size: 0.9rem; color: var(--vp-c-text-2); } .tip code { color: var(--vp-c-brand); background-color: var(--vp-c-bg-mute); padding: 0.2em 0.4em; 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 (备用)