接入文档
🚀 一键安装(推荐懒人版)
NEW一条命令自动安装 Claude CLI 并配置好环境变量,全程约 1 分钟。无需复制密钥——运行后终端会显示一个 6 位配对码和授权地址,用任意浏览器(电脑/手机均可)打开该地址、登录后输入配对码,终端即自动完成配置。
macOS / Linux / WSL
curl -fsSL https://console.code2ai.codes/install.sh | bashWindows (PowerShell)
iex "& { $(irm https://console.code2ai.codes/install.ps1) }"⚠️ 这条只能在 PowerShell 里运行。若你打开的是「命令提示符 / CMD」,粘贴后会报「iex 不是内部或外部命令」——按 Win + X 选「终端」或「Windows PowerShell」,或改用下面那条。
Windows (CMD 命令提示符)
powershell -NoProfile -ExecutionPolicy Bypass -Command "irm https://console.code2ai.codes/install.ps1 | iex"c2a 终端助手(随脚本自动安装,全平台):遇到问题先跑
c2a doctor一键自检;c2a login重新授权/换账号;c2a update更新;直接输入c2a打开菜单。macOS / Linux / WSL 与 Windows 均可用。脚本源码公开:install.sh/install.ps1/c2a.sh/c2a.ps1
按文档配好但仍然报错?故障排查知识库 按报错原话收录了实测解法:Is a directory、ANTHROPIC_BASE_URL 配好却 404、请求全部超时等。