@znmin/claude-remote-cli 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -6
- package/THIRD_PARTY_NOTICES.md +16 -16
- package/bin/claude-remote.js +3 -3
- package/bin/claude.js +3 -3
- package/package.json +67 -67
- package/scripts/postinstall.js +11 -11
- package/src/cli.js +187 -157
- package/src/client.js +232 -232
- package/src/installer.js +96 -96
- package/src/local/browser.js +290 -234
- package/src/local/mcp-config.js +320 -0
- package/src/local/mcp-proxy.js +199 -0
- package/src/local/processes.js +144 -144
- package/src/local/server.js +201 -193
- package/src/local/shell.js +72 -72
- package/src/local/tunnel.js +98 -98
- package/src/local/workspace.js +225 -225
- package/src/local-mode.js +218 -182
- package/src/powershell-conflicts.js +67 -67
- package/src/remote-claude.js +39 -39
- package/src/ssh-auth.js +113 -113
- package/src/ssh-policy.js +92 -92
- package/src/ssh.js +16 -16
- package/src/system.js +179 -179
package/README.md
CHANGED
|
@@ -25,14 +25,14 @@ npm install -g git+https://github.com/znmin/claude-remote-cli.git
|
|
|
25
25
|
也可以从已下载的分发包安装:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
|
-
npm install -g ./znmin-claude-remote-cli-0.
|
|
28
|
+
npm install -g ./znmin-claude-remote-cli-0.4.0.tgz
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
若系统 npm 全局目录不可写,可使用 `npm install -g --prefix "$HOME/.local" ./znmin-claude-remote-cli-0.
|
|
31
|
+
若系统 npm 全局目录不可写,可使用 `npm install -g --prefix "$HOME/.local" ./znmin-claude-remote-cli-0.4.0.tgz`,并确保 `~/.local/bin` 在 PATH 中;卸载时也使用相同的 `--prefix`。
|
|
32
32
|
|
|
33
33
|
npm 中不带作用域的 `claude-remote-cli` 属于其他项目。本项目使用独立的 `@znmin/claude-remote-cli` 作用域包名;请安装完整包名,或使用上述 GitHub 地址及本项目分发的 `.tgz` 文件。
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
依赖按模式准备:本地模式优先使用本机已安装的 Google Chrome,其次 Microsoft Edge(Windows 10/11 自带),都没有时首次启动下载 Playwright Chromium;服务器模式首次启动准备 Mutagen 0.18.1。Mutagen 复用 PATH 中的匹配版本,或从官方 GitHub Release 下载并校验内置 SHA-256。浏览器和同步组件需要网络和额外磁盘空间;npm 安装本身不强制下载这些二进制文件。
|
|
36
36
|
|
|
37
37
|
### Windows(0.3.0)
|
|
38
38
|
|
|
@@ -160,7 +160,7 @@ Git、npm、pnpm、Python、Go、Docker、数据库 CLI、`gh` 等共用本地
|
|
|
160
160
|
|
|
161
161
|
0.2.5 起,普通公开资料查询优先使用服务器上的 Claude 原生 `WebSearch` / `WebFetch`,不打开本地浏览器;服务器的文件、终端和浏览器执行工具仍不开放。原生搜索/网页读取是否可用取决于服务器 Claude 的账号、服务商和策略;如果不可用或查询失败,会先说明并征求用户意见,再回退本地浏览器。本地开发页面、localhost/局域网地址、交互测试、截图和交互登录仍使用本地浏览器,不交给服务器 WebFetch。该选择通过工具白名单及提示词约定实现,不是对模型每次路由选择的硬性拦截。
|
|
162
162
|
|
|
163
|
-
|
|
163
|
+
浏览器使用独立窗口和临时上下文,即使使用本机 Chrome/Edge 也不读取日常的书签、登录态和 Cookie。默认依次选择本机 Chrome、Edge,都没有时启动本地模式下载 Playwright Chromium 并缓存;可用 `CLAUDE_REMOTE_BROWSER` 指定。自动选择的本机浏览器无法启动时会提示并改用 Chromium。收到浏览器工具调用时才打开窗口。可以打开本机 localhost,填写表单、点击、截图和读取控制台错误。
|
|
164
164
|
|
|
165
165
|
```bash
|
|
166
166
|
claude-remote install-browser
|
|
@@ -179,6 +179,45 @@ Linux 上仍需安装 Playwright 所需的系统共享库,有窗口模式还
|
|
|
179
179
|
|
|
180
180
|
这是工具路由约束,不是对 Claude Code 主进程的系统隔离。认证、会话和日志仍在服务器,管理员管理策略继续生效。文件内容、命令结果和截图会经过服务器交给模型,不整体同步不代表数据不离开本机。
|
|
181
181
|
|
|
182
|
+
### 项目 MCP 与内网 MCP(0.4.0)
|
|
183
|
+
|
|
184
|
+
本地模式下,项目或用户自己配置的 MCP 由本机启动或从本机连接,再通过同一条 SSH 反向隧道提供给服务器上的 Claude。因此服务器不需要访问内网,也不需要安装这些 MCP 的依赖:
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
服务器 Claude ──> 127.0.0.1:隧道端口 ──SSH -R──> 本机网关 ─┬─ /mcp 内置本地工具
|
|
188
|
+
├─ /mcp/jira 本机连接内网 http://10.x.x.x/mcp
|
|
189
|
+
└─ /mcp/db 本机启动的 stdio 程序
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
配置来源与 Claude Code 相同,同名时优先级为 local > project > user:
|
|
193
|
+
|
|
194
|
+
| 范围 | 存储位置 | 生效范围 |
|
|
195
|
+
| --- | --- | --- |
|
|
196
|
+
| `local`(默认) | `~/.config/claude-remote/mcp.json`,按项目目录区分 | 仅当前项目,仅本机 |
|
|
197
|
+
| `project` | 项目根目录 `.mcp.json`,可提交到仓库 | 当前项目 |
|
|
198
|
+
| `user` | `~/.config/claude-remote/mcp.json` | 本机所有项目 |
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# stdio:命令在本机运行,工作目录为项目根目录,继承本机终端环境
|
|
202
|
+
claude-remote mcp add db -e DB_URL='${DB_URL}' -- npx -y some-db-mcp
|
|
203
|
+
# HTTP/SSE:从本机连接内网地址
|
|
204
|
+
claude-remote mcp add -t http -s project -H 'Authorization: Bearer ${JIRA_TOKEN}' jira https://jira.corp.local/mcp
|
|
205
|
+
claude-remote mcp add-json -s user docs '{"type":"sse","url":"http://10.0.0.8/sse"}'
|
|
206
|
+
claude-remote mcp list
|
|
207
|
+
claude-remote mcp get jira
|
|
208
|
+
claude-remote mcp remove jira
|
|
209
|
+
claude-remote mcp reset-project-choices # 重新询问是否启用 .mcp.json 中的 MCP
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
默认模式为 `local` 时,`claude mcp …` 等同于 `claude-remote mcp …`;服务器模式下 `claude mcp` 仍管理服务器上的配置。
|
|
213
|
+
|
|
214
|
+
- **服务名称不变**:服务器上看到的工具名仍是 `mcp__jira__search` 这种形式,项目文档和权限规则无需修改。MCP 的 tools、resources 和 prompts 都会转发。
|
|
215
|
+
- **凭据不离开本机**:`${VAR}` 和 `${VAR:-默认值}` 在本机启动时用本机环境变量展开。内网地址、请求头和环境变量只在本机网关中使用,服务器上的临时配置只包含 `127.0.0.1` 隧道地址和本次会话的随机令牌。
|
|
216
|
+
- **项目配置需要确认**:`.mcp.json` 可以在本机运行任意命令,首次启动时会逐个显示命令或 URL,询问是否启用。选择按项目记住,配置内容变化后重新询问。非交互运行时,未确认的 MCP 会被跳过并给出提示。通过 `claude-remote mcp add -s project` 添加的条目视为本机已确认。
|
|
217
|
+
- **连接失败不影响启动**:每个 MCP 最多等待 30 秒,失败时打印原因(stdio 程序会附带最后几行错误输出),本次会话不提供该 MCP。stdio 程序的错误输出不会显示在终端上,避免打乱远程界面,`CLAUDE_REMOTE_DEBUG=1` 时才显示。stdio 程序在会话中意外退出时,下次调用会自动重启。退出时停止所有 MCP 程序(Windows 上包括 `npx` 等通过 `cmd.exe` 启动的整个进程树)。
|
|
218
|
+
- **结果大小有上限**:与内置工具相同,单次结果超过约 4 万字符时会截断较长的文本,图片等二进制内容保持不变。为此不向服务器提供工具的 `outputSchema`。单次调用最长 3 分钟,MCP 发送进度通知时会重新计时。
|
|
219
|
+
- **暂不支持**:需要 OAuth 登录或 `headersHelper` 的 MCP,以及 `ws` 类型;请改用固定请求头(可引用本机环境变量)。MCP 在会话中发送的列表变更通知不会转发,修改配置后请重新启动 `claude`。服务器模式(`remote`)仍由服务器自己读取同步过去的 `.mcp.json`。
|
|
220
|
+
|
|
182
221
|
## 同步管理(仅服务器模式)
|
|
183
222
|
|
|
184
223
|
```bash
|
|
@@ -187,7 +226,7 @@ claude-remote flush # 等待当前项目完成一次同步
|
|
|
187
226
|
claude-remote stop # 停止当前目录在当前配置服务器上的同步
|
|
188
227
|
claude-remote stop --all # 停止本工具的所有同步会话
|
|
189
228
|
claude-remote stop --name 名称 # 按 status 中的名称停止旧服务器上的映射
|
|
190
|
-
claude-remote doctor # 检查本地安装(含 Node 版本、SSH
|
|
229
|
+
claude-remote doctor # 检查本地安装(含 Node 版本、SSH 工具、使用的本地浏览器)和服务器配置,不连接服务器
|
|
191
230
|
claude-remote install-sync # 手动重试同步工具准备
|
|
192
231
|
claude-remote --help
|
|
193
232
|
```
|
|
@@ -229,6 +268,7 @@ CLAUDE_REMOTE_DEBUG=1 claude
|
|
|
229
268
|
| 变量 | 用途 |
|
|
230
269
|
| --- | --- |
|
|
231
270
|
| `CLAUDE_REMOTE_MODE` | 临时选择 `local` 或 `remote` |
|
|
271
|
+
| `CLAUDE_REMOTE_BROWSER` | 本地浏览器:`chrome`、`msedge` 或 `chromium`(Playwright 自带);未设置时按 Chrome、Edge、Chromium 顺序自动选择 |
|
|
232
272
|
| `CLAUDE_REMOTE_HEADLESS` | `1` 无窗口浏览器,`0` 可见窗口,覆盖配置 |
|
|
233
273
|
| `CLAUDE_REMOTE_HOST` | 临时 SSH 别名或 user@host |
|
|
234
274
|
| `CLAUDE_REMOTE_PORT` | 临时 SSH 端口 |
|
|
@@ -256,7 +296,7 @@ npm run test:windows # Windows 上运行的客户端测试(CI 在 windows-la
|
|
|
256
296
|
CLAUDE_REMOTE_INTEGRATION=1 CLAUDE_REMOTE_BROWSER_TEST=1 npm test
|
|
257
297
|
|
|
258
298
|
npm pack
|
|
259
|
-
npm install -g ./znmin-claude-remote-cli-0.
|
|
299
|
+
npm install -g ./znmin-claude-remote-cli-0.4.0.tgz
|
|
260
300
|
|
|
261
301
|
# 确定包名、版本和使用条款后,使用有发布权限的 npm 账号发布
|
|
262
302
|
npm login
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
# Third-party components
|
|
2
|
-
|
|
3
|
-
The npm package contains the JavaScript CLI source and depends on `proper-lockfile` (MIT), the official `@modelcontextprotocol/sdk` (MIT), `zod` (MIT), `playwright` (Apache-2.0), and their npm-managed dependencies. Their license files are included in their respective npm packages.
|
|
4
|
-
|
|
5
|
-
Playwright downloads its matching Chromium/browser components on first local-mode preparation. These components remain subject to their upstream licenses. A separate local browser context is used; this wrapper does not include the user's browser profile.
|
|
6
|
-
|
|
7
|
-
Mutagen binaries are **not bundled in this npm package**. At setup/first use, the tool can reuse an existing Mutagen 0.18.1 installation, or download the matching v0.18.1 archive from the official release repository. SHA-256 values are pinned in `src/installer.js` from the official release's `SHA256SUMS` file.
|
|
8
|
-
|
|
9
|
-
- Mutagen project: https://github.com/mutagen-io/mutagen
|
|
10
|
-
- Pinned release: https://github.com/mutagen-io/mutagen/releases/tag/v0.18.1
|
|
11
|
-
- Release checksums: https://github.com/mutagen-io/mutagen/releases/download/v0.18.1/SHA256SUMS
|
|
12
|
-
- Upstream license: https://github.com/mutagen-io/mutagen/blob/v0.18.1/LICENSE
|
|
13
|
-
|
|
14
|
-
The upstream license states that, from v0.17 onward, official release builds include SSPL-licensed code by default; other source is generally MIT or as indicated upstream. Mutagen and the automatically deployed remote agents remain subject to the upstream terms independently of this JavaScript wrapper.
|
|
15
|
-
|
|
16
|
-
Claude Code is a separate product installed and authenticated on the user's server. This project does not bundle Claude Code and is not affiliated with or endorsed by Anthropic.
|
|
1
|
+
# Third-party components
|
|
2
|
+
|
|
3
|
+
The npm package contains the JavaScript CLI source and depends on `proper-lockfile` (MIT), the official `@modelcontextprotocol/sdk` (MIT), `zod` (MIT), `playwright` (Apache-2.0), and their npm-managed dependencies. Their license files are included in their respective npm packages.
|
|
4
|
+
|
|
5
|
+
Playwright downloads its matching Chromium/browser components on first local-mode preparation. These components remain subject to their upstream licenses. A separate local browser context is used; this wrapper does not include the user's browser profile.
|
|
6
|
+
|
|
7
|
+
Mutagen binaries are **not bundled in this npm package**. At setup/first use, the tool can reuse an existing Mutagen 0.18.1 installation, or download the matching v0.18.1 archive from the official release repository. SHA-256 values are pinned in `src/installer.js` from the official release's `SHA256SUMS` file.
|
|
8
|
+
|
|
9
|
+
- Mutagen project: https://github.com/mutagen-io/mutagen
|
|
10
|
+
- Pinned release: https://github.com/mutagen-io/mutagen/releases/tag/v0.18.1
|
|
11
|
+
- Release checksums: https://github.com/mutagen-io/mutagen/releases/download/v0.18.1/SHA256SUMS
|
|
12
|
+
- Upstream license: https://github.com/mutagen-io/mutagen/blob/v0.18.1/LICENSE
|
|
13
|
+
|
|
14
|
+
The upstream license states that, from v0.17 onward, official release builds include SSPL-licensed code by default; other source is generally MIT or as indicated upstream. Mutagen and the automatically deployed remote agents remain subject to the upstream terms independently of this JavaScript wrapper.
|
|
15
|
+
|
|
16
|
+
Claude Code is a separate product installed and authenticated on the user's server. This project does not bundle Claude Code and is not affiliated with or endorsed by Anthropic.
|
package/bin/claude-remote.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { entry } from '../src/cli.js';
|
|
3
|
-
await entry(false);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { entry } from '../src/cli.js';
|
|
3
|
+
await entry(false);
|
package/bin/claude.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { entry } from '../src/cli.js';
|
|
3
|
-
await entry(true);
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { entry } from '../src/cli.js';
|
|
3
|
+
await entry(true);
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@znmin/claude-remote-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Run Claude Code on an SSH server from macOS, Linux or Windows with local filesystem, terminal and browser tools, or remote bidirectional sync",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"license": "UNLICENSED",
|
|
7
|
-
"engines": {
|
|
8
|
-
"node": ">=20.11"
|
|
9
|
-
},
|
|
10
|
-
"os": [
|
|
11
|
-
"darwin",
|
|
12
|
-
"linux",
|
|
13
|
-
"win32"
|
|
14
|
-
],
|
|
15
|
-
"cpu": [
|
|
16
|
-
"x64",
|
|
17
|
-
"arm64"
|
|
18
|
-
],
|
|
19
|
-
"bin": {
|
|
20
|
-
"claude": "bin/claude.js",
|
|
21
|
-
"claude-remote": "bin/claude-remote.js"
|
|
22
|
-
},
|
|
23
|
-
"files": [
|
|
24
|
-
"bin/",
|
|
25
|
-
"src/",
|
|
26
|
-
"scripts/postinstall.js",
|
|
27
|
-
"README.md",
|
|
28
|
-
"THIRD_PARTY_NOTICES.md"
|
|
29
|
-
],
|
|
30
|
-
"scripts": {
|
|
31
|
-
"postinstall": "node scripts/postinstall.js",
|
|
32
|
-
"lint": "eslint .",
|
|
33
|
-
"test": "node --test test/*.test.js",
|
|
34
|
-
"test:windows": "node --test test/windows.test.js test/local-tools.test.js",
|
|
35
|
-
"prepublishOnly": "npm run lint && npm test"
|
|
36
|
-
},
|
|
37
|
-
"keywords": [
|
|
38
|
-
"claude",
|
|
39
|
-
"ssh",
|
|
40
|
-
"remote",
|
|
41
|
-
"cli",
|
|
42
|
-
"sync"
|
|
43
|
-
],
|
|
44
|
-
"publishConfig": {
|
|
45
|
-
"access": "public",
|
|
46
|
-
"registry": "https://registry.npmjs.org/"
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"@modelcontextprotocol/sdk": "1.32.2",
|
|
50
|
-
"playwright": "1.64.1",
|
|
51
|
-
"proper-lockfile": "4.1.2",
|
|
52
|
-
"zod": "4.6.7"
|
|
53
|
-
},
|
|
54
|
-
"repository": {
|
|
55
|
-
"type": "git",
|
|
56
|
-
"url": "git+https://github.com/znmin/claude-remote-cli.git"
|
|
57
|
-
},
|
|
58
|
-
"homepage": "https://github.com/znmin/claude-remote-cli#readme",
|
|
59
|
-
"bugs": {
|
|
60
|
-
"url": "https://github.com/znmin/claude-remote-cli/issues"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"@eslint/js": "9.39.5",
|
|
64
|
-
"eslint": "9.39.5",
|
|
65
|
-
"globals": "17.14.0"
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@znmin/claude-remote-cli",
|
|
3
|
+
"version": "0.4.0",
|
|
4
|
+
"description": "Run Claude Code on an SSH server from macOS, Linux or Windows with local filesystem, terminal and browser tools, or remote bidirectional sync",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": ">=20.11"
|
|
9
|
+
},
|
|
10
|
+
"os": [
|
|
11
|
+
"darwin",
|
|
12
|
+
"linux",
|
|
13
|
+
"win32"
|
|
14
|
+
],
|
|
15
|
+
"cpu": [
|
|
16
|
+
"x64",
|
|
17
|
+
"arm64"
|
|
18
|
+
],
|
|
19
|
+
"bin": {
|
|
20
|
+
"claude": "bin/claude.js",
|
|
21
|
+
"claude-remote": "bin/claude-remote.js"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"bin/",
|
|
25
|
+
"src/",
|
|
26
|
+
"scripts/postinstall.js",
|
|
27
|
+
"README.md",
|
|
28
|
+
"THIRD_PARTY_NOTICES.md"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"postinstall": "node scripts/postinstall.js",
|
|
32
|
+
"lint": "eslint .",
|
|
33
|
+
"test": "node --test test/*.test.js",
|
|
34
|
+
"test:windows": "node --test test/windows.test.js test/local-tools.test.js test/browser-choice.test.js test/mcp-proxy.test.js",
|
|
35
|
+
"prepublishOnly": "npm run lint && npm test"
|
|
36
|
+
},
|
|
37
|
+
"keywords": [
|
|
38
|
+
"claude",
|
|
39
|
+
"ssh",
|
|
40
|
+
"remote",
|
|
41
|
+
"cli",
|
|
42
|
+
"sync"
|
|
43
|
+
],
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public",
|
|
46
|
+
"registry": "https://registry.npmjs.org/"
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
50
|
+
"playwright": "1.64.1",
|
|
51
|
+
"proper-lockfile": "4.1.2",
|
|
52
|
+
"zod": "4.6.7"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/znmin/claude-remote-cli.git"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/znmin/claude-remote-cli#readme",
|
|
59
|
+
"bugs": {
|
|
60
|
+
"url": "https://github.com/znmin/claude-remote-cli/issues"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@eslint/js": "9.39.5",
|
|
64
|
+
"eslint": "9.39.5",
|
|
65
|
+
"globals": "17.14.0"
|
|
66
|
+
}
|
|
67
|
+
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ensureMutagen } from '../src/installer.js';
|
|
2
|
-
|
|
3
|
-
if (process.env.CLAUDE_REMOTE_PREPARE_SYNC === '1' && process.env.CLAUDE_REMOTE_SKIP_DOWNLOAD !== '1') {
|
|
4
|
-
try {
|
|
5
|
-
await ensureMutagen();
|
|
6
|
-
} catch (error) {
|
|
7
|
-
// Offline installation and npm --ignore-scripts remain supported: retry at first use.
|
|
8
|
-
console.warn(`CLI 已安装,同步工具准备未完成:${error.message}\n首次连接时会重试。`);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
console.log('安装完成,运行 claude 开始。');
|
|
1
|
+
import { ensureMutagen } from '../src/installer.js';
|
|
2
|
+
|
|
3
|
+
if (process.env.CLAUDE_REMOTE_PREPARE_SYNC === '1' && process.env.CLAUDE_REMOTE_SKIP_DOWNLOAD !== '1') {
|
|
4
|
+
try {
|
|
5
|
+
await ensureMutagen();
|
|
6
|
+
} catch (error) {
|
|
7
|
+
// Offline installation and npm --ignore-scripts remain supported: retry at first use.
|
|
8
|
+
console.warn(`CLI 已安装,同步工具准备未完成:${error.message}\n首次连接时会重试。`);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
console.log('安装完成,运行 claude 开始。');
|