Skip to content

Commit 072324a

Browse files
CodeCasterXclaude
andcommitted
docs(sandbox): 修正各 AI 工具跳过确认的参数描述
- Codex: --full-auto 高危命令仍需确认,--yolo 才是完全跳过 - OpenCode: 补充 --dangerously-skip-permissions 选项说明 - 对比表拆分"跳过所有确认"和"半自动模式"两行 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 614a637 commit 072324a

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docker/sandbox/README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,17 @@ codex exec --json "列出所有 API 端点"
218218
# 指定模型
219219
codex exec -m o4-mini "优化这个排序算法"
220220

221-
# 全自动模式(无需确认,可写工作区
221+
# 全自动模式(自动执行大部分操作,但高危命令如 rm -rf 仍需确认
222222
codex exec --full-auto "给所有 API 路由添加错误处理"
223223

224+
# 完全跳过所有确认(仅限沙箱/容器等外部隔离环境!)
225+
# --yolo 是 --dangerously-bypass-approvals-and-sandbox 的别名
226+
codex exec --yolo "给所有 API 路由添加错误处理"
227+
224228
# 审批模式(比 --full-auto 更细粒度的控制)
225229
# suggest: 只读,所有操作需人工确认
226230
# auto-edit: 自动执行文件编辑,命令仍需确认
227-
# full-auto: 全自动(等同 --full-auto)
231+
# full-auto: 自动执行大部分操作,高危命令仍需确认
228232
codex exec --approval-mode auto-edit "重构数据库模块"
229233

230234
# 静默模式(抑制 TUI 输出,适合 CI/CD 管道)
@@ -271,6 +275,10 @@ opencode run --format json "列出所有 API 端点"
271275
# 附加文件到 prompt
272276
opencode run --file src/auth.ts "审查这个文件的安全性"
273277

278+
# 跳过所有确认(仅限沙箱/容器等外部隔离环境!)
279+
# 也可通过环境变量:OPENCODE_DANGEROUSLY_SKIP_PERMISSIONS=true
280+
opencode run --dangerously-skip-permissions "给所有 API 路由添加错误处理"
281+
274282
# 无头服务器模式(后台常驻,避免每次冷启动 MCP)
275283
opencode serve --hostname 127.0.0.1 --port 4096
276284

@@ -350,7 +358,8 @@ gemini --list-sessions
350358
| 管道输入 | `cat f \| claude -p` | `echo x \| codex exec -` | `--file` 附加文件 | `cat f \| gemini -p` |
351359
| JSON 输出 | `--output-format json` | `--json` | `--format json` | `--output-format json` |
352360
| 指定模型 | `--model opus` | `-m o4-mini` | `-m provider/model` | `-m gemini-2.5-flash` |
353-
| 跳过确认 | `--dangerously-skip-permissions` | `--full-auto` || `--yolo` |
361+
| 跳过所有确认 | `--dangerously-skip-permissions` | `--yolo` | `--dangerously-skip-permissions` | `--yolo` |
362+
| 半自动模式 || `--full-auto`(高危命令仍确认) |||
354363
| 预指定会话 ID | `--session-id <UUID>` ||||
355364
| 恢复指定会话 | `--resume <ID>` | `exec resume <ID>` | `-s <ID>` | `--resume <ID>` |
356365
| 继续最近会话 | `-c` | `exec resume --last` | `-c` | `--resume`(无参数) |

0 commit comments

Comments
 (0)