bookworm-boot/quick-start.html
bookworm 9d1cef0331 fix: v2.2.2 - Python/pwsh 降为可选依赖 + quick-start 安装前准备
- Python 从核心 deps 移除 (只在 uvx MCP 需要)
- PowerShell 7 降为可选 (系统 PS 5.1 可替代)
- 非核心依赖 winget 不可用时不弹阻断对话框
- quick-start.html 新增"安装前准备"区块 (ExecutionPolicy + 手动装依赖)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 23:24:15 +08:00

258 lines
12 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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 - 日常使用速查卡</title>
<style>
@page { size: A4; margin: 12mm; }
@media print {
body { background: #fff !important; color: #111 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.no-print { display: none !important; }
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #fff; color: #1a1a2e;
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
width: 210mm; min-height: 297mm; margin: 0 auto;
padding: 10mm 14mm; font-size: 10pt; line-height: 1.55;
}
/* Header */
.header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2.5px solid #2563eb; padding-bottom: 8px; margin-bottom: 10px; }
.header h1 { font-size: 17pt; font-weight: 800; color: #1e293b; }
.header h1 span { color: #2563eb; }
.header .ver { font-size: 8pt; color: #64748b; text-align: right; line-height: 1.4; }
/* Section */
.section { margin-bottom: 10px; }
.section-title {
font-size: 11pt; font-weight: 700; color: #fff; background: #2563eb;
padding: 3px 10px; border-radius: 4px; margin-bottom: 6px; display: inline-block;
}
.section-title.orange { background: #ea580c; }
.section-title.green { background: #16a34a; }
.section-title.red { background: #dc2626; }
.section-title.purple { background: #7c3aed; }
/* Table */
table { width: 100%; border-collapse: collapse; font-size: 9.5pt; margin-bottom: 6px; }
th { background: #f1f5f9; color: #475569; font-size: 8pt; text-transform: uppercase; letter-spacing: 0.5px; text-align: left; padding: 4px 8px; border-bottom: 1.5px solid #cbd5e1; }
td { padding: 5px 8px; border-bottom: 1px solid #e2e8f0; vertical-align: top; }
tr:last-child td { border-bottom: none; }
code { background: #f1f5f9; padding: 1px 5px; border-radius: 3px; font-family: 'Cascadia Code', 'Consolas', monospace; font-size: 8.5pt; color: #1e40af; }
/* Cards */
.card { border: 1.5px solid #e2e8f0; border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.card.highlight { border-color: #2563eb; background: #eff6ff; }
.card.warn { border-color: #ea580c; background: #fff7ed; }
.card.danger { border-color: #dc2626; background: #fef2f2; }
.card h3 { font-size: 9.5pt; font-weight: 700; margin-bottom: 3px; }
.card p, .card li { font-size: 9pt; color: #475569; }
/* Flow */
.flow { display: flex; align-items: center; gap: 0; justify-content: center; margin: 6px 0; }
.flow-node { background: #f8fafc; border: 1.5px solid #cbd5e1; border-radius: 6px; padding: 4px 12px; font-size: 9pt; text-align: center; font-weight: 600; }
.flow-node.active { border-color: #16a34a; background: #f0fdf4; color: #16a34a; }
.flow-arrow { color: #94a3b8; font-size: 12pt; padding: 0 2px; }
/* Two columns */
.cols { display: flex; gap: 10px; }
.cols > * { flex: 1; }
/* Shortcut key style */
kbd { display: inline-block; background: #f1f5f9; border: 1px solid #cbd5e1; border-radius: 3px; padding: 0 4px; font-size: 8pt; font-family: 'Consolas', monospace; box-shadow: 0 1px 0 #94a3b8; }
.footer { text-align: center; font-size: 7.5pt; color: #94a3b8; border-top: 1px solid #e2e8f0; padding-top: 6px; margin-top: 8px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.dot.green { background: #16a34a; }
.dot.blue { background: #2563eb; }
.dot.red { background: #dc2626; }
</style>
</head>
<body>
<div class="header">
<h1>Bookworm <span>Portable</span> 日常速查卡</h1>
<div class="ver">v1.5 | 92 Skills / 18 Agents / 34 Hooks<br>打印后贴在显示器旁边</div>
</div>
<!-- ==================== 安装前准备 ==================== -->
<div class="section">
<span class="section-title red">安装前准备 (仅首次)</span>
<div class="card warn">
<h3>&#9888; 首次运行 Bookworm-Setup.exe 前,请确认以下两项</h3>
<table>
<tr><th style="width:30%">检查项</th><th>操作</th></tr>
<tr>
<td><strong>1. PowerShell 执行策略</strong></td>
<td><kbd>Win</kbd>+<kbd>R</kbd> 输入 <code>powershell</code> 回车,执行:<br>
<code>Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force</code><br>
<span style="font-size:8pt;color:#64748b">否则 npm/node 脚本会被系统阻止运行</span></td>
</tr>
<tr>
<td><strong>2. 代理已开启</strong></td>
<td>启动 Clash / V2Ray / 快柠檬(任选一个),安装器需要下载依赖</td>
</tr>
</table>
<p style="font-size:8pt;color:#64748b;margin-top:4px">如果电脑没有 wingetWin10 旧版本),安装器可能无法自动装 Node.js 和 Git。请手动安装<br>
Node.js &rarr; <code>https://nodejs.org</code> &nbsp;|&nbsp; Git &rarr; <code>https://git-scm.com</code></p>
</div>
</div>
<!-- ==================== 打开 PowerShell ==================== -->
<div class="section">
<span class="section-title">第零步:打开 PowerShell</span>
<div class="cols">
<div class="card highlight">
<h3>方式一:运行框(最快)</h3>
<p><kbd>Win</kbd>+<kbd>R</kbd> &rarr; 输入 <code>powershell</code> &rarr; 回车<br>
<span style="font-size:8pt;color:#64748b">如已装 PowerShell 7输入 <code>pwsh</code> 效果更好</span></p>
</div>
<div class="card highlight">
<h3>方式二:终端新标签页</h3>
<p>已打开终端/PowerShell 窗口时:<br><kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> 打开新标签页 (自动用 PowerShell 7)</p>
</div>
<div class="card highlight">
<h3>方式三:搜索</h3>
<p><kbd>Win</kbd>&rarr; 输入 <strong>powershell</strong> &rarr; 点击 <strong>"PowerShell 7"</strong><strong>"Windows PowerShell"</strong></p>
</div>
</div>
<p style="font-size:8.5pt;color:#64748b;margin-top:2px">打开后看到 <code>PS C:\Users\你的用户名></code> 即为成功。如果桌面有 Bookworm 快捷方式,可跳过此步直接双击。</p>
</div>
<!-- ==================== 每日启动 ==================== -->
<div class="section">
<span class="section-title">每日启动 (30 秒)</span>
<div class="flow">
<div class="flow-node">开代理</div>
<span class="flow-arrow">&#10132;</span>
<div class="flow-node">双击 <strong>Bookworm</strong></div>
<span class="flow-arrow">&#10132;</span>
<div class="flow-node">等横幅出现</div>
<span class="flow-arrow">&#10132;</span>
<div class="flow-node active">开始工作</div>
</div>
<table>
<tr><th style="width:30%">操作</th><th>做法</th></tr>
<tr><td><span class="dot green"></span><strong>快速启动</strong></td><td>双击桌面 <strong>Bookworm</strong> 快捷方式,或双击 <code>启动Bookworm.bat</code></td></tr>
<tr><td><span class="dot blue"></span><strong>更新后启动</strong></td><td>双击 <code>更新并启动Bookworm.bat</code> (管理员通知有更新时)</td></tr>
<tr><td><span class="dot red"></span><strong>命令行启动</strong></td><td><code>cd bookworm-boot</code> &rarr; <code>pwsh -ExecutionPolicy Bypass -File install.ps1 -StartOnly</code></td></tr>
</table>
<div class="card warn">
<h3>&#9888; 启动前必须开代理</h3>
<p>Clash / V2Ray / 快柠檬 &mdash; 任选一个开着即可。脚本自动检测,无需手动配置。</p>
</div>
</div>
<!-- ==================== 关键规则 ==================== -->
<div class="section">
<span class="section-title red">三条铁律</span>
<div class="cols">
<div class="card danger">
<h3>&#10060; 不要直接运行 claude</h3>
<p>新开 PowerShell 输入 <code>claude</code> 会报 "Not logged in"。<strong>必须通过 .bat 或 install.ps1 启动</strong>,脚本会注入 API 凭证。</p>
</div>
<div class="card danger">
<h3>&#10060; 密码不要外传</h3>
<p><strong>Gitea 密码</strong> = 下载用<br><strong>主密码</strong> = 解密 API 凭证<br>两个密码都只能你自己知道。</p>
</div>
<div class="card danger">
<h3>&#10060; 公用电脑必须卸载</h3>
<p>离开前双击 <code>卸载Bookworm.bat</code>,清除全部凭证和配置痕迹。</p>
</div>
</div>
</div>
<!-- ==================== 常用命令 ==================== -->
<div class="section">
<span class="section-title purple">Claude Code 常用操作</span>
<div class="cols">
<div>
<table>
<tr><th>快捷键</th><th>功能</th></tr>
<tr><td><kbd>Enter</kbd></td><td>发送消息</td></tr>
<tr><td><kbd>Shift+Enter</kbd></td><td>换行 (不发送)</td></tr>
<tr><td><kbd>Esc</kbd></td><td>中断当前操作</td></tr>
<tr><td><kbd>Ctrl+C</kbd></td><td>退出 Claude Code</td></tr>
<tr><td><kbd>Tab</kbd></td><td>自动补全 / 选择建议</td></tr>
</table>
</div>
<div>
<table>
<tr><th>斜杠命令</th><th>功能</th></tr>
<tr><td><code>/help</code></td><td>帮助信息</td></tr>
<tr><td><code>/clear</code></td><td>清除上下文 (长对话后用)</td></tr>
<tr><td><code>/compact</code></td><td>压缩上下文</td></tr>
<tr><td><code>/model</code></td><td>切换模型</td></tr>
<tr><td><code>/cost</code></td><td>查看本次消耗</td></tr>
</table>
</div>
</div>
</div>
<!-- ==================== 故障速查 ==================== -->
<div class="section">
<span class="section-title orange">故障速查 (5 大常见问题)</span>
<table>
<tr><th style="width:30%">症状</th><th style="width:25%">原因</th><th>解决</th></tr>
<tr>
<td><strong>ECONNRESET</strong><br><span style="font-size:8pt;color:#64748b">Unable to connect to API</span></td>
<td>代理把国内中转站流量走了国际线路</td>
<td><code>$env:NO_PROXY="bww.letcareme.com"</code> 或更新脚本 <code>git pull</code></td>
</tr>
<tr>
<td><strong>Not logged in</strong></td>
<td>直接运行了 <code>claude</code></td>
<td>关掉,改用 .bat 或 install.ps1 启动</td>
</tr>
<tr>
<td><strong>密码错误 3 次退出</strong></td>
<td>主密码不对 (区分大小写)</td>
<td>仔细重试,忘记联系管理员</td>
</tr>
<tr>
<td><strong>完整性校验 WARN</strong><br><span style="font-size:8pt;color:#64748b">大量文件哈希不匹配</span></td>
<td>配置已更新但哈希文件未同步</td>
<td>输入 <strong>y</strong> 继续,不影响使用</td>
</tr>
<tr>
<td><strong>无代理继续?</strong></td>
<td>没检测到代理软件</td>
<td>先启动 Clash/V2Ray再重新运行脚本</td>
</tr>
</table>
</div>
<!-- ==================== 清理/卸载 ==================== -->
<div class="section">
<span class="section-title green">清理 / 卸载</span>
<table>
<tr><th>场景</th><th>做法</th></tr>
<tr><td><strong>日常关闭</strong></td><td>在 Claude Code 里按 <kbd>Ctrl+C</kbd> 退出,或直接关窗口。凭证自动清除。</td></tr>
<tr><td><strong>彻底卸载</strong></td><td>双击 <code>卸载Bookworm.bat</code> &mdash; 终止进程 + 清除凭证 + 恢复原始配置 + 删除快捷方式</td></tr>
<tr><td><strong>命令行卸载</strong></td><td><code>pwsh -ExecutionPolicy Bypass -File stop.ps1 -Restore -Deep</code></td></tr>
</table>
</div>
<!-- ==================== 联系方式 ==================== -->
<div class="card highlight" style="text-align:center">
<p style="font-size:9.5pt"><strong>遇到问题?</strong> 联系管理员 &mdash; 提供截图 + 错误信息,通常 5 分钟内解决</p>
</div>
<div class="footer">
Bookworm Portable v1.5 &mdash; 日常使用速查卡 &mdash; &copy; 2026 Bookworm Smart Assistant &mdash; 建议打印后贴在显示器旁边
</div>
</body>
</html>