@xcanwin/manyoyo 2.0.0 → 2.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 +4 -12
- package/bin/manyoyo.js +3 -10
- package/package.json +14 -18
package/README.md
CHANGED
|
@@ -36,20 +36,13 @@ podman image prune -f
|
|
|
36
36
|
### Global Installation (Recommended)
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
40
|
-
npm install -g .
|
|
39
|
+
npm install -g @xcanwin/manyoyo
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
### Local Development
|
|
44
43
|
|
|
45
44
|
```bash
|
|
46
|
-
npm
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### Direct Symlink Installation
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
node bin/manyoyo.js --install manyoyo
|
|
45
|
+
npm install -g .
|
|
53
46
|
```
|
|
54
47
|
|
|
55
48
|
## 4. 使用方法
|
|
@@ -210,11 +203,10 @@ manyoyo -n socket-dev -m mdsock -x docker ps
|
|
|
210
203
|
- Node.js >= 14.0.0
|
|
211
204
|
- Docker or Podman
|
|
212
205
|
|
|
213
|
-
###
|
|
206
|
+
### Remove
|
|
214
207
|
|
|
215
208
|
```bash
|
|
216
|
-
npm
|
|
217
|
-
sudo rm -rf /usr/local/bin/manyoyo
|
|
209
|
+
npm uninstall -g @xcanwin/manyoyo
|
|
218
210
|
```
|
|
219
211
|
|
|
220
212
|
## License
|
package/bin/manyoyo.js
CHANGED
|
@@ -8,6 +8,7 @@ const { execSync, spawnSync } = require('child_process');
|
|
|
8
8
|
const fs = require('fs');
|
|
9
9
|
const path = require('path');
|
|
10
10
|
const readline = require('readline');
|
|
11
|
+
const { version: BIN_VERSION } = require('../package.json');
|
|
11
12
|
|
|
12
13
|
// Helper function to format date like bash $(date +%m%d-%H%M)
|
|
13
14
|
function formatDate() {
|
|
@@ -20,7 +21,6 @@ function formatDate() {
|
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
// Default configuration
|
|
23
|
-
const BIN_VERSION = "2.0.0";
|
|
24
24
|
let CONTAINER_NAME = `myy-${formatDate()}`;
|
|
25
25
|
let HOST_PATH = process.cwd();
|
|
26
26
|
let CONTAINER_PATH = HOST_PATH;
|
|
@@ -72,12 +72,11 @@ function show_help() {
|
|
|
72
72
|
console.log(" -m|--cm|--cont-mode STRING 设置容器嵌套容器模式");
|
|
73
73
|
console.log(" 例如 common, dind, mdsock");
|
|
74
74
|
console.log(" --install NAME 安装manyoyo命令");
|
|
75
|
-
console.log(" 例如
|
|
75
|
+
console.log(" 例如 docker-cli-plugin");
|
|
76
76
|
console.log(" -V|--version 显示版本");
|
|
77
77
|
console.log(" -h|--help 显示帮助");
|
|
78
78
|
console.log("");
|
|
79
79
|
console.log(`${BLUE}Example:${NC}`);
|
|
80
|
-
console.log(` ./${MANYOYO_NAME}.sh --install manyoyo 安装manyoyo命令`);
|
|
81
80
|
console.log(` ${MANYOYO_NAME} -n test --ef ./xxx.env -y c 设置环境变量并运行无需确认的AGENT`);
|
|
82
81
|
console.log(` ${MANYOYO_NAME} -n test -- -c 恢复之前会话`);
|
|
83
82
|
console.log(` ${MANYOYO_NAME} -x echo 123 指定命令执行`);
|
|
@@ -105,15 +104,9 @@ function ensure_docker() {
|
|
|
105
104
|
function install_manyoyo(name) {
|
|
106
105
|
const MANYOYO_FILE = fs.realpathSync(__filename);
|
|
107
106
|
switch (name) {
|
|
108
|
-
case 'manyoyo':
|
|
109
|
-
execSync(`sudo ln -f -s "${MANYOYO_FILE}" /usr/local/bin/manyoyo`, { stdio: 'inherit' });
|
|
110
|
-
break;
|
|
111
|
-
case 'myy':
|
|
112
|
-
execSync(`sudo ln -f -s "${MANYOYO_FILE}" /usr/local/bin/myy`, { stdio: 'inherit' });
|
|
113
|
-
break;
|
|
114
107
|
case 'docker-cli-plugin':
|
|
115
108
|
execSync(`mkdir -p "$HOME/.docker/cli-plugins/"`, { stdio: 'inherit' });
|
|
116
|
-
execSync(`
|
|
109
|
+
execSync(`ln -f -s "${MANYOYO_FILE}" "$HOME/.docker/cli-plugins/docker-manyoyo"`, { stdio: 'inherit' });
|
|
117
110
|
break;
|
|
118
111
|
default:
|
|
119
112
|
console.log("");
|
package/package.json
CHANGED
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xcanwin/manyoyo",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "AI Agent CLI Sandbox",
|
|
3
|
+
"version": "2.2.0",
|
|
4
|
+
"description": "AI Agent CLI Security Sandbox",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai", "agent", "sandbox", "docker", "cli", "container", "development"
|
|
7
|
+
],
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/xcanwin/manyoyo.git"
|
|
11
|
+
},
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": "xcanwin",
|
|
14
|
+
"type": "commonjs",
|
|
5
15
|
"main": "bin/manyoyo.js",
|
|
6
16
|
"bin": {
|
|
7
|
-
"manyoyo": "bin/manyoyo.js"
|
|
17
|
+
"manyoyo": "bin/manyoyo.js",
|
|
18
|
+
"myy": "bin/manyoyo.js"
|
|
8
19
|
},
|
|
9
20
|
"scripts": {
|
|
10
21
|
"install-link": "npm link",
|
|
11
22
|
"test": "node bin/manyoyo.js --help"
|
|
12
23
|
},
|
|
13
|
-
"keywords": [
|
|
14
|
-
"ai",
|
|
15
|
-
"agent",
|
|
16
|
-
"sandbox",
|
|
17
|
-
"docker",
|
|
18
|
-
"cli",
|
|
19
|
-
"container",
|
|
20
|
-
"development"
|
|
21
|
-
],
|
|
22
|
-
"author": "xcanwin",
|
|
23
|
-
"license": "MIT",
|
|
24
|
-
"repository": {
|
|
25
|
-
"type": "git",
|
|
26
|
-
"url": "git+https://github.com/xcanwin/manyoyo.git"
|
|
27
|
-
},
|
|
28
24
|
"homepage": "https://github.com/xcanwin/manyoyo",
|
|
29
25
|
"engines": {
|
|
30
26
|
"node": ">=14.0.0"
|