Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ CodexGuide 致力于建设一份面向真实工程流程的中文知识库:结
| [入口地图](./docs/platform/index.md) | CLI、Desktop App、Cloud/Web、IDE、ChatGPT 的选择方法 |
| [安装与登录](./docs/guide/01-installation.md) | Codex CLI 安装、更新、登录和第一次进入项目 |
| [第一次改代码](./docs/guide/02-first-run.md) | 选择低风险任务,并完成一次可验证修改 |
| [提示词与任务说明](./docs/guide/03-prompting.md) | 写出更稳定、更可控的 Codex 任务 |
| [真实工程工作流](./docs/guide/04-workflows.md) | 修 bug、补测试、重构、代码审查和文档生成 |
| [了解 Codex 项目和聊天](./docs/guide/03-projects-chats.md) | 认识 Project、对话和基础使用方式 |
| [任务顺序执行与并行](./docs/guide/04-task-execution.md) | 理解排队、插入引导和多任务并行 |
| [权限管理](./docs/guide/05-permissions.md) | 了解不同审批与执行模式的边界 |
| [真实工程工作流](./docs/guide/06-workflows.md) | 修 bug、补测试、重构、代码审查和文档生成 |
| [配置与扩展](./docs/configuration/index.md) | CLI 选项、config.toml、MCP、Skills、Subagents、安全审批 |
| [实践方法](./docs/practice/index.md) | 任务设计、非开发工作流和团队实践 |
| [AGENTS.md](./docs/guide/05-agents-md.md) | 给 Codex 编写项目级规则和协作边界 |
| [沙盒与审批](./docs/guide/06-sandbox-approvals.md) | 文件、命令、网络、凭据和生产资源的安全边界 |
| [Cloud、IDE 与 App](./docs/guide/07-cloud-ide-app.md) | 不同 Codex 使用入口的适用场景 |
| [AGENTS.md](./docs/guide/07-agents-md.md) | 给 Codex 编写项目级规则和协作边界 |
| [沙盒与审批](./docs/guide/08-sandbox-approvals.md) | 文件、命令、网络、凭据和生产资源的安全边界 |
| [技能与插件](./docs/guide/09-skills-plugins.md) | 理解 Skills、Plugins 和扩展能力 |
| [自动化](./docs/guide/10-automation.md) | 理解什么时候把重复流程交给后台执行 |
| [Cloud、IDE 与 App](./docs/guide/11-cloud-ide-app.md) | 不同 Codex 使用入口的适用场景 |
| [实战案例库](./docs/recipes/index.md) | 可复制到真实项目的任务模板和复盘结构 |
| [官方资料索引](./docs/reference/index.md) | OpenAI 官方资料、GitHub 仓库和关键链接 |

