From 32e7070bedc6396e72bf5ee3a090e9278bfa8250 Mon Sep 17 00:00:00 2001 From: sususu98 Date: Mon, 9 Mar 2026 15:37:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E9=A6=96=E9=A1=B5=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?API=20=E7=AB=AF=E7=82=B9=E4=B8=80=E8=A7=88=E5=8D=A1=E7=89=87?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=E6=A8=A1=E6=9D=BF=E8=BD=AC=E4=B9=89?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在首页 hero 下方添加 GPT/Claude/Gemini 三个 API 端点卡片 - 使用 String.raw 修复 PowerShell 命令中 \xc 无效转义序列 - 开发服务器端口改为 9527 --- docs/.vitepress/config.ts | 61 +++++++++---------- docs/index.md | 122 +++++++++++++++++++++++++++++++++++--- docs/package.json | 2 +- 3 files changed, 147 insertions(+), 38 deletions(-) diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 8f5eabc..5ccffcc 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,61 +1,62 @@ -import { defineConfig } from 'vitepress' +import { defineConfig } from "vitepress"; export default defineConfig({ - title: 'XCodeCLI', - description: '一键配置 Claude Code / Gemini CLI / Codex', - lang: 'zh-CN', + title: "XCodeCLI", + description: "一键配置 Claude Code / Gemini CLI / Codex", + lang: "zh-CN", - head: [ - ['link', { rel: 'icon', href: '/favicon.ico' }] - ], + head: [["link", { rel: "icon", href: "/favicon.ico" }]], themeConfig: { - logo: '/logo.svg', + logo: "/logo.svg", nav: [ - { text: '首页', link: '/' }, - { text: '快速开始', link: '/guide/' }, + { text: "首页", link: "/" }, + { text: "快速开始", link: "/guide/" }, // { text: 'API 状态', link: '/status' } ], sidebar: [ { - text: '快速开始', + text: "快速开始", items: [ - { text: '介绍', link: '/guide/' }, - { text: 'Claude Code', link: '/guide/claude-code' }, - { text: 'Gemini CLI', link: '/guide/gemini-cli' }, - { text: 'Codex', link: '/guide/codex' } - ] + { text: "介绍", link: "/guide/" }, + { text: "Claude Code", link: "/guide/claude-code" }, + { text: "Gemini CLI", link: "/guide/gemini-cli" }, + { text: "Codex", link: "/guide/codex" }, + ], }, { - text: '参考', + text: "参考", items: [ - { text: 'Cherry Studio 配置', link: '/cherry-studio-nanobana' } - ] - } + { text: "Cherry Studio 配置", link: "/cherry-studio-nanobana" }, + ], + }, ], socialLinks: [ - { icon: 'github', link: 'https://gitea.sususu.cf/sususu/xcodecli-shells' } + { + icon: "github", + link: "https://gitea.sususu.cf/sususu/xcodecli-shells", + }, ], footer: { - message: 'XCodeCLI API Router', - copyright: '© 2025' + message: "XCodeCLI API Router", + copyright: "© 2026", }, search: { - provider: 'local' + provider: "local", }, outline: { - label: '目录' + label: "目录", }, docFooter: { - prev: '上一页', - next: '下一页' - } - } -}) + prev: "上一页", + next: "下一页", + }, + }, +}); diff --git a/docs/index.md b/docs/index.md index 00c0a69..b7705a9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -33,7 +33,7 @@ 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='你的密钥'; $f="$env:TEMP\xc.ps1";iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1 -OutFile $f;& $f` + powershell: String.raw`$key='你的密钥'; $f="$env:TEMP\xc.ps1";iwr -useb https://gitea.sususu.cf/sususu/xcodecli-shells/raw/branch/main/setup.ps1 -OutFile $f;& $f` } function copyCommand() { @@ -43,6 +43,25 @@ function copyCommand() { } +
+

API 端点一览

+ +
+
+ GPT 系列 + https://api.xcodecli.com/v1/responses +
+
+ Claude 系列 + https://api.xcodecli.com/v1/messages +
+
+ Gemini 系列 + https://api.xcodecli.com/v1beta +
+
+
+
## 1. CLI 工具一键配置 @@ -106,19 +125,20 @@ Cherry Studio 支持所有模型,但注意 **ccmax 分组的 Claude 模型不

XCodeCLI 提供多个 API 分组,适用于不同的使用场景。

::: warning 🔑 分组区别 + - **cc2api 分组(推荐)**:提供 Claude 系列模型,无客户端限制,可自由搭配各种客户端 - **ccmax 分组**:提供 Claude 系列模型,但**只能用于 Claude Code** -::: + ::: ### cc2api — 推荐使用 cc2api 分组包含 **Claude 系列模型**,无客户端限制。推荐搭配以下工具: -| 客户端 | 类型 | 说明 | -| :--- | :--- | :--- | -| **[OpenCode](https://opencode.ai/)** | 终端 AI 编码代理 | 开源,支持 75+ LLM 供应商,可作为 Claude Code 的替代方案。支持终端、桌面端和 IDE 插件 | -| **[OpenClaw](https://openclaw.ai/)** | 个人 AI 助手 | 开源,连接 WhatsApp / Telegram / Slack 等消息平台,支持浏览器自动化、邮件、日历等操作 | -| **[Cherry Studio](https://www.cherry-ai.com/)** | 可视化对话客户端 | 支持多服务商集成,详见 [配置教程](/cherry-studio-nanobana) | +| 客户端 | 类型 | 说明 | +| :---------------------------------------------- | :--------------- | :------------------------------------------------------------------------------------ | +| **[OpenCode](https://opencode.ai/)** | 终端 AI 编码代理 | 开源,支持 75+ LLM 供应商,可作为 Claude Code 的替代方案。支持终端、桌面端和 IDE 插件 | +| **[OpenClaw](https://openclaw.ai/)** | 个人 AI 助手 | 开源,连接 WhatsApp / Telegram / Slack 等消息平台,支持浏览器自动化、邮件、日历等操作 | +| **[Cherry Studio](https://www.cherry-ai.com/)** | 可视化对话客户端 | 支持多服务商集成,详见 [配置教程](/cherry-studio-nanobana) | ::: tip 💡 GPT 系列模型 GPT 系列模型推荐使用 `v1/responses` 端点以获得最佳效果。 @@ -152,6 +172,94 @@ ccmax 分组同样提供 Claude 系列模型,但**只能**用于 Claude Code