2026-04-06 15:16:48 +08:00
<!DOCTYPE html>
< html lang = "zh-CN" >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title > Bookworm Portable - 保姆式安装手册 (Windows + macOS)< / title >
2026-04-06 21:49:50 +08:00
< link rel = "icon" type = "image/png" sizes = "32x32" href = "assets/favicon-32.png" >
2026-04-06 15:16:48 +08:00
< style >
:root {
--bg: #0d1117;
--card: #161b22;
--border: #30363d;
--text: #e6edf3;
--text-dim: #8b949e;
--accent: #58a6ff;
--green: #3fb950;
--yellow: #d29922;
--red: #f85149;
--purple: #bc8cff;
--cyan: #39d2c0;
--win-color: #0078d4;
--mac-color: #999999;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: var(--bg);
color: var(--text);
font-family: -apple-system, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
line-height: 1.7;
padding: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* ===== HEADER ===== */
.header {
background: linear-gradient(135deg, #1a1f35 0%, #0d1117 100%);
border-bottom: 1px solid var(--border);
padding: 3rem 2rem 2rem;
text-align: center;
}
.header pre {
color: var(--cyan);
font-size: 0.65rem;
line-height: 1.2;
margin-bottom: 1rem;
display: inline-block;
text-align: left;
font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
}
.header h1 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.header h1 span { color: var(--accent); }
.header p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 0.8rem; }
.badge-row { display: flex; gap: 0.8rem; justify-content: center; margin-top: 0.8rem; flex-wrap: wrap; }
.badge {
display: inline-flex; align-items: center; gap: 0.4rem;
background: var(--card); border: 1px solid var(--border);
border-radius: 20px; padding: 0.3rem 0.9rem; font-size: 0.85rem; color: var(--text-dim);
}
.badge strong { color: var(--text); }
/* ===== PLATFORM DETECTION BADGE ===== */
.detect-badge {
display: inline-flex; align-items: center; gap: 0.5rem;
background: rgba(88,166,255,0.12); border: 1px solid rgba(88,166,255,0.3);
border-radius: 20px; padding: 0.4rem 1rem; font-size: 0.9rem;
color: var(--accent); margin-bottom: 1rem;
}
.detect-badge .dot {
width: 8px; height: 8px; border-radius: 50%; background: var(--green);
animation: pulse 2s infinite;
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
/* ===== TAB SWITCHER ===== */
.platform-tabs {
display: flex; gap: 0.6rem; justify-content: center; margin: 1rem 0;
}
.tab-btn {
display: inline-flex; align-items: center; gap: 0.5rem;
padding: 0.55rem 1.5rem; border-radius: 8px; font-size: 0.95rem;
font-weight: 600; cursor: pointer; border: none; transition: all 0.2s;
font-family: inherit;
}
.tab-btn.active {
background: var(--accent); color: #000;
}
.tab-btn.inactive {
background: var(--card); color: var(--text-dim);
border: 1px solid var(--border);
}
.tab-btn.inactive:hover {
border-color: var(--accent); color: var(--text);
}
/* ===== PLATFORM TAG INDICATORS ===== */
.platform-tag {
display: inline-block; font-size: 0.68rem; font-weight: 700;
padding: 0.1rem 0.45rem; border-radius: 4px; margin-left: 0.4rem;
vertical-align: middle; letter-spacing: 0.3px;
}
.tag-win {
background: rgba(0,120,212,0.18); border: 1px solid rgba(0,120,212,0.4);
color: #69b4ff;
}
.tag-mac {
background: rgba(153,153,153,0.15); border: 1px solid rgba(153,153,153,0.35);
color: #bbb;
}
.tag-both {
background: rgba(63,185,80,0.12); border: 1px solid rgba(63,185,80,0.3);
color: var(--green);
}
/* ===== MAIN CONTAINER ===== */
.container { max-width: 920px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.section { margin-bottom: 2.5rem; }
.section h2 {
font-size: 1.4rem; margin-bottom: 1rem; padding-bottom: 0.5rem;
border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 0.6rem;
}
.section h2 .num {
background: var(--accent); color: #000; width: 28px; height: 28px;
border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
}
.section h2 .num.green { background: var(--green); }
.section h2 .num.yellow { background: var(--yellow); }
.section h2 .num.red { background: var(--red); }
/* ===== CODE BLOCKS ===== */
.code-block {
background: #0d1117; border: 1px solid var(--border); border-radius: 8px;
padding: 1rem 1.2rem; margin: 0.8rem 0; overflow-x: auto; position: relative;
cursor: pointer; transition: border-color 0.2s;
}
.code-block:hover { border-color: var(--accent); }
.code-block::after {
content: "点击复制"; position: absolute; top: 0.4rem; right: 0.6rem;
font-size: 0.7rem; color: var(--text-dim); background: var(--card);
padding: 0.15rem 0.5rem; border-radius: 4px; border: 1px solid var(--border);
opacity: 0; transition: opacity 0.2s;
}
.code-block:hover::after { opacity: 1; }
.code-block.copied::after { content: "已复制!"; color: var(--green); opacity: 1; }
.code-block code {
font-family: 'Cascadia Code', 'SF Mono', 'Fira Code', 'Consolas', 'Menlo', monospace;
font-size: 0.9rem; line-height: 1.6; color: var(--text);
white-space: pre-wrap; word-break: break-all;
}
.code-block .label {
position: absolute; top: 0.4rem; left: 0.6rem;
font-size: 0.65rem; color: var(--text-dim); background: var(--card);
padding: 0.1rem 0.5rem; border-radius: 4px; border: 1px solid var(--border);
text-transform: uppercase; letter-spacing: 0.5px;
}
.code-block.has-label { padding-top: 2rem; }
.cmd { color: var(--green); }
.flag { color: var(--yellow); }
.url { color: var(--accent); }
.comment { color: var(--text-dim); }
/* ===== CARDS ===== */
.card {
background: var(--card); border: 1px solid var(--border);
border-radius: 10px; padding: 1.2rem 1.5rem; margin: 0.8rem 0;
}
.card h3 { font-size: 1rem; margin-bottom: 0.5rem; color: var(--accent); }
.card p { color: var(--text-dim); font-size: 0.95rem; }
/* ===== HIGHLIGHT BOX ===== */
.highlight-box {
background: var(--card); border: 1px solid var(--green);
border-radius: 10px; padding: 1.5rem; margin: 1rem 0; text-align: center;
box-shadow: 0 0 20px rgba(63,185,80,0.08);
}
.highlight-box h3 { color: var(--green); font-size: 1.1rem; margin-bottom: 0.6rem; }
.highlight-box p { color: var(--text-dim); font-size: 0.9rem; }
/* ===== STEPS ===== */
.step { display: flex; gap: 1rem; margin: 1.2rem 0; align-items: flex-start; }
.step-icon {
width: 40px; height: 40px; border-radius: 10px;
display: flex; align-items: center; justify-content: center;
font-size: 1.1rem; font-weight: 700; flex-shrink: 0; margin-top: 0.1rem;
}
.step-icon.green { background: rgba(63,185,80,0.15); border: 1px solid rgba(63,185,80,0.3); color: var(--green); }
.step-icon.blue { background: rgba(88,166,255,0.15); border: 1px solid rgba(88,166,255,0.3); color: var(--accent); }
.step-icon.yellow { background: rgba(210,153,34,0.15); border: 1px solid rgba(210,153,34,0.3); color: var(--yellow); }
.step-icon.red { background: rgba(248,81,73,0.15); border: 1px solid rgba(248,81,73,0.3); color: var(--red); }
.step-icon.purple { background: rgba(188,140,255,0.15); border: 1px solid rgba(188,140,255,0.3); color: var(--purple); }
.step-content { flex: 1; }
.step-content h4 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.step-content p { color: var(--text-dim); font-size: 0.9rem; }
/* ===== TABLES ===== */
table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.9rem; }
th, td { padding: 0.6rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--text-dim); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
td code { background: var(--bg); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85rem; border: 1px solid var(--border); font-family: 'Cascadia Code', 'SF Mono', 'Consolas', monospace; }
/* ===== ALERTS ===== */
.alert {
border-radius: 8px; padding: 1rem 1.2rem; margin: 1rem 0;
font-size: 0.9rem; display: flex; gap: 0.8rem; align-items: flex-start;
}
.alert-icon { font-size: 1.2rem; flex-shrink: 0; line-height: 1.5; }
.alert.warning { background: rgba(210,153,34,0.08); border: 1px solid rgba(210,153,34,0.3); }
.alert.danger { background: rgba(248,81,73,0.08); border: 1px solid rgba(248,81,73,0.3); }
.alert.info { background: rgba(88,166,255,0.08); border: 1px solid rgba(88,166,255,0.3); }
.alert.success { background: rgba(63,185,80,0.08); border: 1px solid rgba(63,185,80,0.3); }
/* ===== CHECKLIST ===== */
.checklist { list-style: none; padding: 0; }
.checklist li {
padding: 0.5rem 0; padding-left: 2rem; position: relative;
border-bottom: 1px solid rgba(48,54,61,0.5); color: var(--text-dim);
}
.checklist li::before {
content: ""; position: absolute; left: 0; top: 0.65rem;
width: 18px; height: 18px; border: 2px solid var(--border); border-radius: 4px;
}
.checklist li.done::before {
background: var(--green); border-color: var(--green);
content: ""; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
background-size: 14px; background-position: center; background-repeat: no-repeat;
}
.checklist li.done { color: var(--text); }
.checklist li strong { color: var(--text); }
/* ===== FLOW DIAGRAM ===== */
.flow {
display: flex; align-items: center; justify-content: center;
gap: 0; margin: 1.5rem 0; flex-wrap: wrap;
}
.flow-node {
background: var(--card); border: 1px solid var(--border); border-radius: 8px;
padding: 0.6rem 1rem; font-size: 0.85rem; text-align: center; min-width: 100px;
}
.flow-node.active { border-color: var(--green); box-shadow: 0 0 8px rgba(63,185,80,0.2); }
.flow-arrow { color: var(--text-dim); font-size: 1.2rem; padding: 0 0.3rem; }
/* ===== SCREENSHOT NOTE ===== */
.screenshot-note {
background: var(--card); border: 1px solid var(--border); border-radius: 8px;
padding: 0.8rem 1rem; margin: 0.5rem 0; font-size: 0.85rem; color: var(--text-dim);
border-left: 3px solid var(--yellow);
}
.screenshot-note strong { color: var(--yellow); }
/* ===== SECTION DIVIDER ===== */
.platform-divider {
border: none; border-top: 1px dashed var(--border);
margin: 1.5rem 0;
}
/* ===== FOOTER ===== */
.footer {
text-align: center; padding: 2rem; color: var(--text-dim);
font-size: 0.8rem; border-top: 1px solid var(--border);
}
/* ===== DOWNLOAD BUTTONS ===== */
.dl-btn {
display: inline-block; margin-top: 1.2rem; padding: 0.7rem 2rem;
background: var(--accent); color: #000; font-weight: 700; border-radius: 8px;
font-size: 1rem; text-decoration: none; transition: opacity 0.2s;
font-family: inherit;
}
.dl-btn:hover { opacity: 0.85; text-decoration: none; }
/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
.header { padding: 2rem 1rem 1.5rem; }
.header pre { font-size: 0.45rem; }
.header h1 { font-size: 1.4rem; }
.container { padding: 1.5rem 1rem; }
.flow { flex-direction: column; }
.flow-arrow { transform: rotate(90deg); }
.step { flex-direction: column; gap: 0.5rem; }
.platform-tabs { flex-direction: column; align-items: center; }
table { display: block; overflow-x: auto; }
}
< / style >
< / head >
< body >
<!-- ================================================================ -->
<!-- HEADER -->
<!-- ================================================================ -->
< div class = "header" >
< pre > ____ _
| __ ) ___ ___ | | ____ _____ _ __ _ __ ___
| _ \ / _ \ / _ \| |/ /\ \ /\ / / _ \| '__| '_ ` _ \
| |_) | (_) | (_) | < \ V V / (_) | | | | | | | |
|____/ \___/ \___/|_|\_\ \_/\_/ \___/|_| |_| |_| |_|< / pre >
< h1 > Bookworm < span > Portable< / span > 保姆式安装手册< / h1 >
< p > 从零开始,一步步教你在任意电脑上激活 Bookworm< / p >
< div class = "detect-badge" >
< span class = "dot" > < / span >
检测到你的系统:< strong id = "detected-os" > Windows< / strong >
< / div >
<!-- 手动切换平台 -->
< div class = "platform-tabs" >
< button class = "tab-btn tab-win active" onclick = "switchPlatform('win')" > 🪟 Windows< / button >
< button class = "tab-btn tab-mac inactive" onclick = "switchPlatform('mac')" > 🍎 macOS< / button >
< / div >
< div class = "badge-row" >
< span class = "badge" > < strong > 92< / strong > Skills< / span >
< span class = "badge" > < strong > 18< / strong > Agents< / span >
< span class = "badge" > < strong > 34< / strong > Hooks< / span >
< span class = "badge" > < strong > AES-256< / strong > 加密< / span >
< span class = "badge" > < strong > NDA< / strong > 技术保密< / span >
< / div >
< / div >
<!-- ================================================================ -->
<!-- MAIN CONTENT -->
<!-- ================================================================ -->
< div class = "container" >
<!-- ============================================================ -->
<!-- SECTION 0: 最快方式 — 一键安装 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num green" > 0< / span > 最快方式 — 一键安装器 < span class = "tag-both" > 推荐< / span > < / h2 >
<!-- Windows 一键安装 -->
< div class = "win-only" >
< div class = "highlight-box" >
< h3 > 最快方式: Windows 一键安装器< / h3 >
< p style = "margin-bottom:0.8rem" > 获取 < strong > Bookworm-AutoSetup.bat< / strong > → 双击运行 → 输入密码 → 完成< / p >
< p style = "font-size:0.8rem;color:var(--text-dim);margin-bottom:1rem" > 安装器自动检测依赖、下载配置、创建桌面快捷方式、启动 Claude Code< / p >
< a href = "/Bookworm-AutoSetup.bat" download class = "dl-btn" > ⬇ 下载一键安装器 (.bat)< / a >
< / div >
< p style = "text-align:center;color:var(--text-dim);font-size:0.85rem;margin-bottom:0.5rem" > 安装流程:< / p >
< div class = "flow" >
< div class = "flow-node" > 安装依赖< br > < small style = "color:var(--text-dim)" > Node.js + Git< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 安装 Claude Code< br > < small style = "color:var(--text-dim)" > npm 全局安装< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 双击运行< br > < small style = "color:var(--text-dim)" > AutoSetup.bat< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 输入密码< br > < small style = "color:var(--text-dim)" > 主密码< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node active" > Bookworm 激活< br > < small style = "color:var(--green)" > 完成< / small > < / div >
< / div >
< p style = "text-align:center;color:var(--text-dim);font-size:0.9rem" > 首次安装约 10 分钟(含依赖下载),之后每次双击启动约 10-30 秒< / p >
< / div >
<!-- macOS 一键安装 -->
< div class = "mac-only" style = "display:none" >
< div class = "highlight-box" >
< h3 > 最快方式: macOS 一键安装脚本< / h3 >
< p style = "margin-bottom:0.8rem" > 下载 < strong > Bookworm-Setup.sh< / strong > → 在终端运行 → 输入密码 → 完成< / p >
< p style = "font-size:0.8rem;color:var(--text-dim);margin-bottom:0.6rem" > 脚本自动检测依赖、安装 Homebrew/Node.js/Git、下载配置、启动 Claude Code< / p >
< a href = "/Bookworm-Setup.sh" download class = "dl-btn" > ⬇ 下载一键安装脚本 (.sh)< / a >
< / div >
< div class = "card" style = "margin-top:0.8rem" >
< h3 > 下载后如何运行< / h3 >
< p > 打开终端(按 < code > ⌘ + 空格< / code > ,搜索"终端"),进入下载目录后执行:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "comment" > # 进入下载目录(通常在下载文件夹)< / span >
< span class = "cmd" > cd< / span > ~/Downloads
< span class = "comment" > # 赋予执行权限并运行< / span >
< span class = "cmd" > chmod< / span > +x Bookworm-Setup.sh & & ./Bookworm-Setup.sh< / code >
< / div >
< p style = "text-align:center;color:var(--text-dim);font-size:0.85rem;margin-bottom:0.5rem" > 安装流程:< / p >
< div class = "flow" >
< div class = "flow-node" > 安装依赖< br > < small style = "color:var(--text-dim)" > Homebrew + Node.js< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 安装 Claude Code< br > < small style = "color:var(--text-dim)" > npm 全局安装< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 运行脚本< br > < small style = "color:var(--text-dim)" > bash Setup.sh< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node" > 输入密码< br > < small style = "color:var(--text-dim)" > 主密码< / small > < / div >
< span class = "flow-arrow" > ➔ < / span >
< div class = "flow-node active" > Bookworm 激活< br > < small style = "color:var(--green)" > 完成< / small > < / div >
< / div >
< p style = "text-align:center;color:var(--text-dim);font-size:0.9rem" > 首次安装约 10 分钟(含依赖下载),之后每次启动约 5-15 秒< / p >
< / div >
< div class = "alert info" style = "margin-top:1rem" >
< span class = "alert-icon" > 👉 < / span >
< div >
< strong > 想了解每一步在做什么?< / strong >
继续向下阅读完整手册,每步都有详细说明。如果一键安装器已经成功,可直接跳到 < strong > 第 4 节:日常使用< / strong > 。
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 1: 安装依赖软件 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 1< / span > 安装依赖软件< / h2 >
<!-- 通用 - 代理提醒 -->
< div class = "alert danger" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > 国内必须:代理/VPN 软件< / strong > < br >
Claude Code 启动时会检查 < code > api.anthropic.com< / code > ,国内无法直连。< br >
请先安装并启动代理软件( Clash / V2Ray / 快柠檬 / Surge / 任意 VPN) , 安装脚本会< strong > 自动检测< / strong > 系统代理。< br >
无代理 = Claude Code 无法启动。
< / div >
< / div >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 中转站不走代理< / strong > < br >
API 中转站 < code > bww.letcareme.com< / code > 部署在国内阿里云,< strong > 不需要通过代理访问< / strong > 。< br >
安装脚本已自动设置 < code > NO_PROXY=bww.letcareme.com,code.letcareme.com< / code > ,无需手动配置。< br >
如果代理软件有"绕过规则"设置,建议把 < code > *.letcareme.com< / code > 加入直连列表。
< / div >
< / div >
< p style = "margin-bottom:0.8rem" > 需要安装以下软件。如果已经装过,可以直接跳到下一节。< / p >
<!-- ===== Windows 专属 ===== -->
< div class = "win-only" >
<!-- A. Node.js -->
< div class = "step" >
< div class = "step-icon blue" > A< / div >
< div class = "step-content" >
< h4 > 安装 Node.js < span class = "tag-win" > Windows< / span > (必须)< / h4 >
< p > Node.js 是运行 Claude Code 的基础环境,必须安装。< / p >
< / div >
< / div >
< div class = "card" >
< h3 > 方式一:官网下载(推荐,操作最简单)< / h3 >
< p > 打开浏览器访问 < a href = "https://nodejs.org/zh-cn" target = "_blank" > https://nodejs.org< / a > ,点击绿色的 < strong > "LTS 推荐"< / strong > 按钮下载,双击 .msi 文件安装,全部默认 Next, 一路点到完成。< / p >
< / div >
< div class = "card" >
< h3 > 方式二: PowerShell 命令安装( winget) < / h3 >
< p > 右键开始菜单 → 选择 < strong > "PowerShell (管理员)"< / strong > 或 < strong > "终端 (管理员)"< / strong > ,然后执行:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell (管理员)< / span >
< code > < span class = "cmd" > winget< / span > install OpenJS.NodeJS.LTS< / code >
< / div >
< div class = "alert warning" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > 安装完成后必须重开 PowerShell! < / strong > < br >
关闭当前 PowerShell 窗口,重新打开一个新的,否则 < code > node< / code > 和 < code > npm< / code > 命令找不到。
< / div >
< / div >
< p style = "margin-top:0.8rem" > 验证安装成功(新开 PowerShell 后执行):< / p >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > node< / span > -v < span class = "comment" > # 应显示 v22.x.x< / span >
< span class = "cmd" > npm< / span > -v < span class = "comment" > # 应显示 10.x.x< / span > < / code >
< / div >
<!-- B. Git -->
< div class = "step" style = "margin-top:1.5rem" >
< div class = "step-icon blue" > B< / div >
< div class = "step-content" >
< h4 > 安装 Git < span class = "tag-win" > Windows< / span > (必须)< / h4 >
< p > 用于从服务器下载 Bookworm 配置文件,也会附带安装 openssl( 解密凭证需要) 。< / p >
< / div >
< / div >
< div class = "card" >
< p > 打开 < a href = "https://git-scm.com/download/win" target = "_blank" > https://git-scm.com/download/win< / a > ,下载 < strong > "64-bit Git for Windows Setup"< / strong > ,双击安装,全部 Next, 不用修改任何设置。< / p >
< / div >
< p > 验证:< / p >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > git< / span > --version < span class = "comment" > # 应显示 git version 2.x.x< / span > < / code >
< / div >
<!-- C. PowerShell 7 -->
< div class = "step" style = "margin-top:1.5rem" >
< div class = "step-icon yellow" > C< / div >
< div class = "step-content" >
< h4 > 安装 PowerShell 7 < span class = "tag-win" > Windows< / span > (推荐)< / h4 >
< p > Windows 自带的 PowerShell 5.1 有中文兼容问题,建议升级到 7, 用命令 < code > pwsh< / code > 启动。< / p >
< / div >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell (管理员)< / span >
< code > < span class = "cmd" > winget< / span > install Microsoft.PowerShell< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 如果 winget 不可用,去 < a href = "https://github.com/PowerShell/PowerShell/releases" target = "_blank" > GitHub Releases< / a > 下载 .msi 安装包。安装后用 < code > pwsh< / code > 命令启动新版 PowerShell。< / p >
< / div >
<!-- ===== macOS 专属 ===== -->
< div class = "mac-only" style = "display:none" >
<!-- A. Homebrew -->
< div class = "step" >
< div class = "step-icon blue" > A< / div >
< div class = "step-content" >
< h4 > 安装 Homebrew < span class = "tag-mac" > macOS< / span > (包管理器)< / h4 >
< p > Homebrew 是 macOS 上最常用的软件包管理器,用它可以一行命令安装 Node.js 和 Git。< / p >
< / div >
< / div >
< p > 打开 < strong > 终端< / strong > (按 < code > ⌘ + 空格< / code > 搜索"终端"或"Terminal"),执行:< / p >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > /bin/bash< / span > -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"< / code >
< / div >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 国内下载慢?用清华镜像加速< / strong > < br >
执行安装命令前,先在终端设置以下环境变量:< br >
< code > export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"< / code > < br >
< code > export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"< / code > < br >
设置后再执行上面的安装命令。
< / div >
< / div >
< div class = "alert warning" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > Apple Silicon (M1/M2/M3/M4) 用户注意!< / strong > < br >
安装完成后, Homebrew 不在默认 PATH 里,需要手动添加。终端会有提示,执行以下命令:
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "comment" > # Apple Silicon Mac 需要执行( Intel Mac 不需要)< / span >
< span class = "cmd" > echo< / span > 'eval "$(/opt/homebrew/bin/brew shellenv)"' > > ~/.zprofile
< span class = "cmd" > eval< / span > "$(/opt/homebrew/bin/brew shellenv)"< / code >
< / div >
< p style = "margin-top:0.8rem" > 验证安装成功:< / p >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > brew< / span > --version < span class = "comment" > # 应显示 Homebrew 4.x.x< / span > < / code >
< / div >
<!-- B. Node.js -->
< div class = "step" style = "margin-top:1.5rem" >
< div class = "step-icon blue" > B< / div >
< div class = "step-content" >
< h4 > 安装 Node.js < span class = "tag-mac" > macOS< / span > (必须)< / h4 >
< p > 用 Homebrew 一行命令安装。< / p >
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > brew< / span > install node< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 也可以从 < a href = "https://nodejs.org/zh-cn" target = "_blank" > nodejs.org< / a > 下载 .pkg 安装包(图形化安装向导)。< / p >
< p style = "margin-top:0.5rem" > 验证安装成功:< / p >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > node< / span > -v < span class = "comment" > # 应显示 v22.x.x< / span >
< span class = "cmd" > npm< / span > -v < span class = "comment" > # 应显示 10.x.x< / span > < / code >
< / div >
<!-- C. Git -->
< div class = "step" style = "margin-top:1.5rem" >
< div class = "step-icon blue" > C< / div >
< div class = "step-content" >
< h4 > 安装 Git < span class = "tag-mac" > macOS< / span > (必须)< / h4 >
< p > macOS 通常自带 Git, 如没有则用 Homebrew 安装。< / p >
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "comment" > # 检查是否已安装< / span >
< span class = "cmd" > git< / span > --version
< span class = "comment" > # 如果提示安装 Xcode Command Line Tools, 点击"安装"即可< / span >
< span class = "comment" > # 或者用 Homebrew 安装(推荐):< / span >
< span class = "cmd" > brew< / span > install git< / code >
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 2: 安装 Claude Code (common) -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 2< / span > 安装 Claude Code < span class = "tag-both" > 通用< / span > < / h2 >
< div class = "step" >
< div class = "step-icon green" > 1< / div >
< div class = "step-content" >
< h4 > 全局安装 Claude Code< / h4 >
< p class = "win-only" > 在 PowerShell 中执行(不需要管理员权限):< / p >
< p class = "mac-only" style = "display:none" > 在终端中执行:< / p >
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > npm< / span > i -g @anthropic-ai/claude-code< / code >
< / div >
< p class = "win-only" style = "color:var(--text-dim);font-size:0.85rem" > 安装过程需要几分钟,等待完成即可。如果报"执行策略"错误,见第 7 节排查。< / p >
< p class = "mac-only" style = "display:none;color:var(--text-dim);font-size:0.85rem" > 安装过程需要几分钟,等待完成即可。如果报 Permission denied, 在命令前加 < code > sudo< / code > ,或参考第 7 节排查。< / p >
< div class = "step" >
< div class = "step-icon green" > 2< / div >
< div class = "step-content" >
< h4 > 验证安装< / h4 >
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > claude< / span > --version < span class = "comment" > # 应显示版本号,如 1.x.x< / span > < / code >
< / div >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 不需要登录 Claude 账号!< / strong > < br >
Bookworm 使用自己的 API 中转站,安装完 Claude Code 后直接进入下一步。< strong > 不要< / strong > 执行 < code > claude login< / code > 或设置 < code > ANTHROPIC_API_KEY< / code > ,那是给个人用户用的。
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 3: 安装 Bookworm -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 3< / span > 安装 Bookworm( 核心步骤) < / h2 >
<!-- Step 1: git clone (common) -->
< div class = "step" >
< div class = "step-icon purple" > 1< / div >
< div class = "step-content" >
< h4 > 克隆引导仓库 < span class = "tag-both" > 通用< / span > < / h4 >
< p class = "win-only" > 在 PowerShell 中执行以下命令:< / p >
< p class = "mac-only" style = "display:none" > 在终端中执行以下命令:< / p >
< / div >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > git clone< / span > < span class = "url" > https://code.letcareme.com/bookworm/bookworm-boot.git< / span >
< span class = "cmd" > cd< / span > bookworm-boot< / code >
< / div >
< div class = "screenshot-note" >
< strong > 弹出用户名密码?< / strong > 输入管理员提供给你的 < strong > Gitea 账号密码< / strong > 。注意:这是 Gitea 的密码,不是下面说的主密码。
< / div >
<!-- Step 2: Windows -->
< div class = "win-only" >
< div class = "step" >
< div class = "step-icon purple" > 2< / div >
< div class = "step-content" >
< h4 > 双击运行安装脚本 < span class = "tag-win" > Windows< / span > < / h4 >
< p > 双击文件夹里的 < strong > 更新并启动Bookworm.bat< / strong > ,脚本会自动完成所有配置。< / p >
< / div >
< / div >
< div class = "card" >
< h3 > 或者用命令行运行< / h3 >
< p > 如果双击 .bat 不起作用,在 PowerShell 中手动执行:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > < span class = "cmd" > pwsh< / span > < span class = "flag" > -ExecutionPolicy Bypass< / span > -File auto-setup.ps1< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 没有 < code > pwsh< / code > 可用 < code > powershell< / code > 替代。< / p >
< / div >
<!-- Step 2: macOS -->
< div class = "mac-only" style = "display:none" >
< div class = "step" >
< div class = "step-icon purple" > 2< / div >
< div class = "step-content" >
< h4 > 运行安装脚本 < span class = "tag-mac" > macOS< / span > < / h4 >
< p > 在终端中执行安装脚本:< / p >
< / div >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "cmd" > bash< / span > Bookworm-Setup.sh< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 如果提示权限不足:< code > chmod +x Bookworm-Setup.sh & & ./Bookworm-Setup.sh< / code > < / p >
< / div >
<!-- Step 3: 输入主密码 (common) -->
< div class = "step" >
< div class = "step-icon purple" > 3< / div >
< div class = "step-content" >
< h4 > 输入主密码 < span class = "tag-both" > 通用< / span > < / h4 >
< p > 脚本会提示 < strong > "输入主密码解密凭证"< / strong > ,输入管理员提供的< strong > 主密码< / strong > (不是 Gitea 密码),按回车。< / p >
< p class = "mac-only" style = "display:none;margin-top:0.3rem" > 密码输入时终端< strong > 不显示任何字符< / strong > ,这是正常的安全设计,直接输入再按回车即可。< / p >
< p style = "margin-top:0.3rem;color:var(--text-dim);font-size:0.88rem" > < strong > 输错了可以重试,最多 3 次。< / strong > < / p >
< / div >
< / div >
< div class = "screenshot-note" >
< strong > 两个密码不要搞混:< / strong > < br >
< strong > Gitea 密码< / strong > = 第 1 步克隆仓库时输入的,用于从服务器下载文件< br >
< strong > 主密码< / strong > = 第 3 步解密 API 凭证时输入的,用于启动 Claude Code
< / div >
<!-- Step 4: 等待完成 (common) -->
< div class = "step" >
< div class = "step-icon green" > 4< / div >
< div class = "step-content" >
< h4 > 等待完成 < span class = "tag-both" > 通用< / span > < / h4 >
< p > 脚本会显示步骤进度,自动完成:前置检查 → 代理检测 → 解密凭证 → 同步配置 → 完整性校验 → 启动 Claude Code< / p >
< / div >
< / div >
< div class = "alert success" >
< span class = "alert-icon" > ✓ < / span >
< div >
< strong > 看到绿色 "Bookworm 就绪" 横幅就说明成功了!< / strong > < br >
Claude Code 启动后,脚本会验证配置完整性,全部 [OK] 后进入 Bookworm 模式。< br >
所有 API 请求通过中转站转发,不需要自己的 Claude 账号。
< / div >
< / div >
< div class = "alert warning" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > 看到黄色 "原生模式启动" 横幅?< / strong > < br >
说明 Bookworm 配置不完整。请重新运行安装脚本(不加 < code > -StartOnly< / code > 参数),或联系管理员。
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 4: 日常使用 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 4< / span > 日常使用< / h2 >
<!-- Windows 日常使用 -->
< div class = "win-only" >
< div class = "card" >
< h3 > 方法一:双击 .bat 文件 < span class = "tag-win" > Windows< / span > (推荐,最简单)< / h3 >
< p > < code > bookworm-boot< / code > 文件夹里有两个 .bat 文件,双击即可,无需打开 PowerShell: < / p >
< / div >
< table >
< tr > < th > 文件名< / th > < th > 作用< / th > < th > 适用场景< / th > < / tr >
< tr >
< td > < code > 启动Bookworm.bat< / code > < / td >
< td > 快速启动,不更新配置< / td >
< td > 每天日常使用< / td >
< / tr >
< tr >
< td > < code > 更新并启动Bookworm.bat< / code > < / td >
< td > 先同步最新 Skills 再启动< / td >
< td > 管理员通知有更新时< / td >
< / tr >
< / table >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 看到 "有新更新可用"? < / strong > < br >
说明管理员推送了更新。双击 < strong > 更新并启动Bookworm.bat< / strong > 即可同步。
< / div >
< / div >
< div class = "card" style = "margin-top:1rem" >
< h3 > 方法二:命令行(备用)< / h3 >
< p > 如果 .bat 文件无法运行,在 PowerShell 中手动执行:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > < span class = "comment" > # 快速启动< / span >
< span class = "cmd" > cd< / span > bookworm-boot
< span class = "cmd" > pwsh< / span > < span class = "flag" > -ExecutionPolicy Bypass< / span > -File install.ps1 < span class = "flag" > -StartOnly< / span >
< span class = "comment" > # 同步更新后启动< / span >
< span class = "cmd" > cd< / span > bookworm-boot
< span class = "cmd" > pwsh< / span > < span class = "flag" > -ExecutionPolicy Bypass< / span > -File install.ps1< / code >
< / div >
< / div >
<!-- macOS 日常使用 -->
< div class = "mac-only" style = "display:none" >
< div class = "card" >
< h3 > 方法一:终端别名 < span class = "tag-mac" > macOS< / span > (推荐,最简单)< / h3 >
< p > 安装脚本已自动添加别名到 < code > ~/.zshrc< / code > ,直接在终端输入:< / p >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "cmd" > bw< / span > < span class = "comment" > # 快速启动< / span >
< span class = "cmd" > bw-update< / span > < span class = "comment" > # 同步更新后启动< / span > < / code >
< / div >
< table style = "margin-top:0.8rem" >
< tr > < th > 命令< / th > < th > 作用< / th > < th > 适用场景< / th > < / tr >
< tr >
< td > < code > bw< / code > < / td >
< td > 直接启动 Claude Code + Bookworm< / td >
< td > 每天日常使用< / td >
< / tr >
< tr >
< td > < code > bw-update< / code > < / td >
< td > 更新 boot + 配置仓库< / td >
< td > 管理员通知有更新时< / td >
< / tr >
< / table >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 看到 "有 N 个新更新可用"? < / strong > < br >
说明管理员更新了 Skills 或 Hooks。执行 < code > bw-update< / code > 即可同步。
< / div >
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 5: 密码说明 (common) -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 5< / span > 密码说明 < span class = "tag-both" > 通用< / span > < / h2 >
< div class = "card" >
< h3 > 本系统有两个密码,不要搞混< / h3 >
< table >
< tr > < th > 名称< / th > < th > 用途< / th > < th > 何时输入< / th > < / tr >
< tr > < td > < strong > Gitea 密码< / strong > < / td > < td > 从服务器下载文件(克隆仓库)< / td > < td > 首次安装时, git 弹出要求< / td > < / tr >
< tr > < td > < strong > 主密码< / strong > < / td > < td > 解密 API 凭证< / td > < td > 每次启动脚本时提示输入< / td > < / tr >
< / table >
< / div >
< div class = "alert info" >
< span class = "alert-icon" > 💡 < / span >
< div >
< strong > 密码输错了?< / strong > 最多可以重试 3 次, 不用紧张。3 次都错才会退出,重新运行脚本即可。
< / div >
< / div >
< div class = "card" style = "margin-top:0.8rem" >
< h3 > 本日免密功能< / h3 >
< p > 首次解密成功后,脚本会询问 < strong > "今日内免密启动? (y/n)"< / strong > < / p >
< p > 选 < strong > y< / strong > 后,当天再次启动无需输入主密码,次日自动过期。< / p >
< p class = "win-only" style = "color:var(--text-dim);font-size:0.85rem;margin-top:0.3rem" >
凭证缓存在 Windows Credential Manager 中( DPAPI 加密,仅当前用户可读)。
< / p >
< p class = "mac-only" style = "display:none;color:var(--text-dim);font-size:0.85rem;margin-top:0.3rem" >
凭证缓存在 macOS 钥匙串 (Keychain) 中,仅当前用户可读。
< / p >
< / div >
< div class = "alert warning" style = "margin-top:0.8rem" >
< span class = "alert-icon" > 🔒 < / span >
< div > < strong > 主密码无法找回< / strong > — 请妥善保管。忘记后需联系管理员重新生成加密凭证文件。< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 6: 清理/卸载 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num" > 6< / span > 使用完毕 — 清理 / 卸载< / h2 >
<!-- Windows 卸载 -->
< div class = "win-only" >
< div class = "card" style = "border-color:var(--green)" >
< h3 style = "color:var(--green)" > 最简单:双击 卸载Bookworm.bat < span class = "tag-win" > Windows< / span > < / h3 >
< p > < code > bookworm-boot< / code > 文件夹里的 < strong > 卸载Bookworm.bat< / strong > ,双击即可一键完整卸载:终止进程 + 清除凭证 + 恢复原始配置 + 删除桌面快捷方式。< / p >
< / div >
< p style = "margin-top:1rem;color:var(--text-dim);font-size:0.9rem" > 或者用命令行精细控制:< / p >
< table >
< tr > < th > 场景< / th > < th > 命令< / th > < th > 说明< / th > < / tr >
< tr >
< td > < strong > 基础清理< / strong > < / td >
< td > < code > pwsh -File stop.ps1< / code > < / td >
< td > 清除环境变量,保留配置供下次快速启动< / td >
< / tr >
< tr >
< td > < strong > 完整恢复< / strong > < / td >
< td > < code > pwsh -File stop.ps1 -Restore< / code > < / td >
< td > 删除 Bookworm, 恢复电脑原始状态< / td >
< / tr >
< tr >
< td > < strong > 深度清理< / strong > < / td >
< td > < code > pwsh -File stop.ps1 -Restore -Deep< / code > < / td >
< td > 完整恢复 + 清除历史 + 清除 Git/凭证缓存< / td >
< / tr >
< / table >
< div class = "alert danger" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > 在他人电脑 / 公用电脑上务必卸载:< / strong > < br >
双击 < strong > 卸载Bookworm.bat< / strong > 或执行 < code > pwsh -File stop.ps1 -Restore -Deep< / code > ,确保不留下任何凭证。
< / div >
< / div >
< / div >
<!-- macOS 卸载 -->
< div class = "mac-only" style = "display:none" >
< div class = "card" style = "border-color:var(--green)" >
< h3 style = "color:var(--green)" > 快捷卸载脚本 < span class = "tag-mac" > macOS< / span > < / h3 >
< p > 在终端中执行:< code > bash uninstall-mac.sh --restore --deep< / code > < / p >
< / div >
< p style = "margin-top:1rem;color:var(--text-dim);font-size:0.9rem" > 或者手动执行清理命令:< / p >
< table >
< tr > < th > 场景< / th > < th > 命令< / th > < th > 说明< / th > < / tr >
< tr >
< td > < strong > 基础清理< / strong > < / td >
< td > < code > rm -rf ~/.claude< / code > < / td >
< td > 删除 Bookworm 配置,保留引导仓库供重新安装< / td >
< / tr >
< tr >
< td > < strong > 完整恢复< / strong > < / td >
< td > < code > rm -rf ~/.claude ~/bookworm-boot< / code > < / td >
< td > 删除所有 Bookworm 文件< / td >
< / tr >
< tr >
< td > < strong > 深度清理< / strong > < / td >
< td > < code > rm -rf ~/.claude ~/bookworm-boot & & sed -i '' '/Bookworm Portable/,+2d' ~/.zshrc & & git credential-osxkeychain erase < < < "host=code.letcareme.com"< / code > < / td >
< td > 完整恢复 + 清除 zshrc 别名 + 清除 Git 凭证< / td >
< / tr >
< / table >
< div class = "alert danger" >
< span class = "alert-icon" > ⚠ < / span >
< div >
< strong > 在他人电脑 / 公用电脑上务必清理:< / strong > < br >
执行深度清理命令,确保不留下任何凭证或配置文件。
< / div >
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- SECTION 7: 常见问题排查 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > < span class = "num red" > !< / span > 常见问题排查< / h2 >
<!-- ===== 通用问题 ===== -->
< div class = "card" >
< h3 > ❌ git clone 失败 / 认证失败 < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 解决步骤:< / strong > < / p >
< ol style = "color:var(--text-dim);padding-left:1.5rem;margin-top:0.3rem" >
< li > 浏览器打开 < code > https://code.letcareme.com< / code > 确认网站可访问< / li >
< li > 确认用户名密码正确(区分大小写)< / li >
< li > 如果开了 2FA, 需要用 Access Token 替代密码< / li >
< li class = "mac-only" style = "display:none" > 如果 macOS 弹出钥匙串对话框,点"始终允许"< / li >
< li > 检查网络是否需要代理才能访问< / li >
< / ol >
< / div >
< div class = "card" >
< h3 > ❌ 解密凭证失败 / 主密码错误 < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 原因:< / strong > 主密码区分大小写,且无法找回。< / p >
< p > < strong > 解决:< / strong > 仔细检查密码是否有多余空格或大小写问题。如确认忘记,联系管理员重新生成 < code > secrets.enc< / code > 。< / p >
< / div >
< div class = "card" >
< h3 > ❌ ECONNRESET / "Unable to connect to API" < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 原因:< / strong > 代理软件把国内中转站 < code > bww.letcareme.com< / code > 的流量也走了国际线路,导致连接被重置。< / p >
< p > < strong > 解决:< / strong > 手动设置 NO_PROXY 后重试,或在代理软件中将 < code > *.letcareme.com< / code > 加入直连规则:< / p >
< / div >
< div class = "win-only" >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > < span class = "comment" > # 设置中转站直连(不走代理)< / span >
$env:NO_PROXY = "bww.letcareme.com,code.letcareme.com"
< span class = "comment" > # 重新启动< / span >
< span class = "cmd" > cd< / span > bookworm-boot
< span class = "cmd" > pwsh< / span > < span class = "flag" > -ExecutionPolicy Bypass< / span > -File install.ps1 < span class = "flag" > -StartOnly< / span > < / code >
< / div >
< / div >
< div class = "mac-only" style = "display:none" >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "comment" > # 设置中转站直连(不走代理)< / span >
< span class = "cmd" > export< / span > NO_PROXY="bww.letcareme.com,code.letcareme.com"
< span class = "comment" > # 重新启动< / span >
< span class = "cmd" > bw< / span > < / code >
< / div >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 新版安装脚本已自动设置 NO_PROXY, < code > git pull< / code > 更新后此问题不再出现。< / p >
< div class = "card" >
< h3 > ❌ "Not logged in" / 直接运行 claude 报错 < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 原因:< / strong > API 凭证是进程级环境变量,只在安装脚本启动的进程中有效。新开终端直接运行 < code > claude< / code > 没有凭证。< / p >
< p > < strong > 解决:< / strong > < strong > 不要直接运行 < code > claude< / code > < / strong > ,必须通过以下方式启动:< / p >
< ul class = "win-only" style = "color:var(--text-dim);font-size:0.9rem;padding-left:1.2rem;margin-top:0.3rem" >
< li > 双击桌面 < strong > Bookworm< / strong > 快捷方式< / li >
< li > 双击 < strong > 启动Bookworm.bat< / strong > < / li >
< li > 命令行:< code > pwsh -ExecutionPolicy Bypass -File install.ps1 -StartOnly< / code > < / li >
< / ul >
< ul class = "mac-only" style = "display:none;color:var(--text-dim);font-size:0.9rem;padding-left:1.2rem;margin-top:0.3rem" >
< li > 终端输入 < code > bw< / code > (推荐)< / li >
< li > < code > cd ~/bookworm-boot & & bash Bookworm-Setup.sh< / code > < / li >
< / ul >
< / div >
< div class = "card" >
< h3 > ❌ 安装包下载太慢 < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 解决:< / strong > 设置 npm 淘宝镜像加速下载:< / p >
< / div >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "comment" > # 设置 npm 淘宝镜像(加速下载)< / span >
< span class = "cmd" > npm< / span > config set registry https://registry.npmmirror.com
< span class = "comment" > # 然后重新安装 Claude Code< / span >
< span class = "cmd" > npm< / span > i -g @anthropic-ai/claude-code< / code >
< / div >
< div class = "mac-only" style = "display:none" >
< div class = "code-block" onclick = "copyCode(this)" >
< code > < span class = "comment" > # Homebrew 清华镜像(如果 brew install 很慢)< / span >
< span class = "cmd" > export< / span > HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"< / code >
< / div >
< / div >
< div class = "card" >
< h3 > ❌ 需要自己的 Claude 账号吗? < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 不需要。< / strong > 所有 API 请求通过中转站转发,消耗中转站额度。你的电脑不需要任何 Anthropic 账号或订阅。< / p >
< / div >
< div class = "card" >
< h3 > ❌ 询问 AI 系统内部信息时被拒绝了? < span class = "tag-both" > 通用< / span > < / h3 >
< p > < strong > 这是正常行为。< / strong > Bookworm 的技能库、路由引擎、配置架构属于技术保密范围( NDA) , AI 被设定为不披露这些信息。< / p >
< p > < strong > 正确做法:< / strong > 直接告诉 AI 你要完成的任务(写代码、分析问题、设计方案等),它会自动调用最合适的专家能力。无需了解内部机制。< / p >
< / div >
< hr class = "platform-divider" >
<!-- ===== Windows 专属问题 ===== -->
< div class = "win-only" >
< div class = "card" >
< h3 > ❌ 输入 node -v 提示 "无法识别" < span class = "tag-win" > Windows< / span > < / h3 >
< p > < strong > 原因:< / strong > 安装 Node.js 后没有重开 PowerShell 窗口, PATH 没有刷新。< / p >
< p > < strong > 解决:< / strong > 关闭当前 PowerShell, 重新打开一个新的窗口再试。如果还不行, 手动刷新: < / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
< span class = "cmd" > node< / span > -v< / code >
< / div >
< div class = "card" >
< h3 > ❌ npm 报 "执行策略" / "Execution Policy" 错误 < span class = "tag-win" > Windows< / span > < / h3 >
< p > < strong > 原因:< / strong > Windows 默认禁止运行脚本。< / p >
< p > < strong > 解决:< / strong > 执行以下命令,提示确认时输入 < strong > Y< / strong > 回车:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 之后 npm 和 pwsh 脚本都能正常运行。< / p >
< div class = "card" >
< h3 > ❌ 提示 "openssl 未找到" < span class = "tag-win" > Windows< / span > < / h3 >
< p > < strong > 原因:< / strong > 解密凭证需要 openssl, 它随 Git for Windows 一起安装。< / p >
< p > < strong > 解决:< / strong > 确认 Git 已正确安装。脚本会自动搜索 < code > C:\Program Files\Git< / code > 下的 openssl.exe。如果 Git 装在其他盘,可能需要手动将 Git 的 bin 目录加入 PATH。< / p >
< / div >
< div class = "card" >
< h3 > ❌ Claude Code 启动后没有 Bookworm 横幅 < span class = "tag-win" > Windows< / span > < / h3 >
< p > < strong > 原因:< / strong > 配置文件未正确同步到 < code > ~/.claude< / code > 。< / p >
< p > < strong > 解决:< / strong > 不加 < code > -StartOnly< / code > 重新运行安装脚本,让它重新同步配置:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > PowerShell< / span >
< code > < span class = "cmd" > pwsh< / span > < span class = "flag" > -ExecutionPolicy Bypass< / span > -File install.ps1< / code >
< / div >
< / div >
<!-- ===== macOS 专属问题 ===== -->
< div class = "mac-only" style = "display:none" >
< div class = "card" >
< h3 > ❌ brew 命令找不到 < span class = "tag-mac" > macOS< / span > < / h3 >
< p > < strong > 原因:< / strong > Homebrew 未添加到 PATH( Apple Silicon Mac 常见)。< / p >
< p > < strong > 解决:< / strong > < / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "comment" > # Apple Silicon (M1/M2/M3/M4)< / span >
< span class = "cmd" > eval< / span > "$(/opt/homebrew/bin/brew shellenv)"
< span class = "comment" > # Intel Mac< / span >
< span class = "cmd" > eval< / span > "$(/usr/local/bin/brew shellenv)"< / code >
< / div >
< div class = "card" >
< h3 > ❌ npm 全局安装报 "Permission denied" < span class = "tag-mac" > macOS< / span > < / h3 >
< p > < strong > 原因:< / strong > macOS 默认目录权限限制。< / p >
< p > < strong > 解决方式一(推荐):< / strong > 修改 npm 全局目录:< / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "cmd" > mkdir< / span > -p ~/.npm-global
< span class = "cmd" > npm< / span > config set prefix '~/.npm-global'
< span class = "cmd" > echo< / span > 'export PATH=~/.npm-global/bin:$PATH' > > ~/.zshrc
< span class = "cmd" > source< / span > ~/.zshrc
< span class = "comment" > # 然后重新安装< / span >
< span class = "cmd" > npm< / span > i -g @anthropic-ai/claude-code< / code >
< / div >
< p style = "color:var(--text-dim);font-size:0.85rem" > 解决方式二(简单):在命令前加 < code > sudo< / code > (短期可用,不推荐长期使用)。< / p >
< div class = "card" >
< h3 > ❌ openssl 版本不兼容 < span class = "tag-mac" > macOS< / span > < / h3 >
< p > < strong > 原因:< / strong > macOS 自带的是 LibreSSL, 部分加密参数格式与 OpenSSL 不同。< / p >
< p > < strong > 解决:< / strong > 安装 Homebrew 版 OpenSSL( 脚本会自动检测路径) : < / p >
< / div >
< div class = "code-block has-label" onclick = "copyCode(this)" >
< span class = "label" > 终端 (Terminal)< / span >
< code > < span class = "cmd" > brew< / span > install openssl
< span class = "comment" > # 安装脚本会自动检测并使用 Homebrew 安装的 openssl 路径< / span > < / code >
< / div >
< / div >
< / div >
<!-- ============================================================ -->
<!-- FOOTER: 安装检查清单 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > 安装检查清单< / h2 >
< p style = "color:var(--text-dim);margin-bottom:0.5rem" > 逐项确认,全部打勾即可开始使用:< / p >
<!-- Windows 清单 -->
< div class = "win-only" >
< ul class = "checklist" >
< li > < strong > Node.js 已安装< / strong > — < code > node -v< / code > 显示版本号 (v22.x.x)< / li >
< li > < strong > Git 已安装< / strong > — < code > git --version< / code > 显示版本号< / li >
< li > < strong > npm 可用< / strong > — < code > npm -v< / code > 显示版本号(如报错先设 ExecutionPolicy) < / li >
< li > < strong > Claude Code 已安装< / strong > — < code > claude --version< / code > 显示版本号< / li >
< li > < strong > PowerShell 7 已安装< / strong > — < code > pwsh --version< / code > 显示 7.x( 推荐但非必须) < / li >
< li > < strong > 已获取 Gitea 账号密码< / strong > — 管理员提供< / li >
< li > < strong > 已获取主密码< / strong > — 管理员提供(用于解密 API 凭证)< / li >
< li > < strong > 能访问 code.letcareme.com< / strong > — 浏览器打开确认可正常访问< / li >
< li > < strong > 代理/VPN 已启动< / strong > — 国内必须,脚本自动检测 (Clash / V2Ray / 快柠檬等)< / li >
< / ul >
< / div >
<!-- macOS 清单 -->
< div class = "mac-only" style = "display:none" >
< ul class = "checklist" >
< li > < strong > Homebrew 已安装< / strong > — < code > brew --version< / code > 显示版本号< / li >
< li > < strong > Node.js 已安装< / strong > — < code > node -v< / code > 显示版本号 (v22.x.x)< / li >
< li > < strong > Git 已安装< / strong > — < code > git --version< / code > 显示版本号< / li >
< li > < strong > npm 可用< / strong > — < code > npm -v< / code > 显示版本号< / li >
< li > < strong > Claude Code 已安装< / strong > — < code > claude --version< / code > 显示版本号< / li >
< li > < strong > 已获取 Gitea 账号密码< / strong > — 管理员提供< / li >
< li > < strong > 已获取主密码< / strong > — 管理员提供(用于解密 API 凭证)< / li >
< li > < strong > 能访问 code.letcareme.com< / strong > — 浏览器打开确认可正常访问< / li >
< li > < strong > 代理/VPN 已启动< / strong > — 国内必须,脚本自动检测 (ClashX / Surge / V2Ray 等)< / li >
< / ul >
< / div >
< / div >
<!-- ============================================================ -->
<!-- 快速参考 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > 快速参考< / h2 >
<!-- Windows 参考表 -->
< div class = "win-only" >
< table >
< tr > < th > 操作< / th > < th > 最简方式< / th > < th > 命令行方式< / th > < / tr >
< tr > < td > 首次安装< / td > < td > git clone + 双击< br > < strong > 更新并启动Bookworm.bat< / strong > < / td > < td > < code > pwsh -ExecutionPolicy Bypass -File install.ps1< / code > < / td > < / tr >
< tr > < td > 快速启动< / td > < td > 双击 < strong > 启动Bookworm.bat< / strong > < / td > < td > < code > pwsh -File install.ps1 -StartOnly< / code > < / td > < / tr >
< tr > < td > 同步更新< / td > < td > 双击 < strong > 更新并启动Bookworm.bat< / strong > < / td > < td > < code > pwsh -File install.ps1< / code > < / td > < / tr >
< tr > < td > 基础清理< / td > < td colspan = "2" > < code > pwsh -ExecutionPolicy Bypass -File stop.ps1< / code > < / td > < / tr >
< tr > < td > 完整恢复< / td > < td colspan = "2" > < code > pwsh -ExecutionPolicy Bypass -File stop.ps1 -Restore< / code > < / td > < / tr >
< tr > < td > 深度清理< / td > < td colspan = "2" > < code > pwsh -ExecutionPolicy Bypass -File stop.ps1 -Restore -Deep< / code > < / td > < / tr >
< / table >
< / div >
<!-- macOS 参考表 -->
< div class = "mac-only" style = "display:none" >
< table >
< tr > < th > 操作< / th > < th > 快捷命令< / th > < th > 完整命令< / th > < / tr >
< tr > < td > 首次安装< / td > < td > < code > bash Bookworm-Setup.sh< / code > < / td > < td > < code > cd ~/bookworm-boot & & bash Bookworm-Setup.sh< / code > < / td > < / tr >
< tr > < td > 快速启动< / td > < td > < code > bw< / code > < / td > < td > < code > NO_PROXY="bww.letcareme.com,code.letcareme.com,localhost" claude< / code > < / td > < / tr >
< tr > < td > 同步更新< / td > < td > < code > bw-update< / code > < / td > < td > < code > cd ~/bookworm-boot & & git pull & & cd ~/.claude & & git pull< / code > < / td > < / tr >
< tr > < td > 基础清理< / td > < td colspan = "2" > < code > rm -rf ~/.claude< / code > < / td > < / tr >
< tr > < td > 完整恢复< / td > < td colspan = "2" > < code > rm -rf ~/.claude ~/bookworm-boot< / code > < / td > < / tr >
< tr > < td > 深度清理< / td > < td colspan = "2" > < code > rm -rf ~/.claude ~/bookworm-boot & & sed -i '' '/Bookworm/,+2d' ~/.zshrc< / code > < / td > < / tr >
< / table >
< / div >
< / div >
<!-- ============================================================ -->
<!-- 安全须知 -->
<!-- ============================================================ -->
< div class = "section" >
< h2 > 安全须知 < span class = "tag-both" > 通用< / span > < / h2 >
< table >
< tr > < th > 特性< / th > < th > 规格< / th > < / tr >
< tr > < td > 凭证加密< / td > < td > AES-256-CBC + PBKDF2 (600,000 迭代)< / td > < / tr >
< tr > < td > 传输加密< / td > < td > HTTPS (TLS 1.2+, Let's Encrypt 证书)< / td > < / tr >
< tr class = "win-only" >
< td > 凭证存储< / td >
< td > 进程级环境变量 + 可选本日缓存 (Windows Credential Manager, DPAPI 加密, 当日 23:59 过期)< / td >
< / tr >
< tr class = "mac-only" style = "display:none" >
< td > 凭证存储< / td >
< td > 进程级环境变量 + 可选本日缓存 (macOS Keychain, 当日 23:59 过期)< / td >
< / tr >
< tr > < td > 登录保护< / td > < td > fail2ban (5 次失败/小时 → 封禁 24 小时)< / td > < / tr >
< tr > < td > 技术保密< / td > < td > NDA — 系统内部架构、路由规则、技能库不对外披露< / td > < / tr >
< / table >
< div class = "alert warning" style = "margin-top:1rem" >
< span class = "alert-icon" > 🔒 < / span >
< div >
< strong > 主密码无法找回< / strong > — 请妥善保管,不要写在便利贴上。忘记后需管理员重新生成加密凭证。
< / div >
< / div >
< / div >
< / div >
<!-- ================================================================ -->
<!-- FOOTER -->
<!-- ================================================================ -->
< div class = "footer" >
Bookworm Portable v1.5-NDA — 保姆式安装手册 (Windows + macOS 统一版)< br >
© 2026 Bookworm Smart Assistant — 技术保密 · 禁止转发
< / div >
<!-- ================================================================ -->
<!-- JAVASCRIPT -->
<!-- ================================================================ -->
< script >
// ===== 平台自动检测 =====
const isMac = navigator.platform.toUpperCase().includes('MAC') ||
navigator.userAgent.toUpperCase().includes('MAC');
let currentPlatform = isMac ? 'mac' : 'win';
// 切换平台显示
function switchPlatform(platform) {
currentPlatform = platform;
// 显示/隐藏平台专属内容
document.querySelectorAll('.win-only').forEach(el => {
el.style.display = platform === 'win' ? '' : 'none';
});
document.querySelectorAll('.mac-only').forEach(el => {
el.style.display = platform === 'mac' ? '' : 'none';
});
// 更新 tab 按钮状态
const tabWin = document.querySelector('.tab-win');
const tabMac = document.querySelector('.tab-mac');
if (platform === 'win') {
tabWin.classList.add('active');
tabWin.classList.remove('inactive');
tabMac.classList.add('inactive');
tabMac.classList.remove('active');
} else {
tabMac.classList.add('active');
tabMac.classList.remove('inactive');
tabWin.classList.add('inactive');
tabWin.classList.remove('active');
}
// 更新检测文字
document.getElementById('detected-os').textContent = platform === 'win' ? 'Windows' : 'macOS';
}
// ===== 点击复制代码块 =====
function copyCode(el) {
const code = el.querySelector('code');
if (!code) return;
// 获取纯文本,去掉多余空白行
const text = code.innerText.trim();
if (navigator.clipboard & & navigator.clipboard.writeText) {
navigator.clipboard.writeText(text).then(() => {
el.classList.add('copied');
setTimeout(() => el.classList.remove('copied'), 1500);
}).catch(() => fallbackCopy(el, text));
} else {
fallbackCopy(el, text);
}
}
function fallbackCopy(el, text) {
const ta = document.createElement('textarea');
ta.value = text;
ta.style.position = 'fixed';
ta.style.opacity = '0';
document.body.appendChild(ta);
ta.select();
try {
document.execCommand('copy');
el.classList.add('copied');
setTimeout(() => el.classList.remove('copied'), 1500);
} catch (e) {}
document.body.removeChild(ta);
}
// ===== 初始化:根据检测结果设置平台 =====
// 在 DOM 加载后执行
document.addEventListener('DOMContentLoaded', function() {
switchPlatform(currentPlatform);
});
// 如果脚本在 DOMContentLoaded 后执行,直接调用
if (document.readyState !== 'loading') {
switchPlatform(currentPlatform);
}
< / script >
< / body >
< / html >