From 816c19f67301f51cc1724789067cf6043cd646f5 Mon Sep 17 00:00:00 2001 From: leesu Date: Wed, 1 Apr 2026 14:30:05 +0800 Subject: [PATCH] update: BOM fix, code.letcareme.com domain, guide.html, openssl path fix --- README.txt | 2 +- guide.html | 531 ++++++++++++++++++++++++++++++++++++++++++++++++++++ install.ps1 | 6 +- stop.ps1 | 2 +- 4 files changed, 536 insertions(+), 5 deletions(-) create mode 100644 guide.html diff --git a/README.txt b/README.txt index 44e4e1e..c6f4a08 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -Bookworm Portable v1.1 - 纯云端便携部署工具包 +Bookworm Portable v1.1 - 纯云端便携部署工具包 ================================================ === 文件说明 === diff --git a/guide.html b/guide.html new file mode 100644 index 0000000..fa8a631 --- /dev/null +++ b/guide.html @@ -0,0 +1,531 @@ + + + + + +Bookworm Portable - 使用教程 + + + + + +
+
+  ____              _
+ | __ )  ___   ___ | | ____      _____  _ __ _ __ ___
+ |  _ \ / _ \ / _ \| |/ /\ \ /\ / / _ \| '__| '_ ` _ \
+ | |_) | (_) | (_) |   <  \ V  V / (_) | |  | | | | | |
+ |____/ \___/ \___/|_|\_\  \_/\_/ \___/|_|  |_| |_| |_|
+  
+

Bookworm Portable 使用教程

+

纯云端便携部署 — 任意电脑一行命令激活 Bookworm 全套能力

+
+ 97 Skills + 18 Agents + 28 Hooks + AES-256 加密 + HTTPS 传输 +
+
+ +
+ + +
+

工作原理

+

Bookworm 配置存储在私有 Gitea 服务器上,目标机通过 HTTPS 克隆并自动渲染为本地配置,凭证全程加密,不落盘。

+ +
+
Gitea 私有仓
code.letcareme.com
+ +
git clone
HTTPS 加密
+ +
渲染模板
settings.json
+ +
解密凭证
AES-256
+ +
Claude Code
Bookworm 激活
+
+
+ + +
+

0前置要求

+

目标电脑需要预先安装以下软件:

+ + + + + + + +
软件必须安装方式
Claude Codenpm i -g @anthropic-ai/claude-code
Node.js ≥ 18nodejs.org
Gitgit-scm.com
PowerShell 7推荐winget install Microsoft.PowerShell
Python 3.x可选缺失则 3 个 MCP 服务降级
+
+ + +
+

1安装 Bookworm(首次)

+ +
+
1
+
+

克隆引导仓库

+

打开 PowerShell,运行:

+
+
+
+ PowerShell + +git clone https://code.letcareme.com/leesu/bookworm-boot.git
+cd bookworm-boot +
+
+

系统会提示输入 Gitea 用户名和密码。

+ +
+
2
+
+

运行安装脚本

+

执行安装,自动克隆配置 + 解密凭证 + 渲染模板 + 启动 Claude Code:

+
+
+
+ PowerShell + +pwsh -ExecutionPolicy Bypass -File install.ps1 + +
+ +
+
3
+
+

输入主密码

+

脚本会提示输入主密码来解密 API 凭证。输入后自动完成配置并启动 Claude Code。

+
+
+ +
+ +
完成!Claude Code 启动后即进入 Bookworm 模式,97 个 Skills、18 个 Agents、28 个 Hooks 全部激活。所有 API 请求通过中转站转发。
+
+
+ + +
+

2后续使用(已安装过)

+

已安装过的电脑,再次使用时只需:

+
+ PowerShell + +cd bookworm-boot
+pwsh -ExecutionPolicy Bypass -File install.ps1 -StartOnly +
+
+

-StartOnly 跳过 git clone,直接解密凭证并启动。

+ +

如需同步最新配置更新:

+
+ PowerShell + +cd bookworm-boot
+pwsh -ExecutionPolicy Bypass -File install.ps1 +
+
+

不加 -StartOnly 会自动 git pull 拉取最新 Skills/Hooks 更新。

+
+ + +
+

3使用完毕 — 清理

+

离开电脑前,清理环境变量和凭证痕迹:

+ +
+

基础清理(保留配置,下次可快速启动)

+
+ pwsh -ExecutionPolicy Bypass -File stop.ps1 +
+
+ +
+

完整恢复(删除 Bookworm,恢复电脑原始状态)

+
+ pwsh -ExecutionPolicy Bypass -File stop.ps1 -Restore +
+
+ +
+

深度清理(含 PowerShell 历史 + Git 凭证缓存)

+
+ pwsh -ExecutionPolicy Bypass -File stop.ps1 -Restore -Deep +
+
+
+ + +
+

!安全须知

+ +
+ +
+ 主密码无法找回
+ 主密码用于解密 API 凭证,没有重置机制。请牢记或存入密码管理器。 +
+
+ +
+ 🔒 +
+ 凭证不落盘
+ API Key 仅存在于当前进程的环境变量中。关闭终端或运行 stop.ps1 后自动消失,不会写入磁盘或注册表。 +
+
+ +
+ +
+ 在他人电脑上使用后务必清理
+ 运行 stop.ps1 -Restore -Deep 确保不留痕迹。尤其注意公用电脑。 +
+
+ + + + + + + + +
安全特性规格
凭证加密AES-256-CBC + PBKDF2 (600,000 迭代)
传输加密HTTPS (TLS 1.2+, Let's Encrypt 证书)
凭证存储进程级环境变量,不写磁盘
登录保护fail2ban (5次失败/小时 → 封禁24h)
完整性校验SHA-256 文件哈希验证
+
+ + +
+

?常见问题

+ +
+

Q: 提示 "openssl 未找到"

+

确认 Git for Windows 已安装。脚本会自动搜索 C:\Program Files\GitD:\Git 下的 openssl。

+
+ +
+

Q: 提示 "执行策略" 错误

+

使用 pwsh -ExecutionPolicy Bypass -File install.ps1 运行,或以管理员身份执行 Set-ExecutionPolicy RemoteSigned

+
+ +
+

Q: 克隆失败 / Gitea 不可达

+

检查网络是否能访问 https://code.letcareme.com。如在内网环境,可能需要配置代理。

+
+ +
+

Q: 解密失败

+

确认主密码正确(区分大小写)。如忘记密码,需要管理员重新运行 encrypt-secrets.ps1 生成新的 secrets.enc。

+
+ +
+

Q: Claude Code 启动后没有 Bookworm 横幅

+

检查 ~/.claude/CLAUDE.md 是否存在。运行 install.ps1(不加 -StartOnly)重新同步。

+
+ +
+

Q: 目标机需要自己的 Claude 订阅吗?

+

不需要。所有 API 请求通过中转站转发,消耗中转站额度,目标机无需任何 Anthropic 账号。

+
+
+ + +
+

快速参考卡片

+ + + + + + + + +
场景命令
首次安装git clone ... && pwsh -File install.ps1
快速启动pwsh -File install.ps1 -StartOnly
同步更新pwsh -File install.ps1
基础清理pwsh -File stop.ps1
完整恢复pwsh -File stop.ps1 -Restore
深度清理pwsh -File stop.ps1 -Restore -Deep
+
+ +
+ + + + + diff --git a/install.ps1 b/install.ps1 index 277f924..0a5f37c 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Bookworm Portable - 安装/启动脚本 .DESCRIPTION @@ -39,8 +39,8 @@ $DebugDir = Join-Path $ClaudeTarget "debug" # ─── openssl 检测 ──────────────────────────────────── $opensslCmd = (Get-Command openssl -ErrorAction SilentlyContinue)?.Source if (-not $opensslCmd) { - $gitOpenssl = "C:\Program Files\Git\usr\bin\openssl.exe" - if (Test-Path $gitOpenssl) { $opensslCmd = $gitOpenssl } + $searchPaths = @("C:\Program Files\Git\usr\bin\openssl.exe", "D:\Git\usr\bin\openssl.exe", "D:\Git\mingw64\bin\openssl.exe", "C:\Program Files\Git\mingw64\bin\openssl.exe") + $opensslCmd = $searchPaths | Where-Object { Test-Path $_ } | Select-Object -First 1 } # ─── 辅助函数 ──────────────────────────────────────── diff --git a/stop.ps1 b/stop.ps1 index 4985116..8af10b8 100644 --- a/stop.ps1 +++ b/stop.ps1 @@ -1,4 +1,4 @@ -<# +<# .SYNOPSIS Bookworm Portable - 清理/卸载脚本 .DESCRIPTION