build.mjs 使用说明
Description
这是 Claude Config Manager 的 Node.js 构建脚本,提供了比原生 shell 脚本更好的跨平台支持和更多功能。
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
Repository README
This is the README for ronghuaxueleng/claude-code-config-manage-gui, shared by 2 entries
in this directory. It describes the repository, not this entry specifically.
build.mjs 使用说明
这是 Claude Config Manager 的 Node.js 构建脚本,提供了比原生 shell 脚本更好的跨平台支持和更多功能。
功能特性
- ✅ 跨平台支持(Windows、Linux、macOS)
- ✅ 自动环境检查
- ✅ 国内镜像源配置(可选)
- ✅ 智能依赖管理
- ✅ 多种构建选项
- ✅ 彩色输出和进度提示
- ✅ 详细的错误信息
快速开始
基本用法
# 使用 npm
npm run build
# 或直接运行
node build.mjs
构建选项
# 构建 debug 版本
npm run build:debug
# 或
node build.mjs --debug
# 清理缓存后构建
npm run build:clean
# 或
node build.mjs --clean
# 只构建 MSI 安装包 (Windows)
npm run build:msi
# 或
node build.mjs --target=msi
# 只构建 NSIS 安装包 (Windows)
npm run build:nsis
# 或
node build.mjs --target=nsis
# 不使用国内镜像源
node build.mjs --no-mirror
# 查看帮助
npm run build:help
# 或
node build.mjs --help
命令行选项
| 选项 | 说明 |
|---|---|
--debug |
构建 debug 版本(包含调试信息) |
--target= |
指定构建目标(nsis, msi, deb, appimage, dmg 等) |
--no-mirror |
不使用国内镜像源 |
--clean |
清理构建缓存后再构建 |
-h, --help |
显示帮助信息 |
构建流程
脚本会自动执行以下步骤:
- 环境检查 - 验证 Node.js 和 Rust 是否已安装
- 镜像配置 - 配置 Rust 和 npm 镜像源(国内加速)
- 依赖安装 - 安装项目所需的 npm 依赖
- 环境配置 - 设置构建所需的环境变量
- 执行构建 - 调用 Tauri 进行构建
- 结果输出 - 显示构建产物的位置
构建产物位置
构建完成后,安装包会生成在以下位置:
Windows
- NSIS:
src-tauri/target/release/bundle/nsis/ - MSI:
src-tauri/target/release/bundle/msi/
Linux
- DEB:
src-tauri/target/release/bundle/deb/ - AppImage:
src-tauri/target/release/bundle/appimage/
macOS
- DMG:
src-tauri/target/release/bundle/dmg/ - App:
src-tauri/target/release/bundle/macos/
环境要求
- Node.js >= 16.0.0
- Rust >= 1.70.0
- Cargo(随 Rust 一起安装)
Windows 额外要求
- Visual Studio Build Tools 或 Visual Studio
- WebView2 Runtime(Windows 10/11 已预装)
Linux 额外要求
# Debian/Ubuntu
sudo apt-get install -y libwebkit2gtk-4.0-dev \
build-essential \
curl \
wget \
file \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev \
librsvg2-dev
# Fedora
sudo dnf install webkit2gtk4.0-devel \
openssl-devel \
curl \
wget \
file \
libappindicator-gtk3-devel \
librsvg2-devel
# Arch
sudo pacman -S webkit2gtk base-devel curl wget file openssl appmenu-gtk-module gtk3 libappindicator-gtk3 librsvg
镜像源配置
默认情况下,脚本会自动配置以下镜像源:
- Rust: rsproxy.cn
- npm: registry.npmmirror.com
如果不需要镜像源,可以使用 `--no-mirror` 选项。
故障排除
构建失败
**网络问题**
# 使用国内镜像 node build.mjs**缓存损坏**
# 清理缓存后重新构建 node build.mjs --clean**Rust 版本过旧**
# 更新 Rust 工具链 rustup update stable**依赖安装失败**
# 删除 node_modules 重新安装 rm -rf node_modules npm install
常见错误
- "未找到 Node.js": 请安装 Node.js 16 或更高版本
- "未找到 Rust/Cargo": 请安装 Rust 工具链
- "WebView2 not found" (Windows): 安装 WebView2 Runtime
- "Package not found" (Linux): 安装所需的系统依赖包
示例
Related Skills
Auto Update
Pull the latest ECC repo changes and reinstall the current managed targets.
Development Ecc Guide
Navigate ECC's current agents, skills, commands, hooks, install profiles, and docs from the live repository su
Development Epic Claim
Claim an epic issue, stamp coordination state, and sync local ownership.
Development Epic Publish
Publish a validated epic update back to the issue and local cache.
Development Epic Review
Mark epic review requested, approved, or changes requested.
Development Epic Unblock
Sweep blocked epic issues and reopen anything whose dependencies are closed.
Development Related Agents
Django Build Resolver
Django/Python build, migration, and dependency error resolution specialist. Fixes pip/Poetry errors, migration
Openai Codex CLI
(55.8k ⭐) - Lightweight coding agent that runs in your terminal.
src/agents/ — 11 Agent Definitions
**Generated:** 2026-04-11