agent-ssh-cli 0.2.4 → 0.2.5
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 +4 -46
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<a href="https://github.com/sleepinginsummer/agent-ssh-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-green" alt="License MIT"></a>
|
|
12
12
|
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=node.js&logoColor=white" alt="Node.js >=18"></a>
|
|
13
13
|
<a href="https://www.npmjs.com/"><img src="https://img.shields.io/badge/npm-%3E%3D8-CB3837?logo=npm&logoColor=white" alt="npm >=8"></a>
|
|
14
|
-
<a href="https://github.com/sleepinginsummer/agent-ssh-cli"><img src="https://img.shields.io/badge/
|
|
15
|
-
<a href="https://github.com/sleepinginsummer/agent-ssh-cli/releases"><img src="https://img.shields.io/badge/release-v0.2.
|
|
14
|
+
<a href="https://github.com/sleepinginsummer/agent-ssh-cli"><img src="https://img.shields.io/badge/sys-win%2Fmac%2Flinux-0078D6" alt="sys win/mac/linux"></a>
|
|
15
|
+
<a href="https://github.com/sleepinginsummer/agent-ssh-cli/releases"><img src="https://img.shields.io/badge/release-v0.2.5-blue" alt="release v0.2.5"></a>
|
|
16
16
|
<a href="https://github.com/sleepinginsummer/agent-ssh-cli/pulls"><img src="https://img.shields.io/badge/PRs-welcome-brightgreen" alt="PRs welcome"></a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
@@ -49,11 +49,9 @@
|
|
|
49
49
|
|
|
50
50
|
- Node.js `>= 18`
|
|
51
51
|
- npm `>= 8`
|
|
52
|
+
- 系统支持 Windows / macOS / Linux
|
|
52
53
|
- 本机网络可访问目标 SSH 服务器
|
|
53
|
-
- 目标服务器已开启 SSH 服务
|
|
54
54
|
- 如使用私钥认证,私钥文件需对当前用户可读
|
|
55
|
-
- 当前版本内部执行器已迁移到 Rust,npm 仍作为安装入口
|
|
56
|
-
- `agentsshcli exec/upload/download` 默认使用 Rust daemon 连接缓存,也可以通过 `--no-cache` 直连
|
|
57
55
|
- 预编译平台包支持 macOS arm64/x64、Linux x64/arm64、Windows x64
|
|
58
56
|
|
|
59
57
|
### 安装步骤
|
|
@@ -69,43 +67,6 @@ agentsshcli --help
|
|
|
69
67
|
|
|
70
68
|
打开 [SKILL.md](SKILL.md),将其添加到 agent 中。
|
|
71
69
|
|
|
72
|
-
### 本地开发构建
|
|
73
|
-
|
|
74
|
-
当前仓库保留 npm 安装入口,实际执行逻辑由 Rust 原生二进制完成。开发或源码安装时需要先构建原生二进制:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
npm run build:native
|
|
78
|
-
npm run build:native-bin
|
|
79
|
-
npm run build:native-package
|
|
80
|
-
npm test
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
执行链路:
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
agentsshcli 命令
|
|
87
|
-
-> bin/agentsshcli.js
|
|
88
|
-
-> native/target/release/agentsshcli-native
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
已由 Rust 实现:
|
|
92
|
-
|
|
93
|
-
- `agentsshcli list`
|
|
94
|
-
- `agentsshcli init-config`
|
|
95
|
-
- `agentsshcli exec ...` / `agentsshcli exec --no-cache ...`
|
|
96
|
-
- `agentsshcli upload ...` / `agentsshcli upload --no-cache ...`
|
|
97
|
-
- `agentsshcli download ...` / `agentsshcli download --no-cache ...`
|
|
98
|
-
- Rust daemon 连接缓存与 `--cache-ttl`
|
|
99
|
-
|
|
100
|
-
发布 npm 包前先生成对应平台的预编译产物和平台子包,并检查包内容:
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
npm run build:native-package
|
|
104
|
-
npm pack --dry-run
|
|
105
|
-
(cd npm/darwin-arm64 && npm pack --dry-run)
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
发布形态为主包 `agent-ssh-cli` 加平台 optional 子包:`@agent-ssh-cli/darwin-arm64`、`@agent-ssh-cli/darwin-x64`、`@agent-ssh-cli/linux-x64`、`@agent-ssh-cli/linux-arm64`、`@agent-ssh-cli/win32-x64`。预编译产物目录格式:`native-bin/<platform>-<arch>/agentsshcli-native`,Windows 文件名为 `agentsshcli-native.exe`。
|
|
109
70
|
|
|
110
71
|
## 配置
|
|
111
72
|
|
|
@@ -180,16 +141,13 @@ AGENT_SSH_CONFIG=/path/to/config.json
|
|
|
180
141
|
}
|
|
181
142
|
]
|
|
182
143
|
```
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
144
|
测试命令
|
|
187
145
|
|
|
188
146
|
```bash
|
|
189
147
|
agentsshcli list
|
|
190
148
|
agentsshcli exec --no-cache 密码服务器 "pwd"
|
|
149
|
+
agentsshcli exec 密码服务器 --command-file ./script.sh --timeout 60000
|
|
191
150
|
```
|
|
192
|
-
|
|
193
151
|
完成安装!
|
|
194
152
|
|
|
195
153
|
## 卸载和清理
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-ssh-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "基于 CLI 的 SSH 代理工具,按 ssh-mcp-server 的能力一一映射",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -27,10 +27,10 @@
|
|
|
27
27
|
"build:native-package": "npm run build:native-bin && node scripts/build-native-package.js"
|
|
28
28
|
},
|
|
29
29
|
"optionalDependencies": {
|
|
30
|
-
"@agent-ssh-cli/darwin-arm64": "0.2.
|
|
31
|
-
"@agent-ssh-cli/darwin-x64": "0.2.
|
|
32
|
-
"@agent-ssh-cli/linux-arm64": "0.2.
|
|
33
|
-
"@agent-ssh-cli/linux-x64": "0.2.
|
|
34
|
-
"@agent-ssh-cli/win32-x64": "0.2.
|
|
30
|
+
"@agent-ssh-cli/darwin-arm64": "0.2.5",
|
|
31
|
+
"@agent-ssh-cli/darwin-x64": "0.2.5",
|
|
32
|
+
"@agent-ssh-cli/linux-arm64": "0.2.5",
|
|
33
|
+
"@agent-ssh-cli/linux-x64": "0.2.5",
|
|
34
|
+
"@agent-ssh-cli/win32-x64": "0.2.5"
|
|
35
35
|
}
|
|
36
36
|
}
|