Expand Down
41 changes: 31 additions & 10 deletions docs/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,45 @@ export default navbar([
icon: "box",
children: [
{ text: "实践方法", icon: "tool", link: "/practice/" },
{ text: "实战案例", icon: "lightbulb", link: "/recipes/" },
{ text: "官方资料", icon: "link", link: "/reference/" },
{ text: "共建路线图", icon: "people", link: "/community/roadmap.md" },
],
},
{
text: "实战案例",
icon: "lightbulb",
children: [
{ text: "案例总览", icon: "layout", link: "/recipes/" },
{ text: "01 Codex 控制 Chrome 浏览器", icon: "chrome", link: "/recipes/chrome-browser-plugin.md" },
{ text: "02 安装并使用 PPT Skill", icon: "slides", link: "/recipes/ppt-skill-walkthrough.md" },
{ text: "03 修复一个测试失败", icon: "debug", link: "/recipes/fix-failing-test.md" },
{ text: "04 让 Codex 做代码审查", icon: "review", link: "/recipes/code-review.md" },
{ text: "05 从零补 AGENTS.md", icon: "file", link: "/recipes/agents-md-setup.md" },
{ text: "06 给旧项目补第一批测试", icon: "test", link: "/recipes/add-tests.md" },
{ text: "07 修复 CI 失败", icon: "ci", link: "/recipes/fix-ci.md" },
{ text: "08 拆分超大文件", icon: "code", link: "/recipes/refactor-large-file.md" },
{ text: "09 生成发布说明", icon: "log", link: "/recipes/generate-release-notes.md" },
{ text: "10 Codex 不适合的场景", icon: "warning", link: "/recipes/failure-scenarios.md" },
{ text: "11 官方与社区优秀案例", icon: "people", link: "/recipes/official-community-cases.md" },
],
},
{
text: "教程",
icon: "book",
children: [
{ text: "安装与登录", icon: "download", link: "/guide/01-installation.md" },
{ text: "第一次改代码", icon: "code", link: "/guide/02-first-run.md" },
{ text: "提示词与任务说明", icon: "pen", link: "/guide/03-prompting.md" },
{ text: "真实工程工作流", icon: "project", link: "/guide/04-workflows.md" },
{ text: "AGENTS.md", icon: "file", link: "/guide/05-agents-md.md" },
{ text: "沙盒与审批", icon: "safe", link: "/guide/06-sandbox-approvals.md" },
{ text: "Cloud、IDE 与 App", icon: "cloud", link: "/guide/07-cloud-ide-app.md" },
{ text: "Skills 与 Automations", icon: "tool", link: "/guide/08-skills-automations.md" },
{ text: "排障手册", icon: "debug", link: "/guide/09-troubleshooting.md" },
{ text: "01 安装与登录", icon: "download", link: "/guide/01-installation.md" },
{ text: "02 第一次改代码", icon: "code", link: "/guide/02-first-run.md" },
{ text: "03 了解 Codex 项目和聊天", icon: "folder", link: "/guide/03-projects-chats.md" },
{ text: "04 任务顺序执行与并行", icon: "list", link: "/guide/04-task-execution.md" },
{ text: "05 权限管理", icon: "safe", link: "/guide/05-permissions.md" },
{ text: "06 真实工程工作流", icon: "project", link: "/guide/06-workflows.md" },
{ text: "07 AGENTS.md", icon: "file", link: "/guide/07-agents-md.md" },
{ text: "08 沙盒与审批", icon: "lock", link: "/guide/08-sandbox-approvals.md" },
{ text: "09 技能与插件", icon: "plugin", link: "/guide/09-skills-plugins.md" },
{ text: "10 自动化", icon: "time", link: "/guide/10-automation.md" },
{ text: "11 Cloud、IDE 与 App", icon: "cloud", link: "/guide/11-cloud-ide-app.md" },
{ text: "12 Skills 与 Automations", icon: "tool", link: "/guide/12-skills-automations.md" },
{ text: "13 排障手册", icon: "debug", link: "/guide/13-troubleshooting.md" },
],
},
]);
39 changes: 28 additions & 11 deletions docs/.vuepress/sidebar/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ export default sidebar({
icon: "book",
prefix: "/guide/",
children: [
"00-overview.md",
"01-installation.md",
"02-first-run.md",
"03-prompting.md",
"04-workflows.md",
"05-agents-md.md",
"06-sandbox-approvals.md",
"07-cloud-ide-app.md",
"08-skills-automations.md",
"09-troubleshooting.md",
{ text: "00 学习路线", link: "00-overview.md" },
{ text: "01 安装与登录", link: "01-installation.md" },
{ text: "02 第一次改代码", link: "02-first-run.md" },
{ text: "03 了解 Codex 项目和聊天", link: "03-projects-chats.md" },
{ text: "04 任务顺序执行与并行", link: "04-task-execution.md" },
{ text: "05 权限管理", link: "05-permissions.md" },
{ text: "06 真实工程工作流", link: "06-workflows.md" },
{ text: "07 AGENTS.md", link: "07-agents-md.md" },
{ text: "08 沙盒与审批", link: "08-sandbox-approvals.md" },
{ text: "09 技能与插件", link: "09-skills-plugins.md" },
{ text: "10 自动化", link: "10-automation.md" },
{ text: "11 Cloud、IDE 与 App", link: "11-cloud-ide-app.md" },
{ text: "12 Skills 与 Automations", link: "12-skills-automations.md" },
{ text: "13 排障手册", link: "13-troubleshooting.md" },
],
},
],
Expand All @@ -26,7 +30,20 @@ export default sidebar({
text: "实战案例",
icon: "lightbulb",
prefix: "/recipes/",
children: ["index.md", "fix-failing-test.md", "code-review.md", "official-community-cases.md"],
children: [
{ text: "案例总览", link: "index.md" },
{ text: "01 Codex 控制 Chrome 浏览器", link: "chrome-browser-plugin.md" },
{ text: "02 安装并使用 PPT Skill", link: "ppt-skill-walkthrough.md" },
{ text: "03 修复一个测试失败", link: "fix-failing-test.md" },
{ text: "04 让 Codex 做代码审查", link: "code-review.md" },
{ text: "05 从零补 AGENTS.md", link: "agents-md-setup.md" },
{ text: "06 给旧项目补第一批测试", link: "add-tests.md" },
{ text: "07 修复 CI 失败", link: "fix-ci.md" },
{ text: "08 拆分超大文件", link: "refactor-large-file.md" },
{ text: "09 生成发布说明", link: "generate-release-notes.md" },
{ text: "10 Codex 不适合的场景", link: "failure-scenarios.md" },
{ text: "11 官方与社区优秀案例", link: "official-community-cases.md" },
],
},
],

