Loading...
Loading...
Compare original and translation side by side
undefinedundefined| Flag | Short | Purpose |
|---|---|---|
| `--model` | `-m` | Select model (e.g. `gpt-5.3-codex`, `o3`) |
| `--sandbox` | `-s` | `read-only` / `workspace-write` / `danger-full-access` |
| `--ask-for-approval` | `-a` | `untrusted` / `on-failure` / `on-request` / `never` |
| `--full-auto` | Shortcut: `-a on-request -s workspace-write` | |
| `--image` | `-i` | Attach image(s) to prompt |
| `--search` | Enable live web search | |
| `--cd` | `-C` | Set the working directory for the `codex` command. This directory will be used as the base for operations by subcommands like `exec`, `review`, `cloud exec`, etc. This flag should be passed directly to the `codex` command. For example: `codex --cd /path/to/project review`. |
| `--add-dir` | Grant additional writable directories | |
| `--config` | `-c` | Override config value (e.g. `-c model="o3"`) |
| `--profile` | `-p` | Load named config profile |
| `--oss` | Use local model provider (LM Studio / Ollama) | |
| `--json` | (exec only) JSONL output | |
| `--output-last-message` | `-o` | (exec only) Write last message to file |
| `--yolo` | Bypass all approvals and sandbox (DANGEROUS) |
| 标记 | 简写 | 用途 |
|---|---|---|
| | 选择模型(例如 |
| | 设置沙箱模式: |
| | 设置审批模式: |
| 快捷设置: | |
| | 为提示词附加图片 |
| 启用实时网页搜索 | |
| | 设置codex命令的工作目录,该目录将作为 |
| 额外授予可写入的目录权限 | |
| | 覆盖配置值(例如 |
| | 加载指定名称的配置文件 |
| 使用本地模型提供商(LM Studio / Ollama) | |
| 仅适用于exec命令:输出JSONL格式结果 | |
| | 仅适用于exec命令:将最后一条消息写入文件 |
| 绕过所有审批与沙箱限制(危险操作) |
| Command | Purpose |
|---|---|
| `/model` | Switch model mid-session |
| `/permissions` | Adjust approval/sandbox settings |
| `/review` | Run code review |
| `/diff` | Show git diff including untracked files |
| `/compact` | Summarize conversation to free tokens |
| `/mention` | Attach file to conversation |
| `/new` | Start new conversation in same session |
| `/resume` | Resume saved conversation |
| `/fork` | Fork current conversation |
| `/init` | Generate AGENTS.md scaffold |
| `/mcp` | List MCP tools |
| `/status` | Show session config and token usage |
| `/ps` | Show background terminals |
| `/quit` | Exit |
| 命令 | 用途 |
|---|---|
| 会话中途切换模型 |
| 调整审批/沙箱设置 |
| 执行代码审查 |
| 显示包含未跟踪文件的git差异 |
| 总结对话内容以释放令牌 |
| 为对话附加文件 |
| 在同一会话中开启新对话 |
| 恢复已保存的对话 |
| 分支当前对话 |
| 生成AGENTS.md脚手架文件 |
| 列出MCP工具 |
| 显示会话配置与令牌使用情况 |
| 显示后台终端 |
| 退出会话 |
undefinedundefinedcodex review --base main --title "PR #42: 添加认证功能"codex --cd ./backend --add-dir ./shared "更新API"codex -i mockup.png "严格按照此UI实现功能"codex --oss --CPA ollama -m codellama "重构此函数"~/.codex/config.toml.codex/config.tomlcodex mcp list # 列出已配置的服务器
codex mcp add <name> # 添加MCP服务器
codex mcp remove <name> # 删除MCP服务器
codex mcp login <name> # 登录MCP服务器进行身份验证
codex mcp logout <name> # 删除服务器凭证[mcp_servers.my-server]
command = "npx"
args = ["-y", "@my/mcp-server"]
enabled = true