@xcanwin/manyoyo 3.7.5 → 3.7.7
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 +64 -35
- package/bin/manyoyo.js +8 -8
- package/config.example.json +17 -17
- package/docker/manyoyo.Dockerfile +48 -48
- package/docs/README_EN.md +64 -35
- package/package.json +39 -39
package/README.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
# <p align="center"><a href="https://github.com/xcanwin/manyoyo">MANYOYO(慢悠悠)</a></p>
|
|
2
|
+
<p align="center">一款AI智能体安全沙箱,保障PC安全,可以随心所欲运行YOLO/SOLO模式。</p>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/@xcanwin/manyoyo"><img alt="npm" src="https://img.shields.io/npm/v/@xcanwin/manyoyo?style=flat-square" /></a>
|
|
5
|
+
<a href="https://github.com/xcanwin/manyoyo/actions/workflows/npm-publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/xcanwin/manyoyo/npm-publish.yml?style=flat-square" /></a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="README.md"><b>中文</b></a> |
|
|
10
|
+
<a href="docs/README_EN.md">English</a>
|
|
11
|
+
</p>
|
|
2
12
|
|
|
3
13
|
---
|
|
4
14
|
|
|
5
|
-
# MANYOYO(慢悠悠)
|
|
6
|
-
|
|
7
15
|
**MANYOYO** 是一款 AI 智能体提效安全沙箱,安全、高效、省 token,专为 Agent YOLO 模式设计,保障宿主机安全。
|
|
8
16
|
|
|
9
17
|
预装常见 Agent 与工具,进一步节省 token。循环自由切换 Agent 和 `/bin/bash`,进一步提效。
|
|
@@ -132,12 +140,14 @@ TESTPATH='/usr/local/bin'
|
|
|
132
140
|
- `manyoyo --ef myconfig` → 加载 `~/.manyoyo/env/myconfig.env`
|
|
133
141
|
- `manyoyo --ef ./myconfig.env` → 加载当前目录的 `myconfig.env`
|
|
134
142
|
|
|
143
|
+
#### 常用样例-Claude Code
|
|
144
|
+
|
|
135
145
|
```bash
|
|
136
146
|
# 创建环境文件目录
|
|
137
147
|
mkdir -p ~/.manyoyo/env/
|
|
138
148
|
|
|
139
149
|
# 示例:创建 Claude 环境文件
|
|
140
|
-
cat > ~/.manyoyo/env/
|
|
150
|
+
cat > ~/.manyoyo/env/anthropic_[claudecode]_claudecode.env << 'EOF'
|
|
141
151
|
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
|
|
142
152
|
# export CLAUDE_CODE_OAUTH_TOKEN="sk-xxxxxxxx"
|
|
143
153
|
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxx"
|
|
@@ -150,7 +160,23 @@ export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-4-5"
|
|
|
150
160
|
EOF
|
|
151
161
|
|
|
152
162
|
# 在任意目录下使用环境文件
|
|
153
|
-
manyoyo --ef
|
|
163
|
+
manyoyo --ef anthropic_[claudecode]_claudecode -x claude
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### 常用样例-Codex
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# 创建环境文件目录
|
|
170
|
+
mkdir -p ~/.manyoyo/env/
|
|
171
|
+
|
|
172
|
+
# 示例:创建 Codex 环境文件
|
|
173
|
+
cat > ~/.manyoyo/env/openai_[gpt]_codex.env << 'EOF'
|
|
174
|
+
export OPENAI_BASE_URL=https://chatgpt.com/backend-api/codex
|
|
175
|
+
export OTEL_SDK_DISABLED=true
|
|
176
|
+
EOF
|
|
177
|
+
|
|
178
|
+
# 在任意目录下使用环境文件
|
|
179
|
+
manyoyo --ef openai_[gpt]_codex -x codex
|
|
154
180
|
```
|
|
155
181
|
|
|
156
182
|
### 配置文件
|
|
@@ -169,27 +195,27 @@ manyoyo --ef claude -x claude
|
|
|
169
195
|
|
|
170
196
|
```json5
|
|
171
197
|
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
198
|
+
// 容器基础配置
|
|
199
|
+
"containerName": "myy-dev", // 默认容器名称
|
|
200
|
+
"hostPath": "/path/to/project", // 默认宿主机工作目录
|
|
201
|
+
"containerPath": "/path/to/project", // 默认容器工作目录
|
|
202
|
+
"imageName": "localhost/xcanwin/manyoyo", // 默认镜像名称
|
|
203
|
+
"imageVersion": "1.6.4-full", // 默认镜像版本
|
|
204
|
+
"containerMode": "common", // 容器嵌套模式 (common, dind, sock)
|
|
205
|
+
|
|
206
|
+
// 环境变量配置
|
|
207
|
+
"envFile": [
|
|
208
|
+
"claude" // 对应 ~/.manyoyo/env/claude.env
|
|
209
|
+
],
|
|
210
|
+
"env": [], // 默认环境变量数组
|
|
211
|
+
|
|
212
|
+
// 其他配置
|
|
213
|
+
"volumes": [], // 默认挂载卷数组
|
|
214
|
+
"shellPrefix": "", // 默认命令前缀
|
|
215
|
+
"shell": "", // 默认执行命令
|
|
216
|
+
"yolo": "", // 默认 YOLO 模式 (c, gm, cx, oc)
|
|
217
|
+
"quiet": [], // 默认静默选项数组 (支持 ["tip", "cmd"] 格式)
|
|
218
|
+
"imageBuildArgs": [] // 默认镜像构建参数
|
|
193
219
|
}
|
|
194
220
|
```
|
|
195
221
|
|
|
@@ -209,8 +235,8 @@ mkdir -p ~/.manyoyo/
|
|
|
209
235
|
|
|
210
236
|
cat > ~/.manyoyo/manyoyo.json << 'EOF'
|
|
211
237
|
{
|
|
212
|
-
|
|
213
|
-
|
|
238
|
+
"imageName": "localhost/xcanwin/manyoyo",
|
|
239
|
+
"imageVersion": "1.6.4-full"
|
|
214
240
|
}
|
|
215
241
|
EOF
|
|
216
242
|
```
|
|
@@ -220,17 +246,17 @@ EOF
|
|
|
220
246
|
```bash
|
|
221
247
|
mkdir -p ~/.manyoyo/run/
|
|
222
248
|
|
|
223
|
-
cat > ~/.manyoyo/run/
|
|
249
|
+
cat > ~/.manyoyo/run/claude.json << 'EOF'
|
|
224
250
|
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
251
|
+
"envFile": [
|
|
252
|
+
"anthropic_[claudecode]_claudecode" // 自动加载 ~/.manyoyo/env/claude.env
|
|
253
|
+
],
|
|
254
|
+
"yolo": "c"
|
|
229
255
|
}
|
|
230
256
|
EOF
|
|
231
257
|
|
|
232
258
|
# 在任意目录下使用运行配置
|
|
233
|
-
manyoyo -r
|
|
259
|
+
manyoyo -r claude
|
|
234
260
|
```
|
|
235
261
|
|
|
236
262
|
#### 常用样例-Codex
|
|
@@ -240,8 +266,11 @@ mkdir -p ~/.manyoyo/run/
|
|
|
240
266
|
|
|
241
267
|
cat > ~/.manyoyo/run/codex.json << 'EOF'
|
|
242
268
|
{
|
|
269
|
+
"envFile": [
|
|
270
|
+
"openai_[gpt]_codex"
|
|
271
|
+
],
|
|
243
272
|
"volumes": [
|
|
244
|
-
"/Users/
|
|
273
|
+
"/Users/pc_user/.codex/auth.json:/root/.codex/auth.json"
|
|
245
274
|
],
|
|
246
275
|
"yolo": "cx"
|
|
247
276
|
}
|
package/bin/manyoyo.js
CHANGED
|
@@ -276,7 +276,7 @@ function setYolo(cli) {
|
|
|
276
276
|
break;
|
|
277
277
|
case 'opencode':
|
|
278
278
|
case 'oc':
|
|
279
|
-
EXEC_COMMAND = "OPENCODE_PERMISSION=allow opencode";
|
|
279
|
+
EXEC_COMMAND = "OPENCODE_PERMISSION='\"allow\"' opencode";
|
|
280
280
|
break;
|
|
281
281
|
default:
|
|
282
282
|
console.log(`${RED}⚠️ 未知LLM CLI: ${cli}${NC}`);
|
|
@@ -483,7 +483,7 @@ async function prepareBuildCache(imageTool) {
|
|
|
483
483
|
const nodeTargetPath = path.join(nodeCacheDir, shasum);
|
|
484
484
|
runCmd('curl', ['-fsSL', nodeUrl, '-o', nodeTargetPath], { stdio: 'inherit' });
|
|
485
485
|
timestamps[nodeKey] = now.toISOString();
|
|
486
|
-
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null,
|
|
486
|
+
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null, 4));
|
|
487
487
|
console.log(`${GREEN}✓ Node.js 下载完成${NC}`);
|
|
488
488
|
} catch (e) {
|
|
489
489
|
console.error(`${RED}错误: Node.js 下载失败${NC}`);
|
|
@@ -515,7 +515,7 @@ async function prepareBuildCache(imageTool) {
|
|
|
515
515
|
const srcDir = path.join(tmpDir, 'usr', 'share', 'jdtls');
|
|
516
516
|
runCmd('tar', ['-czf', jdtlsPath, '-C', srcDir, '.'], { stdio: 'inherit' });
|
|
517
517
|
timestamps[jdtlsKey] = now.toISOString();
|
|
518
|
-
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null,
|
|
518
|
+
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null, 4));
|
|
519
519
|
console.log(`${GREEN}✓ JDT LSP 下载完成${NC}`);
|
|
520
520
|
} catch (e) {
|
|
521
521
|
console.error(`${RED}错误: JDT LSP 下载失败${NC}`);
|
|
@@ -565,7 +565,7 @@ async function prepareBuildCache(imageTool) {
|
|
|
565
565
|
|
|
566
566
|
// Save timestamp immediately after successful download
|
|
567
567
|
timestamps[goplsKey] = now.toISOString();
|
|
568
|
-
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null,
|
|
568
|
+
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null, 4));
|
|
569
569
|
console.log(`${GREEN}✓ gopls 下载完成${NC}`);
|
|
570
570
|
|
|
571
571
|
// Clean up temp directory (with go clean for mod cache)
|
|
@@ -586,7 +586,7 @@ async function prepareBuildCache(imageTool) {
|
|
|
586
586
|
}
|
|
587
587
|
|
|
588
588
|
// Save timestamps
|
|
589
|
-
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null,
|
|
589
|
+
fs.writeFileSync(timestampFile, JSON.stringify(timestamps, null, 4));
|
|
590
590
|
console.log(`${GREEN}✅ 构建缓存准备完成${NC}\n`);
|
|
591
591
|
}
|
|
592
592
|
|
|
@@ -668,7 +668,7 @@ function setupCommander() {
|
|
|
668
668
|
--ef ./file.env → 当前目录的 file.env
|
|
669
669
|
|
|
670
670
|
示例:
|
|
671
|
-
${MANYOYO_NAME} --ib
|
|
671
|
+
${MANYOYO_NAME} --ib --iv ${IMAGE_VERSION_BASE || "1.0.0"} 构建镜像
|
|
672
672
|
${MANYOYO_NAME} -r c 使用 ~/.manyoyo/run/c.json 配置
|
|
673
673
|
${MANYOYO_NAME} -r ./myconfig.json 使用当前目录 ./myconfig.json 配置
|
|
674
674
|
${MANYOYO_NAME} -n test --ef claude -y c 使用 ~/.manyoyo/env/claude.env 环境变量文件
|
|
@@ -711,7 +711,7 @@ function setupCommander() {
|
|
|
711
711
|
"Vendor": "xcanwin",
|
|
712
712
|
"Version": "v1.0.0",
|
|
713
713
|
"Description": "AI Agent CLI Sandbox"
|
|
714
|
-
}, null,
|
|
714
|
+
}, null, 4));
|
|
715
715
|
process.exit(0);
|
|
716
716
|
}
|
|
717
717
|
|
|
@@ -824,7 +824,7 @@ function setupCommander() {
|
|
|
824
824
|
suffix: EXEC_COMMAND_SUFFIX
|
|
825
825
|
}
|
|
826
826
|
};
|
|
827
|
-
console.log(JSON.stringify(finalConfig, null,
|
|
827
|
+
console.log(JSON.stringify(finalConfig, null, 4));
|
|
828
828
|
process.exit(0);
|
|
829
829
|
}
|
|
830
830
|
|
package/config.example.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
2
|
+
// MANYOYO 全局配置文件,保存到 ~/.manyoyo/manyoyo.json
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
// 覆盖型参数(命令行 > 运行配置 > 全局配置)
|
|
5
|
+
"containerName": "myy-dev",
|
|
6
|
+
"hostPath": "/path/to/your/project",
|
|
7
|
+
"containerPath": "/path/to/your/project",
|
|
8
|
+
"imageName": "localhost/xcanwin/manyoyo",
|
|
9
|
+
"imageVersion": "1.6.4-full",
|
|
10
|
+
"containerMode": "common",
|
|
11
|
+
"shellPrefix": "",
|
|
12
|
+
"shell": "",
|
|
13
|
+
"yolo": "",
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
// 合并型参数(配置文件和命令行会累加)
|
|
16
|
+
"env": ["IS_SANDBOX=1"],
|
|
17
|
+
"envFile": [],
|
|
18
|
+
"volumes": [],
|
|
19
|
+
"imageBuildArgs": [],
|
|
20
|
+
"quiet": ["tip", "cmd"]
|
|
21
21
|
}
|
|
@@ -11,9 +11,9 @@ COPY ./docker/cache/ /cache/
|
|
|
11
11
|
RUN <<EOX
|
|
12
12
|
# 确定架构
|
|
13
13
|
case "$TARGETARCH" in
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
amd64) ARCH_NODE="x64"; ARCH_GO="amd64" ;;
|
|
15
|
+
arm64) ARCH_NODE="arm64"; ARCH_GO="arm64" ;;
|
|
16
|
+
*) ARCH_NODE="$TARGETARCH"; ARCH_GO="$TARGETARCH" ;;
|
|
17
17
|
esac
|
|
18
18
|
|
|
19
19
|
# Node.js: 检测缓存,不存在则下载
|
|
@@ -124,13 +124,13 @@ RUN <<EOX
|
|
|
124
124
|
mkdir -p ~/.claude/plugins/marketplaces/
|
|
125
125
|
cat > ~/.claude.json <<EOF
|
|
126
126
|
{
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
127
|
+
"bypassPermissionsModeAccepted": true,
|
|
128
|
+
"hasCompletedOnboarding": true,
|
|
129
|
+
"env": {
|
|
130
|
+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1",
|
|
131
|
+
"CLAUDE_CODE_HIDE_ACCOUNT_INFO": "1",
|
|
132
|
+
"DISABLE_AUTOUPDATER": "1"
|
|
133
|
+
}
|
|
134
134
|
}
|
|
135
135
|
EOF
|
|
136
136
|
GIT_SSL_NO_VERIFY=$GIT_SSL_NO_VERIFY claude plugin marketplace add anthropics/claude-plugins-official
|
|
@@ -146,22 +146,22 @@ EOF
|
|
|
146
146
|
mkdir -p ~/.gemini/
|
|
147
147
|
cat > ~/.gemini/settings.json <<EOF
|
|
148
148
|
{
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
"privacy": {
|
|
150
|
+
"usageStatisticsEnabled": false
|
|
151
|
+
},
|
|
152
|
+
"security": {
|
|
153
|
+
"auth": {
|
|
154
|
+
"selectedType": "oauth-personal"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"general": {
|
|
158
|
+
"previewFeatures": true,
|
|
159
|
+
"disableAutoUpdate": true,
|
|
160
|
+
"disableUpdateNag": true
|
|
161
|
+
},
|
|
162
|
+
"model": {
|
|
163
|
+
"name": "gemini-3-pro-preview"
|
|
155
164
|
}
|
|
156
|
-
},
|
|
157
|
-
"general": {
|
|
158
|
-
"previewFeatures": true,
|
|
159
|
-
"disableAutoUpdate": true,
|
|
160
|
-
"disableUpdateNag": true
|
|
161
|
-
},
|
|
162
|
-
"model": {
|
|
163
|
-
"name": "gemini-3-pro-preview"
|
|
164
|
-
}
|
|
165
165
|
}
|
|
166
166
|
EOF
|
|
167
167
|
;; esac
|
|
@@ -181,11 +181,11 @@ EOF
|
|
|
181
181
|
mkdir -p ~/.copilot/
|
|
182
182
|
cat > ~/.copilot/config.json <<EOF
|
|
183
183
|
{
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
"banner": "never",
|
|
185
|
+
"model": "gemini-3-pro-preview",
|
|
186
|
+
"render_markdown": true,
|
|
187
|
+
"screen_reader": false,
|
|
188
|
+
"theme": "auto"
|
|
189
189
|
}
|
|
190
190
|
EOF
|
|
191
191
|
;; esac
|
|
@@ -196,26 +196,26 @@ EOF
|
|
|
196
196
|
mkdir -p ~/.config/opencode/
|
|
197
197
|
cat > ~/.config/opencode/opencode.json <<EOF
|
|
198
198
|
{
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
199
|
+
"\$schema": "https://opencode.ai/config.json",
|
|
200
|
+
"autoupdate": false,
|
|
201
|
+
"model": "Custom-Provider/{env:OPENAI_MODEL}",
|
|
202
|
+
"provider": {
|
|
203
|
+
"Custom-Provider": {
|
|
204
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
205
|
+
"options": {
|
|
206
|
+
"baseURL": "{env:OPENAI_BASE_URL}",
|
|
207
|
+
"apiKey": "{env:OPENAI_API_KEY}",
|
|
208
|
+
"headers": {
|
|
209
|
+
"User-Agent": "opencode"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"models": {
|
|
213
|
+
"{env:OPENAI_MODEL}": {},
|
|
214
|
+
"claude-sonnet-4-5-20250929": {},
|
|
215
|
+
"gpt-5.2": {}
|
|
216
|
+
}
|
|
210
217
|
}
|
|
211
|
-
},
|
|
212
|
-
"models": {
|
|
213
|
-
"{env:ANTHROPIC_MODEL}": {},
|
|
214
|
-
"claude-sonnet-4-5-20250929": {},
|
|
215
|
-
"gpt-5.2": {}
|
|
216
|
-
}
|
|
217
218
|
}
|
|
218
|
-
}
|
|
219
219
|
}
|
|
220
220
|
EOF
|
|
221
221
|
;; esac
|
package/docs/README_EN.md
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
# <p align="center"><a href="https://github.com/xcanwin/manyoyo">MANYOYO (Man-Yo-Yo)</a></p>
|
|
2
|
+
<p align="center">AI Agent CLI Security Sandbox.</p>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/@xcanwin/manyoyo"><img alt="npm" src="https://img.shields.io/npm/v/@xcanwin/manyoyo?style=flat-square" /></a>
|
|
5
|
+
<a href="https://github.com/xcanwin/manyoyo/actions/workflows/npm-publish.yml"><img alt="Build status" src="https://img.shields.io/github/actions/workflow/status/xcanwin/manyoyo/npm-publish.yml?style=flat-square" /></a>
|
|
6
|
+
</p>
|
|
7
|
+
|
|
8
|
+
<p align="center">
|
|
9
|
+
<a href="README.md">中文</a> |
|
|
10
|
+
<a href="docs/README_EN.md"><b>English</b></a>
|
|
11
|
+
</p>
|
|
2
12
|
|
|
3
13
|
---
|
|
4
14
|
|
|
5
|
-
# MANYOYO (Man-Yo-Yo)
|
|
6
|
-
|
|
7
15
|
**MANYOYO** is an AI agent security sandbox that is safe, efficient, and token-saving. Designed specifically for Agent YOLO mode to protect the host machine.
|
|
8
16
|
|
|
9
17
|
Pre-installed with common agents and tools to further save tokens. Freely switch between agents and `/bin/bash` in a loop for enhanced efficiency.
|
|
@@ -109,7 +117,7 @@ manyoyo -q tip -q cmd -x echo "hello world" # Multiple quiet options
|
|
|
109
117
|
|
|
110
118
|
### Environment Variables
|
|
111
119
|
|
|
112
|
-
|
|
120
|
+
Send BASE_URL, TOKEN, etc. to the CLI in the container.
|
|
113
121
|
|
|
114
122
|
#### String Format
|
|
115
123
|
|
|
@@ -132,12 +140,14 @@ TESTPATH='/usr/local/bin'
|
|
|
132
140
|
- `manyoyo --ef myconfig` → loads `~/.manyoyo/env/myconfig.env`
|
|
133
141
|
- `manyoyo --ef ./myconfig.env` → loads `myconfig.env` from current directory
|
|
134
142
|
|
|
143
|
+
#### Common Examples-Claude Code
|
|
144
|
+
|
|
135
145
|
```bash
|
|
136
146
|
# Create environment file directory
|
|
137
147
|
mkdir -p ~/.manyoyo/env/
|
|
138
148
|
|
|
139
149
|
# Example: Create Claude environment file
|
|
140
|
-
cat > ~/.manyoyo/env/
|
|
150
|
+
cat > ~/.manyoyo/env/anthropic_[claudecode]_claudecode.env << 'EOF'
|
|
141
151
|
export ANTHROPIC_BASE_URL="https://api.anthropic.com"
|
|
142
152
|
# export CLAUDE_CODE_OAUTH_TOKEN="sk-xxxxxxxx"
|
|
143
153
|
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxx"
|
|
@@ -150,7 +160,23 @@ export CLAUDE_CODE_SUBAGENT_MODEL="claude-sonnet-4-5"
|
|
|
150
160
|
EOF
|
|
151
161
|
|
|
152
162
|
# Use environment file from any directory
|
|
153
|
-
manyoyo --ef
|
|
163
|
+
manyoyo --ef anthropic_[claudecode]_claudecode -x claude
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Common Examples-Codex
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
# Create environment file directory
|
|
170
|
+
mkdir -p ~/.manyoyo/env/
|
|
171
|
+
|
|
172
|
+
# Example: Create Codex environment file
|
|
173
|
+
cat > ~/.manyoyo/env/openai_[gpt]_codex.env << 'EOF'
|
|
174
|
+
export OPENAI_BASE_URL=https://chatgpt.com/backend-api/codex
|
|
175
|
+
export OTEL_SDK_DISABLED=true
|
|
176
|
+
EOF
|
|
177
|
+
|
|
178
|
+
# Use environment file from any directory
|
|
179
|
+
manyoyo --ef openai_[gpt]_codex -x codex
|
|
154
180
|
```
|
|
155
181
|
|
|
156
182
|
### Configuration Files
|
|
@@ -169,27 +195,27 @@ Refer to `config.example.json` for all available options:
|
|
|
169
195
|
|
|
170
196
|
```json5
|
|
171
197
|
{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
198
|
+
// Container basic configuration
|
|
199
|
+
"containerName": "myy-dev", // Default container name
|
|
200
|
+
"hostPath": "/path/to/project", // Default host working directory
|
|
201
|
+
"containerPath": "/path/to/project", // Default container working directory
|
|
202
|
+
"imageName": "localhost/xcanwin/manyoyo", // Default image name
|
|
203
|
+
"imageVersion": "1.6.4-full", // Default image version
|
|
204
|
+
"containerMode": "common", // Container nesting mode (common, dind, sock)
|
|
205
|
+
|
|
206
|
+
// Environment variable configuration
|
|
207
|
+
"envFile": [
|
|
208
|
+
"claude" // Corresponds to ~/.manyoyo/env/claude.env
|
|
209
|
+
],
|
|
210
|
+
"env": [], // Default environment variables array
|
|
211
|
+
|
|
212
|
+
// Other configuration
|
|
213
|
+
"volumes": [], // Default volume mounts array
|
|
214
|
+
"shellPrefix": "", // Default command prefix
|
|
215
|
+
"shell": "", // Default execute command
|
|
216
|
+
"yolo": "", // Default YOLO mode (c, gm, cx, oc)
|
|
217
|
+
"quiet": [], // Default quiet options array (supports ["tip", "cmd"] format)
|
|
218
|
+
"imageBuildArgs": [] // Default image build arguments
|
|
193
219
|
}
|
|
194
220
|
```
|
|
195
221
|
|
|
@@ -209,8 +235,8 @@ mkdir -p ~/.manyoyo/
|
|
|
209
235
|
|
|
210
236
|
cat > ~/.manyoyo/manyoyo.json << 'EOF'
|
|
211
237
|
{
|
|
212
|
-
|
|
213
|
-
|
|
238
|
+
"imageName": "localhost/xcanwin/manyoyo",
|
|
239
|
+
"imageVersion": "1.6.4-full"
|
|
214
240
|
}
|
|
215
241
|
EOF
|
|
216
242
|
```
|
|
@@ -222,15 +248,15 @@ mkdir -p ~/.manyoyo/run/
|
|
|
222
248
|
|
|
223
249
|
cat > ~/.manyoyo/run/c.json << 'EOF'
|
|
224
250
|
{
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
251
|
+
"envFile": [
|
|
252
|
+
"anthropic_[claudecode]_claudecode" // Automatically loads ~/.manyoyo/env/claude.env
|
|
253
|
+
],
|
|
254
|
+
"yolo": "c"
|
|
229
255
|
}
|
|
230
256
|
EOF
|
|
231
257
|
|
|
232
258
|
# Use run configuration from any directory
|
|
233
|
-
manyoyo -r
|
|
259
|
+
manyoyo -r claude
|
|
234
260
|
```
|
|
235
261
|
|
|
236
262
|
#### Common Examples-Codex
|
|
@@ -240,8 +266,11 @@ mkdir -p ~/.manyoyo/run/
|
|
|
240
266
|
|
|
241
267
|
cat > ~/.manyoyo/run/codex.json << 'EOF'
|
|
242
268
|
{
|
|
269
|
+
"envFile": [
|
|
270
|
+
"openai_[gpt]_codex"
|
|
271
|
+
],
|
|
243
272
|
"volumes": [
|
|
244
|
-
"/Users/
|
|
273
|
+
"/Users/pc_user/.codex/auth.json:/root/.codex/auth.json"
|
|
245
274
|
],
|
|
246
275
|
"yolo": "cx"
|
|
247
276
|
}
|
package/package.json
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
2
|
+
"name": "@xcanwin/manyoyo",
|
|
3
|
+
"version": "3.7.7",
|
|
4
|
+
"imageVersion": "1.6.5",
|
|
5
|
+
"description": "AI Agent CLI Security Sandbox",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"ai", "agent", "sandbox", "docker", "cli", "container", "development"
|
|
8
|
+
],
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/xcanwin/manyoyo.git"
|
|
12
|
+
},
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "xcanwin",
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"main": "bin/manyoyo.js",
|
|
17
|
+
"bin": {
|
|
18
|
+
"manyoyo": "bin/manyoyo.js",
|
|
19
|
+
"myy": "bin/manyoyo.js"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"install-link": "npm link",
|
|
23
|
+
"test": "node bin/manyoyo.js --help"
|
|
24
|
+
},
|
|
25
|
+
"homepage": "https://github.com/xcanwin/manyoyo",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22.0.0"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"bin/manyoyo.js",
|
|
31
|
+
"README.md",
|
|
32
|
+
"docs/README_EN.md",
|
|
33
|
+
"LICENSE",
|
|
34
|
+
"docker/manyoyo.Dockerfile",
|
|
35
|
+
"config.example.json"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"commander": "^12.0.0",
|
|
39
|
+
"json5": "^2.2.3"
|
|
40
|
+
}
|
|
41
41
|
}
|