OpenAI Codex 的应用命令页,适合需要快速操作 app、切换线程、打开设置或排查 slash command 不显示的用户。这里汇总了 macOS 快捷键、/goal/review/status 等命令,以及 codex:// 深度链接和本地线程、插件、宠物页面的参数规则。

OpenAI Codex 应用命令与快捷键

键盘快捷键

Action macOS shortcut
General
Command menu Cmd + Shift + P or Cmd + K
Settings Cmd + ,
Open folder Cmd + O
Navigate back Cmd + [
Navigate forward Cmd + ]
Increase font size Cmd + + or Cmd + =
Decrease font size Cmd + - or Cmd + _
Toggle sidebar Cmd + B
Toggle diff panel Cmd + Option + B
Toggle terminal Cmd + J
Clear the terminal Ctrl + L
Thread
New thread Cmd + N or Cmd + Shift + O
Find in thread Cmd + F
Previous thread Cmd + Shift + [
Next thread Cmd + Shift + ]
Dictation Ctrl + M

Slash commands

Slash commands 让你不用离开 thread composer 就能控制 Codex。可用命令会根据你的环境和访问权限变化。

怎么使用 slash command

  1. 在 thread composer 中输入 /
  2. 从列表里选择命令,或者继续输入进行过滤,例如 /status

你也可以在 thread composer 中输入 $ 来显式调用 skills。参见 Skills

已启用的 skills 也会出现在 slash command 列表里。

可用的 slash commands

Slash command Description
/feedback Open the feedback dialog to submit feedback and optionally include logs.
/goal Set a persistent goal for Codex to work toward; use /plan first to shape it.
/mcp Open MCP status to view connected servers.
/plan Toggle plan mode for multi-step planning.
/review Start code review mode to review uncommitted changes or compare against a base branch.
/status Show the thread ID, context usage, and rate limits.

怎么设置或管理 /goal

在 app composer 中使用 /goal 可以进入 Goal mode。goal 是一个持续性的目标,Codex 会一直朝这个目标执行,直到任务完成、暂停,或者需要你补充输入。
如果想先让 Codex 帮你定义目标,先用 /plan,再用 /goal 把整理后的目标设进去。

如果 /goal 没有出现在 slash command 列表里,需要在 config.toml 中启用 features.goals

[features]
goals = true

你也可以在 CLI 里运行 codex features enable goals,或者直接让 Codex 帮你执行这条命令。

当 goal 处于 active 状态时,app 会在 composer 上方显示进度条。你可以用这排按钮暂停或继续 goal、编辑 goal 文本,或者清除 goal,而不必再输入其他 slash command。goal 执行期间,你仍然可以用后续消息继续引导 Codex。

关于如何写出更有效的 goal,参见 Goal mode

Codex app 注册了 codex:// URL scheme,方便用链接直接打开应用内的指定位置。

常用链接

只需要打开常见页面时,用下面这些链接即可。各链接类型的完整参考在后面的分节中。

Deep link Opens
codex://threads/new A new local thread.
codex://threads/<thread-id> A local thread. <thread-id> must be the thread’s session UUID.
codex://settings Settings.
codex://skills Skills.
codex://automations Automations with the create flow open.

Threads

需要打开已有本地 thread,或者新建 thread 时,用这些链接。

Deep link Opens
codex://threads/<thread-id> A local thread. <thread-id> must be the thread’s session UUID.
codex://threads/new A new local thread.

codex://threads/new,可以按需追加下面这些 query parameters,并且可以在同一个 URL 中组合使用。

Query parameter Required What it does
prompt=<text> No Sets the initial composer text.
path=<absolute-path> No Opens the new thread in a local workspace. path must be an absolute path to a local directory. When valid, Codex uses that directory as the active workspace.
originUrl=<git-remote-url> No Matches one of your current workspace roots by Git remote URL. If path is also present, Codex resolves path first.

示例: Show me some fun stats about how I’ve been using Codex

Settings

需要打开 Settings 或某个具体设置页时,用这些链接。

Deep link Opens
codex://settings Settings.
codex://settings/browser-use Browser use settings.
codex://settings/computer-use/google-chrome Google Chrome settings for computer use.
codex://settings/connections Remote connections settings.

Skills

需要打开 Skills 时,用这个链接。

Deep link Opens
codex://skills Skills.

Automations

需要打开 Automations 时,用这个链接。

Deep link Opens
codex://automations Automations with the create flow open.

Plugins

插件链接会因为打开插件详情、从 marketplace 安装,还是使用本地 marketplace.json 而采用不同形式。插件基础说明见 Plugins。本地或 repo marketplace 配置见 Build plugins

插件详情页

Deep link Opens
codex://plugins/<plugin-id> A plugin detail page.

<plugin-id> 必须能唯一标识插件。对于 OpenAI curated plugin,请使用 <plugin-name>@openai-curated 这种形式。

Codex 生成的插件链接还可以带下面这些 query parameters。手写链接时可以都省略。

Query parameter Required What it does
hostId=<host-id> No Identifies the Codex host that owns the plugin context, such as local or one of your configured remote connections. Codex provides these IDs.
source=manage No Preserves the app’s plugin-management entry point. It is not admin-only.

示例: Open the OpenAI Developers plugin

本地插件

本地或 repo marketplace 配置,见 Build plugins

Deep link Opens
codex://plugins/<plugin-name>?marketplacePath=<absolute-marketplace-path> A local plugin detail page from a local marketplace.
Query parameter Required What it does
marketplacePath=<absolute-marketplace-path> Yes Absolute path to the local marketplace.json, for example /Users/alex/.agents/plugins/marketplace.json.
mode=share No Opens the share flow for that local plugin.

Pets

当该功能已启用时,用这些链接打开 pet install flow。

Deep link Opens
codex://pets/install?name=<pet-name>&imageUrl=<https-image-url> The pet install flow.
Query parameter Required What it does
name=<pet-name> Yes Sets the pet name.
imageUrl=<https-image-url> Yes Sets the pet image URL. imageUrl must be HTTPS.
description=<text> No Sets the optional pet description.

另请参见

常见问题

OpenAI Codex 怎么用快捷键打开命令菜单

在 macOS 上,按 Cmd + Shift + PCmd + K。如果你想改看设置、终端、侧边栏或 diff panel,也可以直接用对应快捷键切换。

/goal 不显示怎么解决

先检查 config.toml 里是否启用了 features.goals = true。也可以运行 codex features enable goals,然后重新打开 slash command 列表确认 /goal 是否出现。

codex://threads/new 可以带哪些参数

codex://threads/new 支持 prompt=<text>path=<absolute-path>originUrl=<git-remote-url>。如果同时传了 pathoriginUrl,Codex 会先解析 pathpath 必须是本地目录的绝对路径。