# claude-code-mirror **Repository Path**: iamzhihuix/claude-code-mirror ## Basic Information - **Project Name**: claude-code-mirror - **Description**: Claude code 镜像源地址 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-11-06 - **Last Updated**: 2025-11-07 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Claude Code 国内镜像安装指南 本项目提供了 Claude Code 在中国大陆的镜像安装方案,使用腾讯云CDN加速下载,解决官方安装源在国内访问困难的问题。 ## 快速安装 ### Windows 用户(PowerShell) ```powershell # 方法一:使用国内镜像脚本(推荐,下载速度快) irm https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.ps1 | iex # 方法二:使用官方脚本 irm https://claude.ai/install.ps1 | iex ``` ### macOS / Linux 用户(Bash) ```bash # 方法一:使用国内镜像脚本(推荐,下载速度快) curl -fsSL https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.sh | bash # 方法二:使用官方脚本 curl -fsSL https://claude.ai/install.sh | bash ``` ## 安装脚本功能 - **多平台支持**:Windows、macOS、Linux - **自动架构检测**:x64、ARM64 等架构自动识别 - **CDN 加速下载**:腾讯云 COS 国内高速访问 - **文件完整性验证**:SHA256 校验确保安全 - **自动安装配置**:一键安装并配置环境 - **版本管理**:支持指定版本、最新版本、稳定版本 ## 高级用法 ### 指定版本安装 **Windows PowerShell:** ```powershell # 安装最新版本 irm https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.ps1 | iex -ArgumentList "latest" # 安装指定版本 irm https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.ps1 | iex -ArgumentList "2.0.34" # 安装稳定版本(默认) irm https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.ps1 | iex -ArgumentList "stable" ``` **macOS / Linux Bash:** ```bash # 安装最新版本 curl -fsSL https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.sh | bash -s latest # 安装指定版本 curl -fsSL https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.sh | bash -s 2.0.34 # 安装稳定版本(默认) curl -fsSL https://gitee.com/iamzhihuix/claude-code-mirror/raw/main/bootstrap.sh | bash -s stable ``` ## 系统要求 - **操作系统**:Windows 10+、macOS 10.15+、Linux(主流发行版) - **架构**:64位系统(x64、ARM64) - **运行环境**: - Windows:PowerShell 5.1+ - macOS/Linux:Bash 4.0+ - **网络连接**:互联网访问 ## 故障排除 ### 1. PowerShell 执行策略错误 如果遇到无法执行脚本的问题: ```powershell Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser ``` ### 2. 下载失败问题 如果遇到下载失败,可以尝试: - 检查网络连接 - 使用官方脚本作为备选方案 - 切换到不同的网络环境 ### 3. 权限问题 - **Windows**:建议使用普通用户权限运行,避免管理员权限限制 - **macOS/Linux**:确保脚本有执行权限:`chmod +x bootstrap.sh` ### 4. 架构不匹配 Claude Code 目前支持: - Windows: x64, ARM64 - macOS: x64, ARM64 (Apple Silicon) - Linux: x64, ARM64 ## 镜像源说明 ### CDN 架构 - **主要下载源**:腾讯云 COS(国内高速访问) - **存储架构**:claude-mirror/版本/平台/二进制文件 - **同步机制**:自动与官方源同步更新 ### 文件结构 ``` claude-mirror/ ├── stable # 稳定版本号 ├── latest # 最新版本号 └── 2.0.34/ # 版本目录 ├── checksums.txt ├── manifest.json ├── darwin-arm64/claude ├── darwin-x64/claude ├── linux-arm64/claude ├── linux-x64/claude └── win32-x64/claude.exe ``` ## 开发工具 本项目包含以下开发工具: - `sync-to-gitee.sh` - 同步文件到 Gitee - `upload-to-cdn.sh` - 上传文件到 CDN - `install-coscli.sh` - 安装腾讯云 COSCLI 工具 ## 更新日志 - **v2.0.34** - 添加腾讯云 COS CDN 支持,多平台安装脚本 - **v1.0.0** - 初始版本,支持 Windows PowerShell 安装 ## 许可证 本镜像安装脚本仅用于提供国内访问便利,Claude Code 的使用请遵循 Anthropic 的相关条款。