rclaude 0.0.0-stage → 0.2.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 +34 -2
- package/bin/rclaude.cjs +54 -0
- package/notices/THIRD-PARTY-LICENSES.txt +181 -0
- package/package.json +25 -4
package/README.md
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rclaude
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
在本地终端使用远端 Claude Code,文件和命令在自己的电脑执行。
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install -g rclaude
|
|
7
|
+
rclaude --version
|
|
8
|
+
rclaude login
|
|
9
|
+
rclaude
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
需要 Node.js 22 或以上。npm 自动安装当前系统、CPU 架构对应的客户端,
|
|
13
|
+
支持 Windows、macOS、Linux 的 x64 / ARM64,无安装脚本。
|
|
14
|
+
|
|
15
|
+
默认连接 `https://rclaude.xyz`,`rclaude login` 会打开浏览器授权。
|
|
16
|
+
收到试用 Token 后,可以直接登录:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
rclaude login --token YOUR_TOKEN
|
|
20
|
+
rclaude
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
一个 Token 绑定一台设备;普通账号最多绑定两台设备。
|
|
24
|
+
Token 与浏览器登录共用设备名额,可在网页断开设备并删除绑定。
|
|
25
|
+
|
|
26
|
+
```sh
|
|
27
|
+
rclaude -p "你的问题"
|
|
28
|
+
rclaude --read-only
|
|
29
|
+
rclaude login --url https://your-platform.example
|
|
30
|
+
rclaude logout
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
默认允许修改本地文件和执行命令。`--read-only` 可以收紧权限。
|
|
34
|
+
凭证存放在 `~/.rclaude`,模型凭据保留在服务端,客户端无需安装 Claude Code。
|
|
35
|
+
本包不包含 Claude Code、模型凭据或试用 Token。
|
package/bin/rclaude.cjs
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
const os = require('node:os');
|
|
7
|
+
const { spawn } = require('node:child_process');
|
|
8
|
+
|
|
9
|
+
const platform = process.platform;
|
|
10
|
+
const arch = process.arch;
|
|
11
|
+
if (!['win32', 'darwin', 'linux'].includes(platform) || !['x64', 'arm64'].includes(arch)) {
|
|
12
|
+
console.error(`rclaude: unsupported platform ${platform}/${arch}; use a standalone client.`);
|
|
13
|
+
process.exitCode = 1;
|
|
14
|
+
} else {
|
|
15
|
+
const filename = platform === 'win32' ? 'rclaude.exe' : 'rclaude';
|
|
16
|
+
let binary;
|
|
17
|
+
try {
|
|
18
|
+
const metadata = require.resolve(`@rclaude/${platform}-${arch}/package.json`);
|
|
19
|
+
if (require(metadata).version !== require('../package.json').version) throw new Error('version mismatch');
|
|
20
|
+
binary = path.join(path.dirname(metadata), filename);
|
|
21
|
+
} catch { /* npm only installs the optional dependency matching this machine. */ }
|
|
22
|
+
if (!binary || !fs.existsSync(binary)) {
|
|
23
|
+
console.error(`rclaude: missing client for ${platform}/${arch}; reinstall with npm install -g rclaude --include=optional.`);
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
} else {
|
|
26
|
+
const child = spawn(binary, process.argv.slice(2), { stdio: 'inherit', shell: false });
|
|
27
|
+
const handlers = new Map();
|
|
28
|
+
for (const signal of ['SIGINT', 'SIGTERM', 'SIGHUP']) {
|
|
29
|
+
const handler = () => {
|
|
30
|
+
// Windows broadcasts console Ctrl+C to the client. kill('SIGINT') would force-kill it.
|
|
31
|
+
if (platform !== 'win32' || signal !== 'SIGINT') child.kill(signal);
|
|
32
|
+
};
|
|
33
|
+
handlers.set(signal, handler);
|
|
34
|
+
process.on(signal, handler);
|
|
35
|
+
}
|
|
36
|
+
const cleanup = () => {
|
|
37
|
+
for (const [signal, handler] of handlers) process.removeListener(signal, handler);
|
|
38
|
+
};
|
|
39
|
+
child.once('error', (error) => {
|
|
40
|
+
cleanup();
|
|
41
|
+
console.error(`rclaude: cannot start client: ${error.message}`);
|
|
42
|
+
process.exitCode = 1;
|
|
43
|
+
});
|
|
44
|
+
child.once('exit', (code, signal) => {
|
|
45
|
+
cleanup();
|
|
46
|
+
if (signal) {
|
|
47
|
+
process.exitCode = 128 + (os.constants.signals[signal] || 1);
|
|
48
|
+
try { process.kill(process.pid, signal); } catch { /* Keep the fallback exit code. */ }
|
|
49
|
+
} else {
|
|
50
|
+
process.exitCode = code === null ? 1 : code;
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
=== Go runtime and standard library ===
|
|
2
|
+
|
|
3
|
+
Copyright 2009 The Go Authors.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without
|
|
6
|
+
modification, are permitted provided that the following conditions are
|
|
7
|
+
met:
|
|
8
|
+
|
|
9
|
+
* Redistributions of source code must retain the above copyright
|
|
10
|
+
notice, this list of conditions and the following disclaimer.
|
|
11
|
+
* Redistributions in binary form must reproduce the above
|
|
12
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
13
|
+
in the documentation and/or other materials provided with the
|
|
14
|
+
distribution.
|
|
15
|
+
* Neither the name of Google LLC nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived from
|
|
17
|
+
this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
30
|
+
|
|
31
|
+
=== github.com/gofrs/flock ===
|
|
32
|
+
|
|
33
|
+
Copyright (c) 2018-2025, The Gofrs
|
|
34
|
+
Copyright (c) 2015-2020, Tim Heckman
|
|
35
|
+
All rights reserved.
|
|
36
|
+
|
|
37
|
+
Redistribution and use in source and binary forms, with or without
|
|
38
|
+
modification, are permitted provided that the following conditions are met:
|
|
39
|
+
|
|
40
|
+
* Redistributions of source code must retain the above copyright notice, this
|
|
41
|
+
list of conditions and the following disclaimer.
|
|
42
|
+
|
|
43
|
+
* Redistributions in binary form must reproduce the above copyright notice,
|
|
44
|
+
this list of conditions and the following disclaimer in the documentation
|
|
45
|
+
and/or other materials provided with the distribution.
|
|
46
|
+
|
|
47
|
+
* Neither the name of gofrs nor the names of its contributors may be used
|
|
48
|
+
to endorse or promote products derived from this software without
|
|
49
|
+
specific prior written permission.
|
|
50
|
+
|
|
51
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
52
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
53
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
54
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
55
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
56
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
57
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
58
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
59
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
60
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
61
|
+
|
|
62
|
+
=== golang.org/x/crypto ===
|
|
63
|
+
|
|
64
|
+
Copyright 2009 The Go Authors.
|
|
65
|
+
|
|
66
|
+
Redistribution and use in source and binary forms, with or without
|
|
67
|
+
modification, are permitted provided that the following conditions are
|
|
68
|
+
met:
|
|
69
|
+
|
|
70
|
+
* Redistributions of source code must retain the above copyright
|
|
71
|
+
notice, this list of conditions and the following disclaimer.
|
|
72
|
+
* Redistributions in binary form must reproduce the above
|
|
73
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
74
|
+
in the documentation and/or other materials provided with the
|
|
75
|
+
distribution.
|
|
76
|
+
* Neither the name of Google LLC nor the names of its
|
|
77
|
+
contributors may be used to endorse or promote products derived from
|
|
78
|
+
this software without specific prior written permission.
|
|
79
|
+
|
|
80
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
81
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
82
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
83
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
84
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
85
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
86
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
87
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
88
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
89
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
90
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
91
|
+
|
|
92
|
+
=== golang.org/x/sys ===
|
|
93
|
+
|
|
94
|
+
Copyright 2009 The Go Authors.
|
|
95
|
+
|
|
96
|
+
Redistribution and use in source and binary forms, with or without
|
|
97
|
+
modification, are permitted provided that the following conditions are
|
|
98
|
+
met:
|
|
99
|
+
|
|
100
|
+
* Redistributions of source code must retain the above copyright
|
|
101
|
+
notice, this list of conditions and the following disclaimer.
|
|
102
|
+
* Redistributions in binary form must reproduce the above
|
|
103
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
104
|
+
in the documentation and/or other materials provided with the
|
|
105
|
+
distribution.
|
|
106
|
+
* Neither the name of Google LLC nor the names of its
|
|
107
|
+
contributors may be used to endorse or promote products derived from
|
|
108
|
+
this software without specific prior written permission.
|
|
109
|
+
|
|
110
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
111
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
112
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
113
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
114
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
115
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
116
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
117
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
118
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
119
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
120
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
121
|
+
|
|
122
|
+
=== golang.org/x/term ===
|
|
123
|
+
|
|
124
|
+
Copyright 2009 The Go Authors.
|
|
125
|
+
|
|
126
|
+
Redistribution and use in source and binary forms, with or without
|
|
127
|
+
modification, are permitted provided that the following conditions are
|
|
128
|
+
met:
|
|
129
|
+
|
|
130
|
+
* Redistributions of source code must retain the above copyright
|
|
131
|
+
notice, this list of conditions and the following disclaimer.
|
|
132
|
+
* Redistributions in binary form must reproduce the above
|
|
133
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
134
|
+
in the documentation and/or other materials provided with the
|
|
135
|
+
distribution.
|
|
136
|
+
* Neither the name of Google LLC nor the names of its
|
|
137
|
+
contributors may be used to endorse or promote products derived from
|
|
138
|
+
this software without specific prior written permission.
|
|
139
|
+
|
|
140
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
141
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
142
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
143
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
144
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
145
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
146
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
147
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
148
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
149
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
150
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
151
|
+
|
|
152
|
+
=== mvdan.cc/garble (generated literal decoders) ===
|
|
153
|
+
|
|
154
|
+
Copyright (c) 2019, The Garble Authors.
|
|
155
|
+
|
|
156
|
+
Redistribution and use in source and binary forms, with or without
|
|
157
|
+
modification, are permitted provided that the following conditions are
|
|
158
|
+
met:
|
|
159
|
+
|
|
160
|
+
* Redistributions of source code must retain the above copyright
|
|
161
|
+
notice, this list of conditions and the following disclaimer.
|
|
162
|
+
* Redistributions in binary form must reproduce the above
|
|
163
|
+
copyright notice, this list of conditions and the following disclaimer
|
|
164
|
+
in the documentation and/or other materials provided with the
|
|
165
|
+
distribution.
|
|
166
|
+
* Neither the name of the copyright holder nor the names of its
|
|
167
|
+
contributors may be used to endorse or promote products derived from
|
|
168
|
+
this software without specific prior written permission.
|
|
169
|
+
|
|
170
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
171
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
172
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
173
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
174
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
175
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
176
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
177
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
178
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
179
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
180
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
181
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rclaude",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Use remote Claude Code with tools running on your own device",
|
|
5
|
+
"bin": {
|
|
6
|
+
"rclaude": "bin/rclaude.cjs"
|
|
7
|
+
},
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22"
|
|
10
|
+
},
|
|
11
|
+
"os": ["win32", "darwin", "linux"],
|
|
12
|
+
"cpu": ["x64", "arm64"],
|
|
13
|
+
"files": ["bin/", "notices/"],
|
|
14
|
+
"optionalDependencies": {
|
|
15
|
+
"@rclaude/win32-x64": "0.2.0",
|
|
16
|
+
"@rclaude/win32-arm64": "0.2.0",
|
|
17
|
+
"@rclaude/darwin-x64": "0.2.0",
|
|
18
|
+
"@rclaude/darwin-arm64": "0.2.0",
|
|
19
|
+
"@rclaude/linux-x64": "0.2.0",
|
|
20
|
+
"@rclaude/linux-arm64": "0.2.0"
|
|
21
|
+
},
|
|
22
|
+
"keywords": ["claude", "cli", "ssh", "remote"],
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public",
|
|
25
|
+
"registry": "https://registry.npmjs.org/"
|
|
26
|
+
}
|
|
27
|
+
}
|