Expand Down
1 change: 1 addition & 0 deletions docs/configuration/cli-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,3 +177,4 @@ codex exec "请阅读最近一次测试失败日志,提取失败测试名、
- Slash Commands 是观察 Codex 状态的窗口。
- 会话恢复前先写阶段总结。
- 参数变化以当前 CLI 帮助和官方文档为准。

6 changes: 3 additions & 3 deletions docs/guide/00-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Codex 是 OpenAI 面向软件工程与知识工作场景的代理式工作流。
| 阶段 | 目标 | 推荐页面 | 验收标准 |
| --- | --- | --- | --- |
| 入门 | 跑通一个低风险任务 | [安装与登录](./01-installation.md)、[第一次改代码](./02-first-run.md) | 能让 Codex 阅读仓库、修改一个小问题并运行验证 |
| 进阶 | 形成稳定任务方法 | [提示词与任务说明](./03-prompting.md)、[实践方法](/practice/) | 能写清楚目标、范围、约束、验证和交付 |
| 工程化 | 进入真实项目流程 | [真实工程工作流](./04-workflows.md)、[配置与扩展](/configuration/) | 每次改动都有 diff、测试结果和风险说明 |
| 团队化 | 沉淀规则和案例 | [AGENTS.md](./05-agents-md.md)、[团队实践](/practice/team-playbook.md) | 项目有规则文件、案例库、排障手册和贡献路径 |
| 进阶 | 形成稳定任务方法 | [了解 Codex 项目和聊天](./03-projects-chats.md)、[实践方法](/practice/) | 能写清楚目标、范围、约束、验证和交付 |
| 工程化 | 进入真实项目流程 | [真实工程工作流](./06-workflows.md)、[配置与扩展](/configuration/) | 每次改动都有 diff、测试结果和风险说明 |
| 团队化 | 沉淀规则和案例 | [AGENTS.md](./07-agents-md.md)、[团队实践](/practice/team-playbook.md) | 项目有规则文件、案例库、排障手册和贡献路径 |

## 新手推荐路径

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/02-first-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,4 @@ git commit -m "fix: resolve failing test"
- 一个可复用的任务模板。
- 对 Codex 权限和审批的初步理解。

下一步继续读:[提示词与任务说明](./03-prompting.md)。
下一步继续读:[了解 Codex 项目和聊天](./03-projects-chats.md)。
19 changes: 19 additions & 0 deletions docs/guide/03-projects-chats.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# 了解codex-项目和聊天

打开codex app,我们可以看到两个选项:对话和项目

![image-20260510133930030](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510133930030.png?imageSlim)

左边分为两个不同的目录,分别是 Project(项目)以及 Chat(聊天)。

1. Chat 聊天
这是最好理解的,它相当于在本地桌面 App 里面和 ChatGPT 进行对话,和我们在网页端对话的效果一模一样。这适合处理一些非常琐碎、日常的任务交流。

2. Project 项目
如果你需要让 AI 收集资料、撰写文档,或者进行一些生成式任务和文件相关的操作(比如帮你制作 PPT、写 Word 文档、写报告书,去完成一个具体的任务),那么我们就可以使用 Project。

在里面创建一个新的项目后,所有与之相关的内容——无论是文档还是 PPT——都会保存在这个文件夹里,非常方便管理。我们可以创建一个空项目,也可以直接选择本地电脑里的文件夹作为项目。

![image-20260510134119967](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510134119967.png?imageSlim)

这样一来,我们在项目里下达指令后,codex的修改可以直接应用到我们本地的文件和文档上。
68 changes: 0 additions & 68 deletions docs/guide/03-prompting.md

This file was deleted.

