PageSourceSearch

https://xyc.ai/static/js/async/435.7de66ddc43.js

js xyc.ai collected 2026-10-05 14:39:12 UTC 38,173 bytes, 1 lines download raw bytes

1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[435],{75066(){},69439(){},62254(e,i,n){n.d(i,{w:()=>d});var s=n(72361);n(68413);var a=n(81204);let t="96px",o="52px",l="12px",r=`polygon(0 0, calc(100% - ${t}) 0, calc(100% - ${o}) ${l}, 100% ${l}, 100% 100%, 0 100%)`,c=`polygon(0 0, calc(100% - ${t} + 1.5px) 0, calc(100% - ${o} + 0.5px) calc(${l} - 0.5px), 100% calc(${l} - 0.5px), 100% 100%, 0 100%)`;function d(e){let{title:i,className:n,children:t,...o}=e;return(0,s.jsxs)("div",{"data-slot":"cut-corner-card",className:(0,a.cn)("relative isolate",n),...o,children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"bg-border-strong absolute inset-0 -z-10",style:{clipPath:r}}),(0,s.jsx)("span",{"aria-hidden":!0,className:"bg-background absolute inset-px -z-10",style:{clipPath:c}}),(0,s.jsxs)("div",{className:"px-4 pt-3 pb-3.5",children:[null!=i&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h3",{className:"text-foreground pr-24 text-sm font-medium",children:i}),(0,s.jsx)("div",{className:"border-border-strong mt-2.5 mb-2.5 border-t border-dotted"})]}),t]})]})}},98302(e,i,n){n.d(i,{h:()=>d});var s=n(72361),a=n(71114),t=n(20032),o=n(61631),l=n(17926),r=n(89518),c=n(3773);function d(e){let i=e.lang??"zh",n=(0,c.P)(i),{auth:d}=(0,t.n)(),m=!!d.user;return(0,s.jsx)("footer",{className:"footer home-footer",children:(0,s.jsxs)("div",{className:"footer-inner home-footer-inner",children:[(0,s.jsxs)("div",{className:"footer-grid home-footer-grid",children:[(0,s.jsxs)("div",{className:"footer-about home-footer-brand",children:[(0,s.jsx)("a",{href:"/",className:"home-footer-logo","aria-label":"XycAi",children:(0,s.jsx)(l.O,{className:"home-footer-logo-image"})}),(0,s.jsx)("p",{children:n.footer.statement})]}),(0,s.jsxs)("div",{className:"footer-col home-footer-column",children:[(0,s.jsxs)("span",{className:"home-footer-column-rule","aria-hidden":"true",children:[(0,s.jsx)("span",{children:"+"}),(0,s.jsx)("span",{children:"+"})]}),(0,s.jsx)("h4",{children:n.footer.business}),(0,s.jsx)("a",{href:"/#token-platform",children:n.footer.token}),(0,s.jsx)("a",{href:"/#ai-custom",children:n.footer.aiCustom}),(0,s.jsx)("a",{href:"/#gpu-compute",children:n.footer.gpu})]}),(0,s.jsxs)("div",{className:"footer-col home-footer-column",children:[(0,s.jsxs)("span",{className:"home-footer-column-rule","aria-hidden":"true",children:[(0,s.jsx)("span",{children:"+"}),(0,s.jsx)("span",{children:"+"})]}),(0,s.jsx)("h4",{children:n.footer.resources}),(0,s.jsx)(a.N_,{to:"/model-square",children:n.footer.models}),(0,s.jsx)(a.N_,{to:"/download",children:n.footer.download}),(0,s.jsxs)("a",{href:"https://docs.xyc.ai/",target:"_blank",rel:"noreferrer",children:[n.footer.docs,(0,s.jsx)(o.F1e,{"aria-hidden":"true"})]}),(0,s.jsx)("a",{href:"/news/",children:n.footer.news}),(0,s.jsx)("button",{type:"button",onClick:r.Uq,className:"footer-link-btn home-footer-button",children:n.footer.support}),m?(0,s.jsx)(a.N_,{to:"/dashboard",children:n.nav.dashboard}):(0,s.jsx)(a.N_,{to:"/sign-in",children:n.nav.login})]}),(0,s.jsxs)("div",{className:"footer-col home-footer-column",children:[(0,s.jsxs)("span",{className:"home-footer-column-rule","aria-hidden":"true",children:[(0,s.jsx)("span",{children:"+"}),(0,s.jsx)("span",{children:"+"})]}),(0,s.jsx)("h4",{children:n.footer.legal}),(0,s.jsx)(a.N_,{to:"/privacy-policy",children:n.footer.privacy}),(0,s.jsx)(a.N_,{to:"/user-agreement",children:n.footer.terms}),(0,s.jsx)(a.N_,{to:"/cookie-policy",children:n.footer.cookies})]}),(0,s.jsxs)("div",{className:"footer-col home-footer-contact",children:[(0,s.jsxs)("span",{className:"home-footer-column-rule","aria-hidden":"true",children:[(0,s.jsx)("span",{children:"+"}),(0,s.jsx)("span",{children:"+"})]}),(0,s.jsx)("h4",{children:n.footer.contact}),(0,s.jsx)("a",{href:"mailto:[email protected]",children:n.footer.sales}),(0,s.jsxs)("a",{href:"https://docs.xyc.ai/",target:"_blank",rel:"noreferrer",children:[n.footer.support,(0,s.jsx)(o.F1e,{"aria-hidden":"true"})]}),(0,s.jsxs)("div",{className:"home-footer-contact-actions",children:[(0,s.jsxs)("a",{className:"home-footer-contact-primary",href:"mailto:[email protected]",children:[n.footer.contact,(0,s.jsx)(o.F1e,{"aria-hidden":"true"})]}),(0,s.jsxs)(a.N_,{className:"home-footer-contact-secondary",to:"/sign-up",children:[n.nav.signup,(0,s.jsx)(o.F1e,{"aria-hidden":"true"})]})]})]})]}),(0,s.jsxs)("div",{className:"home-footer-company",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"XYCAI"}),(0,s.jsx)("span",{children:"1500 N Grant St Ste R, Denver, CO 80203, US"}),(0,s.jsx)("span",{children:"Unit 437, 20-28 Porter Street, Ryde, NSW 2112, Australia"})]}),(0,s.jsxs)("a",{href:"mailto:[email protected]",children:[n.footer.sales,": [email protected]"]})]}),(0,s.jsx)("div",{className:"footer-bottom home-footer-bottom",children:(0,s.jsx)("div",{className:"footer-copy",children:"© 2025–2026 XycAi INC. 保留所有权利。"})})]})})}n(75066),n(69439)},99170(e,i,n){n.d(i,{H:()=>t});var s=n(68413),a=n(38610);function t(e){let{systemName:i}=(0,a.R)();(0,s.useEffect)(()=>{let n=document.title;return document.title=i?`${e} - ${i}`:e,()=>{document.title=n}},[e,i])}},65822(e,i,n){n.r(i),n.d(i,{component:()=>N});var s=n(72361),a=n(68413),t=n(71114),o=n(20032),l=n(61631),r=n(99170),c=n(27953),d=n(77405),m=n(31005),p=n(23780),h=n(62254),u=n(34151),x=n(92170),j=n(98302),f=n(13260);n(75066);let w={zh:{meta:{title:"一键接入安装 | XycAi CLI",description:"使用 npx xycai 在 macOS 或 Windows 上安装并配置 CodeX、Claude Code,一步接入 XycAi API。"},badge:"XYCAI CLI · CODEX / CLAUDE CODE",title:"一键接入安装",description:"在终端运行一个命令,向导会安装或更新官方客户端、备份原配置,并写入 XycAi API 地址与本机 API Key。支持 CodeX 和 Claude Code。",commandTitle:"从这里开始",commandDescription:"请在 macOS Terminal、Windows Terminal、PowerShell 或命令提示符中运行。不要在浏览器控制台中执行。",copyCommand:"复制安装命令",copied:"已复制",getKey:"登录获取 API Key",sourceCode:"查看 GitHub 源码",facts:[{title:"无需全局安装 xycai",description:"npx 会临时下载并运行当前发布的 xycai 安装向导。"},{title:"支持两种客户端",description:"根据提示选择 CodeX 或 Claude Code,可随时重新运行切换。"},{title:"写入前自动备份",description:"现有配置会在同目录生成带时间戳的 .bak 文件。"},{title:"配置保存在本机",description:"API Key 与客户端配置写入当前系统用户的主目录。"}],requirementsTitle:"开始前准备",requirementsDescription:"为了同时兼容当前 CodeX 与 Claude Code 官方客户端,建议先满足以下条件。",requirements:[{title:"Node.js 22 或更高版本",description:"推荐安装当前 Node.js LTS。旧版 Node 可能可以运行 xycai,但无法安装最新版 Claude Code。"},{title:"npm 与 npx 可用",description:"Node.js 官方安装包与 Homebrew/winget 的 Node.js LTS 都会同时安装 npm 和 npx。"},{title:"一个 XycAi API Key",description:"可以先打开本页,再登录接口控制创建 Key。不要把完整 Key 发给任何人。"}],platformTitle:"按系统安装",platformDescription:"先完成 Node.js 环境检查,再运行安装向导。每个命令都可以直接复制。",macLabel:"macOS",windowsLabel:"Windows",mac:{title:"macOS 完整安装步骤",description:"适用于 Apple 芯片和 Intel Mac。推荐使用 Homebrew 安装 Node.js,也可以使用 Node.js 官方安装包。",officialInstaller:"打开 Node.js 官方下载页",homebrew:"打开 Homebrew 官网",steps:[{title:"打开 Terminal",description:"按 Command + Space 打开 Spotlight,输入 Terminal 并回车。建议使用当前普通用户,不要切换到 root。"},{title:"检查 Node.js、npm 与 npx",description:"依次运行下面命令。Node.js 应为 v22 或更高版本;三个命令都应输出版本号。",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"缺少 Node.js 时安装当前 LTS",description:"已经安装 Homebrew 时运行 brew 命令。没有 Homebrew 时,可从 Node.js 官网下载 macOS Installer,安装完成后关闭并重新打开 Terminal。",commands:[{label:"Homebrew",value:"brew install node"},{label:"安装后验证",value:"node --version && npm --version && np
1x --version"}],note:"Apple 芯片电脑若提示 brew: command not found,请按 Homebrew 安装结束时给出的 shellenv 提示配置 PATH,然后重开 Terminal。"},{title:"运行 XycAi 安装向导",description:"npx 会从 npm 注册表下载并运行 xycai。首次运行时等待依赖下载,然后按方向键和回车完成交互。",commands:[{value:"npx xycai"}],note:"不要使用 sudo npx xycai,否则配置可能写入 root 用户目录,后续普通用户无法正常使用。"},{title:"启动已选择的客户端",description:"向导完成后关闭并重新打开 Terminal。如果配置的是 CodeX,运行 codex;如果配置的是 Claude Code,运行 claude。",commands:[{value:"codex"},{value:"claude"}]}]},windows:{title:"Windows 完整安装步骤",description:"适用于 Windows 10/11。推荐使用 Windows Terminal 或 PowerShell,Node.js 可通过 winget 或官方 MSI 安装。",officialInstaller:"打开 Node.js 官方下载页",winget:"了解 Windows Package Manager",steps:[{title:"打开 Windows Terminal 或 PowerShell",description:"在开始菜单搜索 Windows Terminal 或 PowerShell。通常使用普通用户即可;只有 winget 明确要求时才提升为管理员。"},{title:"检查 Node.js、npm 与 npx",description:"逐条运行下面命令。Node.js 应为 v22 或更高版本,npm 和 npx 也必须能输出版本号。",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"缺少 Node.js 时安装当前 LTS",description:"Windows 10/11 可直接使用 winget。安装完成后务必关闭当前终端窗口并重新打开,让 PATH 环境变量生效。没有 winget 时使用 Node.js 官方 Windows Installer。",commands:[{label:"winget",value:"winget install --id OpenJS.NodeJS.LTS -e"},{label:"重开终端后验证",value:"node --version\nnpm --version\nnpx --version"}]},{title:"运行 XycAi 安装向导",description:"正常情况下运行 npx xycai。若 PowerShell 提示 npx.ps1 因执行策略被禁止,优先改用 npx.cmd,不需要关闭系统脚本保护。",commands:[{label:"常规命令",value:"npx xycai"},{label:"PowerShell 执行策略拦截时",value:"npx.cmd xycai"}]},{title:"启动已选择的客户端",description:"向导完成后重开终端。CodeX 使用 codex,Claude Code 使用 claude。若提示命令不存在,先检查 npm 全局命令目录是否已加入 PATH。",commands:[{value:"codex"},{value:"claude"},{label:"定位命令",value:"where.exe codex\nwhere.exe claude"}]}]},wizardTitle:"向导里会发生什么",wizardDescription:"xycai 是交互式工具,不需要记忆参数。完整流程如下,任何覆写操作都会先征得确认。",wizardSteps:[{title:"选择向导语言",description:"工具会自动检测系统语言,也可以手动选择 English、简体中文或日本語。"},{title:"选择 CodeX 或 Claude Code",description:"每次运行配置一个客户端。需要切换时再次执行 npx xycai。"},{title:"确认是否安装或更新官方 CLI",description:"CodeX 对应 npm install -g @openai/codex;Claude Code 对应 npm install -g @anthropic-ai/claude-code。可以跳过并使用已有版本。"},{title:"确认备份并覆写配置",description:"工具会先复制现有配置为带时间戳的 .bak 文件,再写入完整的 XycAi 配置模板。"},{title:"输入 API Key 与客户端选项",description:"CodeX 会要求选择当前向导提供的默认模型;Claude Code 可确认或修改 XycAi Base URL。模型选项以运行时向导为准。"},{title:"写入完成并启动客户端",description:"完成后运行 codex 或 claude。再次运行 npx xycai 可以重新配置或切换客户端。"}],configTitle:"写入的配置与位置",configDescription:"路径中的 ~ 或 $HOME 代表当前系统用户的主目录。Windows 上对应 C:\\Users\\你的用户名。",macPathsLabel:"macOS 路径",windowsPathsLabel:"Windows 路径",configCards:[{title:"CodeX",description:"配置 XycAi 模型提供方、Responses 接口和本机 API Key。",macPaths:["~/.codex/config.toml","~/.codex/auth.json"],windowsPaths:["$HOME\\.codex\\config.toml","$HOME\\.codex\\auth.json"],details:["默认 API 地址:https://apicdn.xyc.ai/v1","config.toml 使用 xycai 模型æ
1ä¾›æ–¹ä¸Ž Responses 接口。","auth.json 保存 OPENAI_API_KEY。"]},{title:"Claude Code",description:"写入 Claude Code 环境变量、XycAi Base URL 与超时设置。",macPaths:["~/.claude/settings.json"],windowsPaths:["$HOME\\.claude\\settings.json"],details:["默认 API 地址:https://apicdn.xyc.ai/","settings.json 保存 ANTHROPIC_API_KEY 与 ANTHROPIC_BASE_URL。","向导允许改用其他可信的 XycAi HTTPS 边缘地址。"]},{title:"自动备份",description:"原文件存在时,备份与原文件放在同一目录。",macPaths:["config.toml.YYYYMMDD-HHMMSS.bak"],windowsPaths:["config.toml.YYYYMMDD-HHMMSS.bak"],details:["备份在覆写前创建。","恢复时将需要的 .bak 文件复制回原文件名。","备份可能包含旧 API Key,也需要妥善保管。"]}],troubleshootingTitle:"常见问题与恢复",troubleshootingDescription:"优先使用下面的非破坏性检查。不要随意删除整个 .codex 或 .claude 目录。",issues:[{title:"npx、node 或 npm 提示找不到命令",description:"关闭所有终端并重新打开,再检查版本。仍不可用时重新安装 Node.js LTS,确认安装程序已把 Node 加入 PATH。",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"PowerShell 阻止运行 npx.ps1",description:"使用 npx.cmd xycai 或切换到命令提示符。该方法无需降低 PowerShell 执行策略。",commands:[{value:"npx.cmd xycai"}]},{title:"npm 下载失败或拿到旧缓存",description:"先确认 npm 注册表可访问,再强制使用当前发布版本。公司代理或第三方镜像可能尚未同步 xycai。",commands:[{value:"npm ping"},{value:"npm config get registry"},{value:"npm view xycai version"},{value:"npx --prefer-online xycai@latest"}]},{title:"macOS 全局安装提示权限不足",description:"不要用 sudo 运行 xycai。推荐通过 Homebrew 或 Node 版本管理器安装 Node.js,再重新运行向导。sudo 会把配置写到错误的用户目录。"},{title:"codex 或 claude 安装后仍找不到",description:"重开终端并查看 npm 全局前缀。Windows 还可以用 where.exe 定位命令;macOS 可用 command -v。",commands:[{value:"npm config get prefix"},{label:"macOS",value:"command -v codex\ncommand -v claude"},{label:"Windows",value:"where.exe codex\nwhere.exe claude"}]},{title:"需要恢复原配置",description:"在对应目录找到最新的时间戳 .bak 文件,确认内容后复制回原文件名。恢复前建议再复制一份当前文件。",commands:[{label:"macOS 查找备份",value:"find ~/.codex ~/.claude -maxdepth 1 -name '*.bak' -print 2>/dev/null"},{label:"Windows PowerShell 查找备份",value:'Get-ChildItem "$HOME\\.codex","$HOME\\.claude" -Filter "*.bak" | Sort-Object LastWriteTime -Descending'},{label:"macOS 示例",value:"cp ~/.codex/config.toml.YYYYMMDD-HHMMSS.bak ~/.codex/config.toml"},{label:"Windows PowerShell 示例",value:'Copy-Item "$HOME\\.codex\\config.toml.YYYYMMDD-HHMMSS.bak" "$HOME\\.codex\\config.toml" -Force'}]}],securityTitle:"安全说明",securityDescription:"npx 会下载并执行 npm 包,而客户端配置需要保存 API Key。请在运行前了解以下边界。",securityItems:["只在你信任的电脑与系统用户下运行 npx xycai。","API Key 以明文写入本机客户端配置;不要分享配置文件、终端录屏或 .bak 备份。","不要使用 sudo npx xycai,也不要为了运行 npx 永久关闭 PowerShell 执行策略。","Claude Code 自定义 Base URL 时,只使用你确认属于 XycAi 的 HTTPS 地址。","如果 Key 曾出现在截图、聊天或公开仓库中,请立即在接口控制删除并重新创建。"],finishTitle:"准备好后,运行一次命令即可",finishDescription:"创建 API Key,打开终端执行 npx xycai,然后根据向导选择 CodeX 或 Claude Code。",rerunCommand:"重新配置命令",stepLabel:"步骤",commandLabel:"命令",noteLabel:"注意"},en:{meta:{title:"Quick Install | XycAi CLI",description:"Install and configure CodeX or Claude Code on macOS and Windows with npx xycai, then connect to the XycAi API."},badge:"XYCAI CLI · CODEX / CLAUDE CODE",title:"One-command setup",de
1scription:"Run one terminal command. The wizard can install or update the official client, back up existing configuration, and write the XycAi API endpoint and local API key for CodeX or Claude Code.",commandTitle:"Start here",commandDescription:"Run this in macOS Terminal, Windows Terminal, PowerShell, or Command Prompt. Do not run it in a browser console.",copyCommand:"Copy install command",copied:"Copied",getKey:"Sign in for an API key",sourceCode:"View source on GitHub",facts:[{title:"No global xycai install",description:"npx downloads and runs the currently published xycai setup wizard temporarily."},{title:"Two supported clients",description:"Choose CodeX or Claude Code and rerun the wizard whenever you need to switch."},{title:"Backups before writes",description:"Existing files receive adjacent timestamped .bak copies before replacement."},{title:"Local configuration",description:"The API key and client settings are written under the current user home directory."}],requirementsTitle:"Before you begin",requirementsDescription:"Use the following baseline to remain compatible with the current official CodeX and Claude Code clients.",requirements:[{title:"Node.js 22 or newer",description:"The current Node.js LTS is recommended. Older Node releases may run xycai but cannot install the latest Claude Code."},{title:"Working npm and npx",description:"The official Node installer and Node installed through Homebrew or winget include npm and npx."},{title:"An XycAi API key",description:"Open this guide first, then sign in to create a key. Never send the complete key to another person."}],platformTitle:"Install for your system",platformDescription:"Verify Node.js first, then run the wizard. Every command below can be copied directly.",macLabel:"macOS",windowsLabel:"Windows",mac:{title:"Complete macOS setup",de
1scription:"Works on Apple silicon and Intel Macs. Homebrew is recommended, while the official Node installer is also supported.",officialInstaller:"Open the Node.js download page",homebrew:"Open the Homebrew website",steps:[{title:"Open Terminal",description:"Press Command + Space, type Terminal, and press Return. Stay signed in as your normal macOS user rather than root."},{title:"Check Node.js, npm, and npx",description:"Run each command. Node.js should report v22 or newer, and all three commands should print a version.",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"Install the current Node.js LTS when missing",description:"Use the brew command when Homebrew is already installed. Otherwise download the macOS installer from Node.js, then close and reopen Terminal.",commands:[{label:"Homebrew",value:"brew install node"},{label:"Verify after installation",value:"node --version && npm --version && npx --version"}],note:"On Apple silicon, if brew is not found, follow the shellenv instructions printed by Homebrew and reopen Terminal."},{title:"Run the XycAi setup wizard",description:"npx downloads xycai from the npm registry. Allow the first download to finish, then use the arrow keys and Return to answer the prompts.",commands:[{value:"npx xycai"}],note:"Do not use sudo npx xycai. It may write configuration into the root account instead of your normal user profile."},{title:"Launch the selected client",description:"Close and reopen Terminal after setup. Run codex if you configured CodeX, or claude if you configured Claude Code.",commands:[{value:"codex"},{value:"claude"}]}]},windows:{title:"Complete Windows setup",description:"For Windows 10 and 11. Windows Terminal or PowerShell is recommended; install Node.js through winget or the official MSI.",officialInstaller:"Open the Node.js download page",winget:"Learn about Windows Package Manager",steps:[{title:"Open Windows Terminal or PowerShell",description:"Search for Windows Terminal or PowerShell from Start. A normal user session is usually enough; elevate only when winget explicitly requests it."},{title:"Check Node.js, npm, and npx",description:"Run each command. Node.js should report v22 or newer, and npm and npx must also return versions.",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"Install the current Node.js LTS when missing",description:"Windows 10 and 11 can use winget. After installation, close the terminal window and open a new one so the PATH update is loaded. Use the official Windows Installer if winget is unavailable.",commands:[{label:"winget",value:"winget install --id OpenJS.NodeJS.LTS -e"},{label:"Verify in a new terminal",value:"node --version\nnpm --version\nnpx --version"}]},{title:"Run the XycAi setup wizard",description:"Run npx xycai normally. If PowerShell blocks npx.ps1 through its execution policy, use npx.cmd instead; there is no need to disable script protection.",commands:[{label:"Normal command",value:"npx xycai"},{label:"When PowerShell blocks npx.ps1",value:"npx.cmd xycai"}]},{title:"Launch the selected client",description:"Open a new terminal after setup. Use codex for CodeX or claude for Claude Code. If the command is missing, verify the npm global command directory is on PATH.",commands:[{value:"codex"},{value:"claude"},{label:"Locate commands",value:"where.exe codex\nwhere.exe claude"}]}]},wizardTitle:"What the wizard does",wizardDescription:"xycai is fully interactive, so there are no flags to memorize. It asks for confirmation before replacing any configuration.",wizardSteps:[{title:"Choose the wizard language",description:"The tool detects your locale and also lets you choose English, Simplified Chinese, or Japanese."},{title:"Choose CodeX or Claude Code",description:"Each run configures one client. Run npx xycai again when you need to switch."},{title:"Choose whether to install or update the official CLI",description:"CodeX uses npm install -g @openai/codex; Claude Code uses npm install -g @anthropic-ai/claude-code. You may skip this and keep an existing version."},{title:"Confirm backup and replacement",description:"The wizard first copies existing files into timestamped .bak files and then writes the complete XycAi template."},{title:"Enter the API key and client options",description:"CodeX asks for a default model from the options currently shown by the wizard. Claude Code lets you confirm or change the XycAi base URL."},{title:"Finish and launch the client",description:"Run codex or claude when setup completes. Rerun npx xycai whenever you need to configure the client again."}],configTitle:"Files and settings written",configDescription:"~ and $HOME mean the current system user home directory. On Windows this maps to C:\\Users\\your-name.",macPathsLabel:"macOS paths",windowsPathsLabel:"Windows paths",configCards:[{title:"CodeX",description:"Configures the XycAi model provider, Responses API, and local API key.",macPaths:["~/.codex/config.toml","~/.codex/auth.json"],windowsPaths:["$HOME\\.codex\\config.toml","$HOME\\.codex\\auth.json"],details:["Default API endpoint: https://apicdn.xyc.ai/v1","config.toml uses the xycai model provider and Responses API.","auth.json stores OPENAI_API_KEY."]},{title:"Claude Code",description:"Writes Claude Code environment variables, the XycAi base URL, and timeout settings.",macPaths:["~/.claude/settings.json"],windowsPaths:["$HOME\\.claude\\settings.json"],details:["Default API endpoint: https://apicdn.xyc.ai/","settings.json stores ANTHROPIC_API_KEY and ANTHROPIC_BASE_URL.","The wizard permits another trusted XycAi HTTPS edge endpoint."]},{title:"Automatic backups",description:"When an original file exists, its backup is placed in the same directory.",macPaths:["config.toml.YYYYMMDD-HHMMSS.bak"],windowsPaths:["config.toml.YYYYMMDD-HHMMSS.bak"],details:["The backup is created before replacement.","Restore b
1y copying the required .bak file back to the original name.","Backups may contain an older API key and must be protected as well."]}],troubleshootingTitle:"Troubleshooting and recovery",troubleshootingDescription:"Start with these non-destructive checks. Do not delete the entire .codex or .claude directory without reviewing it.",issues:[{title:"npx, node, or npm is not recognized",description:"Close every terminal and open a new one, then check the versions again. Reinstall Node.js LTS if necessary and confirm the installer added Node to PATH.",commands:[{value:"node --version"},{value:"npm --version"},{value:"npx --version"}]},{title:"PowerShell blocks npx.ps1",description:"Run npx.cmd xycai or use Command Prompt. This avoids weakening the PowerShell execution policy.",commands:[{value:"npx.cmd xycai"}]},{title:"npm download fails or returns stale cache",description:"Check registry access, then request the current published release. Company proxies and third-party mirrors may not have synchronized xycai yet.",commands:[{value:"npm ping"},{value:"npm config get registry"},{value:"npm view xycai version"},{value:"npx --prefer-online xycai@latest"}]},{title:"Global install reports a permission error on macOS",description:"Do not run xycai with sudo. Install Node through Homebrew or a Node version manager and rerun the wizard. sudo can write the configuration into the wrong user account."},{title:"codex or claude is still not found after installation",description:"Open a new terminal and inspect the npm global prefix. Windows can locate commands with where.exe; macOS can use command -v.",commands:[{value:"npm config get prefix"},{label:"macOS",value:"command -v codex\ncommand -v claude"},{label:"Windows",value:"where.exe codex\nwhere.exe claude"}]},{title:"Restore the previous configuration",description:"Find the newest timestamped .bak file in the relevant directory, inspect it, and copy it back to the original filename. Back up the current file first.",commands:[{label:"Find backups on macOS",value:"find ~/.codex ~/.claude -maxdepth 1 -name '*.bak' -print 2>/dev/null"},{label:"Find backups in Windows PowerShell",value:'Get-ChildItem "$HOME\\.codex","$HOME\\.claude" -Filter "*.bak" | Sort-Object LastWriteTime -Descending'},{label:"macOS example",value:"cp ~/.codex/config.toml.YYYYMMDD-HHMMSS.bak ~/.codex/config.toml"}
1,{label:"Windows PowerShell example",value:'Copy-Item "$HOME\\.codex\\config.toml.YYYYMMDD-HHMMSS.bak" "$HOME\\.codex\\config.toml" -Force'}]}],securityTitle:"Security notes",securityDescription:"npx downloads and executes an npm package, while client configuration needs to store an API key. Understand these boundaries before running it.",securityItems:["Run npx xycai only on a computer and system account you trust.","The API key is stored as plain text in local client configuration. Do not share config files, terminal recordings, or .bak backups.","Do not use sudo npx xycai and do not permanently disable PowerShell execution policy just to run npx.","Only use a trusted XycAi HTTPS endpoint when changing the Claude Code base URL.","If a key appears in a screenshot, chat, or public repository, delete it in API settings and create a replacement immediately."],finishTitle:"When ready, one command completes the setup",finishDescription:"Create an API key, open a terminal, run npx xycai, and choose CodeX or Claude Code in the wizard.",rerunCommand:"Reconfigure command",stepLabel:"Step",commandLabel:"Command",noteLabel:"Note"}};var y=n(14317);let v="npx xycai",g="https://nodejs.org/en/download";function b(e){let{item:i,copyLabel:n,copiedLabel:a}=e;return(0,s.jsxs)("div",{className:"install-command-block",children:[i.label?(0,s.jsx)("span",{children:i.label}):null,(0,s.jsxs)("div",{children:[(0,s.jsx)("code",{children:i.value}),(0,s.jsx)(x.i,{value:i.value,variant:"outline",size:"icon",tooltip:n,successTooltip:a,"aria-label":n})]})]})}function C(e){let{steps:i,stepLabel:n,noteLabel:a,copyLabel:t,copiedLabel:o}=e;return(0,s.jsx)("div",{className:"install-step-list",children:i.map((e,i)=>(0,s.jsxs)(m.Zp,{className:"install-step-card",children:[(0,s.jsxs)("div",{className:"install-step-heading",children:[(0,s.jsx)("span",{"aria-hidden":"true",children:String(i+1).padStart(2,"0")}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("small",{children:[n," ",i+1]}),(0,s.jsx)("h3",{children:e.title})]})]}),(0,s.jsx)("p",{children:e.description}),e.commands?.length?(0,s.jsx)("div",{className:"install-step-commands",children:e.commands.map(e=>(0,s.jsx)(b,{item:e,copyLabel:t,copiedLabel:o},`${e.label??""}-${e.value}`))}):null,e.note?(0,s.jsxs)("div",{className:"install-step-note",children:[(0,s.jsx)("strong",{children:a}),(0,s.jsx)("span",{children:e.note})]}):null]},e.title))})}let N=function(){let{lang:e,selectLanguage:i}=(0,y.B)(),n=w[e],N=(0,o.n)(e=>e.auth.user);(0,r.H)(n.meta.title),(0,a.useEffect)(()=>{document.querySelector('meta[name="description"]')?.setAttribute("content",n.meta.description)},[n.meta.description]);let S=N?(0,s.jsx)(t.N_,{to:"/keys"}):(0,s.jsx)(t.N_,{to:"/sign-in",search:{redirect:"/keys"}});return(0,s.jsxs)("div",{className:"xyc-homepage quick-install-page",lang:"zh"===e?"zh-CN":"en",dir:"ltr",children:[(0,s.jsx)(f.X,{lang:e,onLangChange:i,solid:!0}),(0,s.jsxs)("main",{className:"quick-install-main",children:[(0,s.jsxs)("section",{className:"install-hero",children:[(0,s.jsxs)("div",{className:"install-container install-hero-layout",children:[(0,s.jsxs)("div",{className:"install-hero-copy",children:[(0,s.jsxs)("p",{className:"install-eyebrow",children:[(0,s.jsx)(l.qPZ,{"aria-hidden":"true"}),n.badge]}),(0,s.jsx)("h1",{children:n.title}),(0,s.jsx)("p",{className:"install-lead",children:n.description}),(0,s.jsxs)("div",{className:"install-hero-actions",children:[(0,s.jsxs)(p.o,{size:"lg",nativeButton:!1,render:S,children:[(0,s.jsx)(l.kVM,{"aria-hidden":"true"}),n.getKey]}),(0,s.jsxs)(p.o,{variant:"outline",size:"lg",nativeButton:!1,render:(0,s.jsx)("a",{href:"https://github.com/xyuudaim/xycai-LLC",target:"_blank",rel:"noreferrer"}),children:[(0,s.jsx)(l.fxk,{"aria-hidden":"true"}),n.sourceCode,(0,s.jsx)(l.GrD,{"aria-hidden":"true"})]})]})]}),(0,s.jsxs)(h.w,{className:"install-command-card",title:n.commandTitle,children:[(0,s.jsx)("p",{children:n.commandDescription}),(0,s.jsxs)("div",{className:"install-primary-command",children:[(0,s.jsx)(l.qPZ,{"aria-hidden":"true"}),(0,s.jsx)("code",{children:v}),(0,s.jsx)(x.i,{value:v,variant:"outline",size:"default",tooltip:n.copyCommand,successTooltip:n.copied,"aria-label":n.copyCommand,children:(0,s.jsx)("span",{children:n.copyCommand})})]})]})]}),(0,s.jsx)("div",{className:"install-container install-fact-grid",children:n.facts.map((e,i)=>{let n=[l.FCU,l.qPZ,l.VzH,l.oxo][i];return(0,s.jsxs)(m.Zp,{className:"install-fact-card",size:"sm",children:[(0,s.jsx)(n,{"aria-hidden":"true"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{children:e.title}),(0,s.jsx)("p",{children:e.description})]})]},e.title)})})]}),(0,s.jsx)("section",{className:"install-section install-requirements",children:(0,s.jsxs)("div",{className:"install-container",children:[(0,s.jsxs)("div",{className:"install-section-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"01"}),(0,s.jsx)("h2",{children:n.requirementsTitle})]}),(0,s.jsx)("p",{children:n.requirementsDescription})]}),(0,s.jsx)("div",{className:"install-requirement-grid",children:n.requirements.map((e,i)=>{let n=[l.FCU,l.qPZ,l.kVM][i];return(0,s.jsxs)(m.Zp,{className:"install-requirement-card",children:[(0,s.jsx)(n,{"aria-hidden":"true"}),(0,s.jsx)("h3",{children:e.title}),(0,s.jsx)("p",{children:e.description})]},e.title)})})]})}),(0,s.jsx)("section",{className:"install-section",children:(0,s.jsxs)("div",{className:"install-container",children:[(0,s.jsxs)("div",{className:"install-section-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"02"}),(0,s.jsx)("h2",{children:n.platformTitle})]}),(0,s.jsx)("p",{children:n.platformDescription})]}),(0,s.jsxs)(u.tU,{defaultValue:"mac",className:"install-platform-tabs",children:[(0,s.jsxs)(u.j7,{className:"install-platform-tabs-list",children:[(0,s.jsxs)(u.Xi,{value:"mac",children:[(0,s.jsx)(l.ZFO,{"aria-hidden":"true"}),n.macLabel]}),(0,s.jsxs)(u.Xi,{value:"windows",children:[(0,s.jsx)(l.VAG,{"aria-hidden":"true"}),n.windowsLabel]})]}),(0,s.jsxs)(u.av,{value:"mac",className:"install-platform-content",children:[(0,s.jsxs)("div",{className:"install-platform-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:n.mac.title}),(0,s.jsx)("p",{children:n.mac.description})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("a",{href:g,target:"_blank",rel:"noreferrer",children:[n.mac.officialInstaller,(0,s.jsx)(l.GrD,{"aria-hidden":"true"})]}),(0,s.jsxs)("a",{href:"https://brew.sh/",target:"_blank",rel:"noreferrer",children:[n.mac.homebrew,(0,s.jsx)(l.GrD,{"aria-hidden":"true"})]})]})]}),(0,s.jsx)(C,{steps:n.mac.steps,stepLabel:n.stepLabel,noteLabel:n.noteLabel,copyLabel:n.copyCommand,copiedLabel:n.copied})]}),(0,s.jsxs)(u.av,{value:"windows",className:"install-platform-content",children:[(0,s.jsxs)("div",{className:"install-platform-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{children:n.windows.title}),(0,s.jsx)("p",{children:n.windows.description})]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("a",{href:g,target:"_blank",rel:"noreferrer",children:[n.windows.officialInstaller,(0,s.jsx)(l.GrD,{"aria-hidden":"true"})]}),(0,s.jsxs)("a",{href:"https://learn.microsoft.com/windows/package-manager/winget/",target:"_blank",rel:"noreferrer",children:[n.windows.winget,(0,s.jsx)(l.GrD,{"aria-hidden":"true"})]})]})]}),(0,s.jsx)(C,{steps:n.windows.steps,stepLabel:n.stepLabel,noteLabel:n.noteLabel,copyLabel:n.copyCommand,copiedLabel:n.copied})]})]})]})}),(0,s.jsx)("section",{className:"install-section install-wizard-section",children:(0,s.jsxs)("div",{className:"install-container",children:[(0,s.jsxs)("div",{className:"install-section-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"03"}),(0,s.jsx)("h2",{children:n.wizardTitle})]}),(0,s.jsx)("p",{children:n.wizardDescription})]}),(0,s.jsx)("div",{className:"install-wizard-grid",children:n.wizardSteps.map((e,i)=>(0,s.jsxs)(m.Zp,{className:"install-wizard-card",children:[(0,s.jsx)("span",{children:String(i+1).padStart(2,"0")}),(0,s.jsx)("h3",{children:e.title}),(0,s.jsx)("p",{children:e.description})]},e.title))})]})}),(0,s.jsx)("section",{className:"install-section",children:(0,s.jsxs)("div",{className:"install-container",children:[(0,s.jsxs)("div",{className:"install-section-heading",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"04"}),(0,s.jsx)("h2",{children:n.configTitle})]}),(0,s.jsx)("p",{children:n.configDescription})]}),(0,s.jsx)("div",{className:"install-config-grid",children:n.configCards.map(e=>(0,s.jsxs)(h.w,{className:"install-config-card",title:e.title,children:[(0,s.jsx)("p",{children:e.description}),(0,s.jsxs)("div",{className:"install-path-group",children:[(0,s.jsx)("span",{children:n.macPathsLabel}),e.macPaths.map(e=>(0,s.jsx)("code",{children:e},e))]}),(0,s.jsxs)("div",{className:"install-path-group",children:[(0,s.jsx)("span",{children:n.windowsPathsLabel}),e.windowsPaths.map(e=>(0,s.jsx)("code",{children:e},e))]}),(0,s.jsx)("ul",{children:e.details.map(e=>(0,s.jsxs)("li",{children:[(0,s.jsx)(l.Jlk,{"aria-hidden":"true"}),(0,s.jsx)("span",{children:e})]},e))})]},e.title))})]})}),(0,s.jsx)("section",{className:"install-section install-support-section",children:(0,s.jsxs)("div",{className:"install-container install-support-layout",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"install-section-heading install-section-heading-stack",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{children:"05"}),(0,s.jsx)("h2",{children:n.troubleshootingTitle})]}),(0,s.jsx)("p",{children:n.troubleshootingDescription})]}),(0,s.jsx)(m.Zp,{className:"install-accordion-card",children:(0,s.jsx)(c.nD,{multiple:!0,children:n.issues.map((e,i)=>(0,s.jsxs)(c.As,{value:`issue-${i}`,children:[(0,s.jsx)(c.$m,{children:e.title}),(0,s.jsxs)(c.ub,{children:[(0,s.jsx)("p",{children:e.description}),e.commands?.length?(0,s.jsx)("div",{className:"install-issue-commands",children:e.commands.map(e=>(0,s.jsx)(b,{item:e,copyLabel:n.copyCommand,copiedLabel:n.copied},`${e.label??""}-${e.value}`))}):null]})]},e.title))})})]}),(0,s.jsxs)("div",{className:"install-security-column",children:[(0,s.jsxs)(d.Fc,{className:"install-security-alert",children:[(0,s.jsx)(l.oxo,{"aria-hidden":"true"}),(0,s.jsx)(d.XL,{children:n.securityTitle}),(0,s.jsx)(d.TN,{children:n.securityDescription})]}),(0,s.jsx)("div",{className:"install-security-list",children:n.securityItems.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)(l.rW7,{"aria-hidden":"true"}),(0,s.jsx)("span",{children:e})]},e))})]})]})}),(0,s.jsx)("section",{className:"install-final-section",children:(0,s.jsxs)("div",{className:"install-container install-final-layout",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{children:n.finishTitle}),(0,s.jsx)("p",{children:n.finishDescription})]}),(0,s.jsxs)("div",{className:"install-final-actions",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{children:n.rerunCommand}),(0,s.jsx)("code",{children:v}),(0,s.jsx)(x.i,{value:v,variant:"outline",size:"icon",tooltip:n.copyCommand,successTooltip:n.copied,"aria-label":n.copyCommand})]}),(0,s.jsxs)(p.o,{size:"lg",nativeButton:!1,render:S,children:[n.getKey,(0,s.jsx)(l.Qpb,{"aria-hidden":"true"})]})]})]})})]}),(0,s.jsx)(j.h,{lang:e})]})}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.