usage.json 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731
  1. {
  2. "pageTitle": "Claude Code Hub 使用文檔",
  3. "pageDescription": "完整的 Claude Code、Codex 和 Droid CLI 集成指南",
  4. "skipLinks": {
  5. "mainContent": "跳轉到主要內容",
  6. "tableOfContents": "跳轉到目錄導航"
  7. },
  8. "navigation": {
  9. "tableOfContents": "本頁導航",
  10. "tableOfContentsEmpty": "本頁暫無可用章節",
  11. "quickLinks": "快速鏈接",
  12. "backToDashboard": "返回儀表板",
  13. "backToTop": "回到頂部",
  14. "documentNavigation": "文檔導航",
  15. "openTableOfContents": "打開目錄導航",
  16. "pageNavigation": "頁面導航"
  17. },
  18. "codeExamples": {
  19. "label": "代碼示例 - {language}",
  20. "description": "點擊代碼塊可複製到剪貼板"
  21. },
  22. "claudeCode": {
  23. "title": "Claude Code 使用指南",
  24. "description": "Claude Code 是 Anthropic 官方推出的 AI 編程助手,支持通過 cch 代理服務使用。本指南將幫助您在不同操作系統上完成安裝和配置。",
  25. "environmentSetup": {
  26. "title": "環境準備:安裝 Node.js",
  27. "description": "claude 需要 Node.js 環境才能運行(需 v18 或更高版本)。",
  28. "macos": {
  29. "homebrew": "方法一:使用 Homebrew(推薦)",
  30. "official": "方法二:官網下載",
  31. "officialSteps": [
  32. "訪問 https://nodejs.org/",
  33. "下載適合 macOS 的 LTS 版本(需 v18 或更高)",
  34. "打開下載的 .pkg 文件,按照安裝嚮導完成"
  35. ]
  36. },
  37. "windows": {
  38. "official": "方法一:官網下載(推薦)",
  39. "officialSteps": [
  40. "訪問 https://nodejs.org/",
  41. "下載 LTS 版本(需 v18 或更高)",
  42. "雙擊 .msi 文件,按嚮導安裝(保持默認設置)"
  43. ],
  44. "packageManager": "方法二:使用包管理器",
  45. "note": "建議使用 PowerShell 而不是 CMD,以獲得更好的體驗"
  46. },
  47. "linux": {
  48. "official": "方法一:使用官方倉庫(推薦)",
  49. "packageManager": "方法二:使用系統包管理器"
  50. },
  51. "verification": {
  52. "title": "驗證 Node.js 安裝",
  53. "description": "安裝完成後,打開終端/命令行,輸入以下命令驗證:",
  54. "success": "如果顯示版本號,說明安裝成功了!",
  55. "command1": "node --version",
  56. "command2": "npm --version"
  57. }
  58. },
  59. "installation": {
  60. "title": "安裝 claude",
  61. "nativeInstall": {
  62. "title": "Native Install(推薦)",
  63. "description": "官方推薦使用 Native 安裝方式,具有以下優勢:",
  64. "advantages": ["單個可執行文件,無需 Node.js 依賴", "自動更新機制更穩定", "啟動速度更快"],
  65. "macos": {
  66. "homebrew": "方法一:Homebrew(推薦)",
  67. "autoUpdate": "自動更新說明",
  68. "autoUpdateText": "通過 Homebrew 安裝的 Claude Code 會在 brew 目錄外自動更新,除非使用 DISABLE_AUTOUPDATER 環境變量顯式禁用。",
  69. "curl": "方法二:curl 腳本",
  70. "curls": [
  71. "# 安裝穩定版(默認)",
  72. "curl -fsSL https://claude.ai/install.sh | bash",
  73. "",
  74. "# 安裝最新版",
  75. "curl -fsSL https://claude.ai/install.sh | bash -s latest",
  76. "",
  77. "# 安裝指定版本",
  78. "curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58"
  79. ]
  80. },
  81. "linux": {
  82. "curl": "curl 腳本安裝",
  83. "curls": [
  84. "# 安裝穩定版(默認)",
  85. "curl -fsSL https://claude.ai/install.sh | bash",
  86. "",
  87. "# 安裝最新版",
  88. "curl -fsSL https://claude.ai/install.sh | bash -s latest",
  89. "",
  90. "# 安裝指定版本",
  91. "curl -fsSL https://claude.ai/install.sh | bash -s 1.0.58"
  92. ],
  93. "alpine": "Alpine Linux 特殊說明",
  94. "alpineText": "基於 musl/uClibc 的發行版(如 Alpine Linux)需要安裝額外依賴:",
  95. "alpineCode": ["apk add libgcc libstdc++ ripgrep", "export USE_BUILTIN_RIPGREP=0"]
  96. },
  97. "windows": {
  98. "powershell": "方法一:PowerShell",
  99. "powershells": [
  100. "# 安裝穩定版(默認)",
  101. "irm https://claude.ai/install.ps1 | iex",
  102. "",
  103. "# 安裝最新版",
  104. "& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) latest",
  105. "",
  106. "# 安裝指定版本",
  107. "& ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 1.0.58"
  108. ],
  109. "cmd": "方法二:CMD",
  110. "cmds": [
  111. "REM 安裝穩定版(默認)",
  112. "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd",
  113. "",
  114. "REM 安裝最新版",
  115. "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd latest && del install.cmd",
  116. "",
  117. "REM 安裝指定版本",
  118. "curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd 1.0.58 && del install.cmd"
  119. ]
  120. },
  121. "verification": {
  122. "title": "驗證安裝",
  123. "description": "安裝完成後,運行以下命令驗證:",
  124. "success": "如果顯示版本號,恭喜!Claude Code 已成功安裝。",
  125. "command": "claude --version"
  126. },
  127. "tip": "提示",
  128. "tipText": "安裝前請確保移除任何過期的別名或符號鏈接。使用 claude doctor 命令可以檢查安裝類型和版本。"
  129. },
  130. "npmInstall": {
  131. "title": "NPM",
  132. "description": "使用 NPM 安裝需要先安裝 Node.js 18 或更高版本。適合偏好使用 NPM 管理工具的開發者。",
  133. "command": "npm install -g @anthropic-ai/claude-code",
  134. "warning": "警告",
  135. "warningText": "不要使用 sudo npm install -g,這可能導致權限問題和安全風險。如果遇到權限錯誤,請參考 NPM 官方解決方案。",
  136. "verification": {
  137. "title": "驗證安裝",
  138. "description": "驗證安裝",
  139. "success": "如果顯示版本號,恭喜!Claude Code 已成功安裝。"
  140. },
  141. "migration": {
  142. "title": "遷移到 Native Install",
  143. "description": "如果你已通過 NPM 全局安裝,可以使用以下命令遷移到 Native 安裝:",
  144. "command": "claude install",
  145. "note": "部分用戶可能會被自動遷移到這種安裝方式。"
  146. }
  147. }
  148. },
  149. "configuration": {
  150. "title": "連接 cch 服務",
  151. "settingsJson": {
  152. "title": "方法一:settings.json 配置(推薦)",
  153. "description": "配置文件路徑:",
  154. "pathNote": "路徑說明",
  155. "paths": [
  156. "Windows:C:/Users/你的用戶名/.claude",
  157. "Linux 或 macOS:~/.claude",
  158. "如果 settings.json 文件不存在,請自行創建"
  159. ],
  160. "instruction": "編輯 settings.json 文件,添加以下內容:",
  161. "important": "重要提示",
  162. "importantPoints": [
  163. "將 your-api-key-here 替換為您的實際 API 密鑰",
  164. "密鑰獲取方式:登錄控制台 → API 密鑰管理 → 創建密鑰"
  165. ]
  166. },
  167. "envVars": {
  168. "title": "方法二:環境變量配置",
  169. "windows": {
  170. "temporary": "臨時設置(當前會話):",
  171. "permanent": "永久設置(用戶級):",
  172. "note": "設置後需要重新打開 PowerShell 窗口才能生效。"
  173. },
  174. "unix": {
  175. "temporary": "臨時設置(當前會話):",
  176. "permanent": "永久設置:",
  177. "permanentNote": "添加到您的 shell 配置文件({shellConfig}):"
  178. }
  179. },
  180. "verification": {
  181. "title": "驗證配置",
  182. "description": "配置完成後,驗證環境變量是否設置成功:",
  183. "windowsPowerShell": "在 PowerShell 中執行:",
  184. "windowsCmd": "在 CMD 中執行:",
  185. "expectedOutput": "預期輸出示例:",
  186. "note": "注意",
  187. "noteText": "如果輸出為空或顯示變量名本身,說明環境變量設置失敗,請重新按照上述步驟設置。"
  188. }
  189. },
  190. "vsCodeExtension": {
  191. "title": "VS Code 擴展配置",
  192. "steps": [
  193. "在 VS Code 擴展中搜索並安裝 Claude Code for VS Code",
  194. "在 ~/.claude 目錄下創建 config.json 文件(如果沒有)",
  195. "添加以下內容:"
  196. ],
  197. "configPath": "設定檔路徑:{path}",
  198. "note": "注意",
  199. "notePoints": [
  200. "是 config.json,不是 settings.json",
  201. "primaryApiKey 字段值可以為任意內容,只要存在即可"
  202. ]
  203. },
  204. "startup": {
  205. "title": "啟動 claude",
  206. "description": "在項目目錄下運行:",
  207. "initNote": "首次啟動時,claude 會進行初始化配置。"
  208. },
  209. "commonIssues": {
  210. "title": "常見問題",
  211. "commandNotFound": "1. 命令未找到",
  212. "commandNotFoundWindows": [
  213. "確保 npm 全局路徑(通常是 C:\\Users\\你的用戶名\\AppData\\Roaming\\npm)已添加到系統 PATH",
  214. "重新打開 PowerShell 窗口"
  215. ],
  216. "commandNotFoundUnix": "檢查 npm 全局安裝路徑並添加到 PATH(如果不在)",
  217. "connectionFailed": "2. API 連接失敗",
  218. "updateCli": "3. 更新 claude",
  219. "updateNote": "重新運行安裝腳本即可更新到最新版本。"
  220. }
  221. },
  222. "codex": {
  223. "title": "Codex CLI 使用指南",
  224. "description": "Codex 是 OpenAI 官方的命令行 AI 編程助手,支持通過 cch 代理使用。注意:Codex 使用 OpenAI 兼容格式,端點需要包含 /v1 路徑。",
  225. "installation": {
  226. "title": "安裝 codex",
  227. "instruction": "執行:",
  228. "adminNote": "以管理員身份運行 PowerShell,",
  229. "verification": "驗證安裝:",
  230. "command": "codex --version"
  231. },
  232. "configuration": {
  233. "title": "連接 cch 服務",
  234. "configFile": {
  235. "title": "配置文件設置",
  236. "steps": [
  237. "打開文件資源管理器,找到 ${configPath} 文件夾(不存在則創建)",
  238. "創建 config.toml 文件",
  239. "使用文本編輯器打開,添加以下內容:"
  240. ],
  241. "step4": "創建 auth.json 文件,添加:",
  242. "important": "重要提示",
  243. "importantPoints": [
  244. "將 your-api-key-here 替換為您的 cch API 密鑰",
  245. "注意:Codex 使用 OpenAI 兼容格式,端點包含 /v1 路徑"
  246. ]
  247. },
  248. "authJson": {
  249. "title": "配置文件方式",
  250. "configTomlDescription": "創建 config.toml 文件(使用 auth.json 存儲密鑰時,無需 env_key 字段):",
  251. "note": "提示",
  252. "noteText": "此方式通過 auth.json 文件存儲 API 密鑰,config.toml 中無需配置 env_key 字段。"
  253. },
  254. "envVars": {
  255. "title": "環境變量方式",
  256. "configTomlDescription": "創建 config.toml 文件(使用環境變量時,需要配置 env_key 字段):",
  257. "windows": {
  258. "instruction": "在 PowerShell 中運行:",
  259. "note": "設置後需要重新打開 PowerShell 窗口才能生效。"
  260. },
  261. "unix": {
  262. "instruction": "設置環境變量:"
  263. }
  264. }
  265. },
  266. "vsCodeExtension": {
  267. "title": "VS Code 擴展配置",
  268. "steps": [
  269. "在 VS Code 擴展中搜索並安裝 Codex – OpenAI's coding agent",
  270. "確保已按照上述步驟配置好 config.toml 和 auth.json",
  271. "設置環境變量 CCH_API_KEY"
  272. ],
  273. "important": "重要",
  274. "importantText": "env_key 只能是環境變量名稱(如 CCH_API_KEY),不能是完整的密鑰。如果直接填寫密鑰,會報錯找不到令牌或令牌配置錯誤。"
  275. },
  276. "startup": {
  277. "title": "啟動 codex",
  278. "description": "在項目目錄下運行:",
  279. "initNote": "首次啟動時,codex 會進行初始化配置。"
  280. },
  281. "commonIssues": {
  282. "title": "常見問題",
  283. "commandNotFound": "1. 命令未找到",
  284. "commandNotFoundWindows": [
  285. "確保 npm 全局路徑(通常是 C:\\Users\\你的用戶名\\AppData\\Roaming\\npm)已添加到系統 PATH",
  286. "重新打開 PowerShell 窗口"
  287. ],
  288. "commandNotFoundUnix": "檢查 npm 全局安裝路徑並添加到 PATH(如果不在)",
  289. "connectionFailed": "2. API 連接失敗",
  290. "updateCli": "3. 更新 codex",
  291. "updateCommand": "npm i -g @openai/codex --registry=https://registry.npmmirror.com"
  292. }
  293. },
  294. "gemini": {
  295. "title": "Gemini CLI 使用指南",
  296. "description": "Gemini CLI 是 Google 官方的 AI 編程助手命令行工具,支持通過 cch 代理服務使用。本指南將幫助您在不同操作系統上完成安裝和配置。",
  297. "installation": {
  298. "title": "安裝 gemini",
  299. "instruction": "確保您已安裝 Node.js 18 或更高版本,然後全局安裝 Gemini CLI:",
  300. "command": "npm install -g @google/gemini-cli",
  301. "verification": "驗證安裝:",
  302. "verificationCommand": "gemini --version",
  303. "adminNote": "以管理員身份運行 PowerShell,"
  304. },
  305. "configuration": {
  306. "title": "連接 cch 服務",
  307. "configFile": {
  308. "title": "方法一:配置文件方式(推薦)",
  309. "step1": {
  310. "title": "創建配置目錄",
  311. "description": "Gemini CLI 的配置文件位於 ~/.gemini/ 目錄。",
  312. "macosLinux": "macOS / Linux:",
  313. "windows": "Windows (PowerShell):"
  314. },
  315. "step2": {
  316. "title": "創建 .env 配置文件",
  317. "description": "在 ~/.gemini/ 目錄下創建 .env 文件:",
  318. "macosLinuxInstruction": "macOS / Linux:",
  319. "windowsInstruction": "Windows:在 %USERPROFILE%\\.gemini\\ 目錄下創建 .env 文件",
  320. "content": "添加以下內容:"
  321. },
  322. "step3": {
  323. "title": "創建 settings.json 配置文件",
  324. "description": "在 ~/.gemini/ 目錄下創建 settings.json 文件:",
  325. "content": "這個配置文件啟用了 IDE 集成,並設置認證方式為 API Key。"
  326. },
  327. "parameterNote": "參數說明",
  328. "parameters": [
  329. "GOOGLE_GEMINI_BASE_URL: cch API 基礎地址",
  330. "GEMINI_API_KEY: 您在 cch 控制台創建的 API 密鑰",
  331. "GEMINI_MODEL: 使用的模型(默認為 gemini-2.5-pro)"
  332. ],
  333. "important": "重要提示",
  334. "importantPoints": [
  335. "將 YOUR_API_KEY_HERE 替換為您的實際 API 密鑰",
  336. "密鑰獲取方式:登錄控制台 → API 密鑰管理 → 創建密鑰"
  337. ]
  338. },
  339. "envVars": {
  340. "title": "方法二:環境變量配置",
  341. "description": "如果您只想臨時使用,可以通過環境變量配置:",
  342. "macosLinux": {
  343. "title": "macOS / Linux:",
  344. "note": "環境變量只在當前終端會話中有效。如需持久化配置,請使用配置文件方式。"
  345. },
  346. "windows": {
  347. "powershell": "Windows (PowerShell):",
  348. "cmd": "Windows (CMD):",
  349. "note": "環境變量只在當前終端會話中有效。如需持久化配置,請使用配置文件方式。"
  350. }
  351. }
  352. },
  353. "startup": {
  354. "title": "啟動和驗證",
  355. "startCli": {
  356. "title": "啟動 Gemini CLI",
  357. "description": "進入您的項目目錄並啟動 Gemini CLI:",
  358. "note": "首次啟動時,Gemini CLI 會讀取配置文件中的設置。"
  359. },
  360. "verification": {
  361. "title": "驗證配置",
  362. "description": "在 Gemini CLI 中嘗試發送一個簡單的請求測試連接:",
  363. "testCommand": "你好,請幫我創建一個 Python 的 hello world 程序",
  364. "success": "如果 Gemini CLI 正常響應,說明配置成功!"
  365. },
  366. "agentMode": {
  367. "title": "使用 Agent Mode",
  368. "description": "Gemini CLI 支持 Agent Mode,可以自動規劃和執行複雜任務:",
  369. "command": "gemini --agent",
  370. "features": "在 Agent Mode 下,Gemini 會:",
  371. "featureList": [
  372. "自動分析任務需求",
  373. "制定執行計劃",
  374. "逐步執行並驗證結果",
  375. "根據反饋調整策略"
  376. ]
  377. }
  378. },
  379. "commonIssues": {
  380. "title": "常見問題",
  381. "commandNotFound": "1. 命令未找到",
  382. "commandNotFoundWindows": [
  383. "確保 npm 全局路徑(通常是 C:\\Users\\你的用戶名\\AppData\\Roaming\\npm)已添加到系統 PATH",
  384. "重新打開 PowerShell 窗口"
  385. ],
  386. "commandNotFoundUnix": "檢查 npm 全局安裝路徑並添加到 PATH(如果不在)",
  387. "connectionFailed": "2. API 連接失敗",
  388. "connectionSteps": [
  389. "檢查環境變量或配置文件中的 GEMINI_API_KEY 是否設置正確",
  390. "驗證 GOOGLE_GEMINI_BASE_URL 是否正確",
  391. "測試網絡連接"
  392. ],
  393. "updateCli": "3. 更新 gemini",
  394. "updateCommand": "npm install -g @google/gemini-cli"
  395. }
  396. },
  397. "opencode": {
  398. "title": "OpenCode 使用指南",
  399. "description": "OpenCode 是一款在終端中運行的 CLI + TUI AI 編程代理工具,也提供 IDE 插件集成。你可以將 OpenCode 指向 cch 作為統一入口接入 Claude、GPT 與 Gemini 等模型。",
  400. "installation": {
  401. "title": "安裝",
  402. "macos": {
  403. "description": "在 macOS 上可以選擇以下任一方式安裝 OpenCode:",
  404. "homebrew": {
  405. "title": "方式二:Homebrew",
  406. "description": "也可以使用 Homebrew 安裝:"
  407. }
  408. },
  409. "linux": {
  410. "description": "在 Linux 上可以選擇以下任一方式安裝 OpenCode:",
  411. "homebrew": {
  412. "title": "方式二:Homebrew",
  413. "description": "也可以使用 Homebrew 安裝:"
  414. },
  415. "paru": {
  416. "title": "方式五:Paru(Arch Linux)",
  417. "description": "如果你使用 Arch Linux,也可以通過 paru(AUR)安裝:"
  418. }
  419. },
  420. "script": {
  421. "title": "方式一:官方安裝腳本",
  422. "description": "執行以下命令安裝最新版:"
  423. },
  424. "npm": {
  425. "title": "方式三:npm",
  426. "description": "也可以通過 npm 全局安裝:",
  427. "note": "提示:不建議透過 npm 鏡像源/第三方 registry 安裝 opencode-ai,可能會導致依賴缺失;如遇問題請改用官方 npm registry。"
  428. },
  429. "bun": {
  430. "title": "方式四:Bun",
  431. "description": "如果你使用 Bun,也可以全局安裝:"
  432. },
  433. "windows": {
  434. "description": "Windows 推薦使用包管理器(Chocolatey/Scoop),也可以使用 npm:",
  435. "choco": {
  436. "title": "方式一:Chocolatey",
  437. "description": "使用 Chocolatey 安裝:",
  438. "command": "choco install opencode"
  439. },
  440. "scoop": {
  441. "title": "方式二:Scoop",
  442. "description": "使用 Scoop 安裝:",
  443. "command": "scoop bucket add extras\nscoop install extras/opencode"
  444. },
  445. "note": "提示:官方說明 Windows 上通過 Bun 安裝仍在推進。建議使用 Chocolatey/Scoop/npm,或從 GitHub Releases 下載二進制。"
  446. }
  447. },
  448. "configuration": {
  449. "title": "連接 cch 服務",
  450. "configFile": {
  451. "title": "配置 opencode.json",
  452. "path": "配置文件路徑:",
  453. "instruction": "編輯配置文件,寫入以下內容(只需一份配置文件即可覆蓋全部模型):",
  454. "important": "重要說明",
  455. "importantPoints": [
  456. "請先在 cch 後台創建 API Key,並設置環境變量 CCH_API_KEY",
  457. "cchClaude/openai 使用 ${resolvedOrigin}/v1,cchGemini 使用 ${resolvedOrigin}/v1beta",
  458. "模型選擇時使用 provider_id/model_id 格式(例如 openai/gpt-5.2 或 cchClaude/claude-sonnet-4-5-20250929)"
  459. ]
  460. },
  461. "modelSelection": {
  462. "title": "選擇模型",
  463. "description": "啟動 OpenCode 後,在 TUI 中輸入以下命令查看/選擇模型:",
  464. "command": "/models"
  465. }
  466. },
  467. "startup": {
  468. "title": "啟動 opencode",
  469. "description": "在項目目錄下運行:",
  470. "initNote": "首次啟動時,opencode 會加載配置並創建會話。"
  471. },
  472. "commonIssues": {
  473. "title": "常見問題",
  474. "commandNotFound": "1. 命令未找到",
  475. "commandNotFoundWindows": [
  476. "如果使用 npm 安裝,請確保 npm 全局路徑已添加到系統 PATH",
  477. "重新打開終端窗口後再試"
  478. ],
  479. "commandNotFoundUnix": "檢查安裝路徑並添加到 PATH(例如 ~/.local/bin 或 npm 全局目錄)",
  480. "connectionFailed": "2. API 連接失敗",
  481. "updateCli": "3. 更新 opencode"
  482. }
  483. },
  484. "droid": {
  485. "title": "Droid CLI 使用指南",
  486. "description": "Droid 是 Factory AI 開發的交互式終端 AI 編程助手,支持通過 cch 代理服務使用。使用前必須先註冊並登錄 Droid 官方賬號。",
  487. "installation": {
  488. "title": "安裝 droid",
  489. "linux": {
  490. "instruction": "執行:",
  491. "note": "Linux 用戶需確保已安裝 xdg-utils:",
  492. "command": "sudo apt-get install xdg-utils"
  493. },
  494. "windows": {
  495. "instruction": "在 PowerShell 中執行:"
  496. }
  497. },
  498. "configuration": {
  499. "title": "連接 cch 服務",
  500. "prerequisite": "前置步驟:必須先登錄 Droid 官方賬號",
  501. "prerequisiteSteps": [
  502. "運行 droid 命令",
  503. "按提示通過瀏覽器登錄 Factory 官方賬號",
  504. "登錄成功後,才能繼續配置自定義模型"
  505. ],
  506. "customModels": {
  507. "title": "配置自定義模型",
  508. "path": "配置文件路徑:",
  509. "instruction": "編輯配置文件,添加以下內容:",
  510. "important": "重要說明",
  511. "importantPoints": [
  512. "將 your-api-key-here 替換為您的 cch API 密鑰",
  513. "Anthropic 格式:使用 ${resolvedOrigin}(無 /v1)",
  514. "OpenAI 格式:使用 ${resolvedOrigin}/v1(需要 /v1)"
  515. ]
  516. },
  517. "switching": {
  518. "title": "切換模型",
  519. "steps": [
  520. "重啟 Droid",
  521. "輸入 /model 命令",
  522. "選擇 GPT-5-Codex [cch] 或 Sonnet 4.5 [cch]",
  523. "開始使用!"
  524. ]
  525. }
  526. },
  527. "startup": {
  528. "title": "啟動 droid",
  529. "description": "在項目目錄下運行以下命令:",
  530. "initNote": "首次啟動時,droid 會進行初始化配置。"
  531. },
  532. "commonIssues": {
  533. "title": "常見問題",
  534. "commandNotFound": "1. 找不到命令",
  535. "commandNotFoundWindows": [
  536. "確保 npm 全局路徑(通常為 C:\\Users\\your-username\\AppData\\Roaming\\npm)已添加到系統 PATH",
  537. "重新打開 PowerShell 窗口"
  538. ],
  539. "commandNotFoundUnix": "檢查 npm 全局安裝路徑,並添加到 PATH(如果尚未添加)",
  540. "updateCli": "2. 更新 droid"
  541. }
  542. },
  543. "commonCommands": {
  544. "title": "常用命令",
  545. "description": "啟動 Claude Code 後,您可以使用以下常用命令:",
  546. "commands": [
  547. { "command": "/help", "description": "查看幫助信息" },
  548. { "command": "/clear", "description": "清空對話歷史,開啟新對話" },
  549. { "command": "/compact", "description": "總結當前對話" },
  550. { "command": "/cost", "description": "查看當前對話已使用的金額" },
  551. { "command": "/model", "description": "切換模型(Droid 專用)" }
  552. ],
  553. "moreCommands": "更多命令查看 官方文檔"
  554. },
  555. "troubleshooting": {
  556. "title": "通用故障排查",
  557. "installationFailed": {
  558. "title": "安裝失敗",
  559. "steps": [
  560. "檢查網絡連接是否正常",
  561. "確保有管理員權限(Windows)或使用 sudo(macOS / Linux)",
  562. "嘗試使用代理或鏡像源(npm 可使用 --registry 參數)"
  563. ]
  564. },
  565. "invalidApiKey": {
  566. "title": "API 密鑰無效",
  567. "steps": [
  568. "確認密鑰已正確複製(無多餘空格)",
  569. "檢查密鑰是否在有效期內",
  570. "驗證賬戶權限是否正常",
  571. "確認使用了正確的端點格式(Anthropic 無 /v1,OpenAI 有 /v1)"
  572. ]
  573. },
  574. "endpointConfigError": {
  575. "title": "端點配置錯誤",
  576. "points": [
  577. "Claude Code / Droid Anthropic 模型:使用 ${resolvedOrigin}(無 /v1)",
  578. "Codex / Droid OpenAI 模型:使用 ${resolvedOrigin}/v1(必須包含 /v1)"
  579. ]
  580. }
  581. },
  582. "platforms": {
  583. "macos": "macOS",
  584. "windows": "Windows",
  585. "linux": "Linux"
  586. },
  587. "placeholders": {
  588. "windowsUserName": "你的用戶名",
  589. "shellConfig": {
  590. "linux": "~/.bashrc",
  591. "macos": "~/.zshrc"
  592. },
  593. "codexVsCodeConfigFiles": "config.toml 和 auth.json"
  594. },
  595. "snippets": {
  596. "comments": {
  597. "updateHomebrew": "# 更新 Homebrew",
  598. "installNodeJs": "# 安裝 Node.js",
  599. "usingChocolatey": "# 使用 Chocolatey",
  600. "orUsingScoop": "# 或使用 Scoop",
  601. "addNodeSourceRepo": "# 添加 NodeSource 倉庫",
  602. "ubuntuDebian": "# Ubuntu/Debian",
  603. "centosRhelFedora": "# CentOS/RHEL/Fedora",
  604. "addToPathIfMissing": "# 添加到 PATH(如果不在)",
  605. "checkEnvVar": "# 檢查環境變數",
  606. "testNetworkConnection": "# 測試網路連線"
  607. }
  608. },
  609. "layout": {
  610. "headerTitle": "使用文檔",
  611. "loginConsole": "登入控制台"
  612. },
  613. "ui": {
  614. "mainContent": "文檔內容",
  615. "main": "main",
  616. "currentSiteAddress": "當前站點地址"
  617. }
  618. }