44 changes: 44 additions & 0 deletions docs/guide/04-task-execution.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 任务的顺序执行和并行

本小节来介绍一下,在使用 codex 的过程中,如何进行任务顺序执行的管理以及任务的并行操作。

我们使用codex开发obsidian新手教程网站作为示例:来说明任务的顺序执行管理和并行操作

# 1.顺序执行

选择本地项目/创建新的项目,该项目实际上就对应我们本地的一个文件夹,它存储在我们的本地。

然后点击创建新的对话。

![image-20260510135415030](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510135415030.png?imageSlim)

我们向 CodeX 发送任务,让他帮我们设计一个网站,这个时候他就会开始执行。

![image-20260510135815048](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510135815048.png?imageSlim)

在这个任务没有执行的过程中,如果我们去给他下达新的命令,就只能等待。显示的是下面这种情况:

![image-20260510135902883](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510135902883.png?imageSlim)

这种相当于当前他正在执行一个任务,我们给他的另外两个命令就需要排队,必须等前面的任务执行完成之后才能执行。

但是如果我们想修改一下要求,比如想让他明确这个网站的背景风格为“手绘风格”,如果等他设计完成之后再去修改就会比较麻烦。我希望他在正在设计的时候就知道我的风格要求。

这时候,我们可以点击**引导**选项。这样操作后,他就会执行一个“插队”的操作:

1. 原本的任务顺序:
(a) 执行网站设计
(b) 介绍技术选型
(c) 执行手绘风格要求(原定第三个任务)

2. 插队后的效果:
我们想让“手绘风格”在设计过程中就发挥作用,通过点击引导提示,这个任务就会直接插队到当前正在执行的任务当中。

这实际上就是通过这样一个过程,演示如何对顺序执行的任务进行管理以及相关的插队操作。

# 2.如何并行

实际上就是一个项目(Project)里面,我们同时去执行多个任务。

这个时候,我们只需要在左侧边栏点击“新建对话”就可以了。这样的话,它的几个任务就会并行执行,互不干扰。

32 changes: 32 additions & 0 deletions docs/guide/05-permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 权限管理

这一节介绍 Codex 中常见的权限与审批模式。不同入口的界面文案可能会略有差异,但核心问题始终是一样的:Codex 能不能自动改文件、能不能自动执行命令、哪些操作需要你确认。

::: tip 最后核对
官方资料最后核对日期:2026-05-10。本文参考 [OpenAI Codex CLI – Getting Started](https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started) 与 [Using Codex with your ChatGPT plan](https://help.openai.com/en/articles/11369540-using-codex-with-your-chatgpt-plan)。具体名称、入口和可用选项请以你当前使用的客户端界面为准。
:::

![image-20260510140738323](https://zzy-1326340203.cos.ap-beijing.myqcloud.com//image-20260510140738323.png?imageSlim)

## 三种常见模式

1. `Suggest`
这是最保守的模式。Codex 可以读取文件并提出修改建议,但真正改文件或执行命令前,通常仍需要你确认。它适合初次了解陌生仓库、做代码审查、或者你希望全程掌控关键操作的时候使用。

2. `Auto Edit`
这个模式通常允许 Codex 自动写文件,但在执行 shell 命令时仍会保留人工确认。它适合你已经比较了解项目结构,想让 Codex 快速完成重构、批量改文档或局部实现,但又不想完全放开命令执行权限的场景。

3. `Full Auto`
这是自主性最高的模式。Codex 会在受限环境中自动读取、写入并执行命令,适合较长的连续任务,比如修复构建、跑一轮验证或完成一个边界明确的小功能。因为风险更高,最好只在版本可回退、任务范围清晰、并且你理解当前沙盒边界时使用。

## 怎么选更稳妥

- 第一次进入新项目,优先从 `Suggest` 开始。
- 需要批量修改文档、样式或测试时,可以考虑 `Auto Edit`。
- 只有在任务边界明确、仓库可回滚、并且你接受它连续执行命令时,再考虑 `Full Auto`。

## 使用时的提醒

- 不同客户端可能不会把权限模式写成完全一样的中文名,建议优先认官方英文模式名。
- 即使使用更自动化的模式,也要保留对高风险操作的复核,比如安装依赖、删除文件、访问网络、推送代码或处理敏感信息。
- 如果你不确定当前模式会不会执行某个动作,先让 Codex 说明它准备运行哪些命令、会改哪些文件,再决定是否继续。
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading