Skip to content

Commit b484672

Browse files
authored
Add documentation for slash commands in docs/slash_commands.md. (#5685)
This pull request adds a new documentation section to explain the available slash commands in Codex. The update introduces a clear overview and a reference table for built-in commands, making it easier for users to understand and utilize these features. Documentation updates: * Added a new section to `docs/slash_commands.md` describing what slash commands are and listing all built-in commands with their purposes in a formatted table.
1 parent a1ee10b commit b484672

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Codex CLI supports a rich set of configuration options, with preferences stored
7575

7676
- [**Getting started**](./docs/getting-started.md)
7777
- [CLI usage](./docs/getting-started.md#cli-usage)
78+
- [Slash Commands](./docs/slash_commands.md)
7879
- [Running with a prompt as input](./docs/getting-started.md#running-with-a-prompt-as-input)
7980
- [Example prompts](./docs/getting-started.md#example-prompts)
8081
- [Custom prompts](./docs/prompts.md)

docs/slash_commands.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
## Slash Commands
2+
3+
### What are slash commands?
4+
5+
Slash commands are special commands you can type that start with `/`.
6+
7+
---
8+
9+
### Built-in slash commands
10+
11+
Control Codex’s behavior during an interactive session with slash commands.
12+
13+
| Command | Purpose |
14+
| ------------ | ----------------------------------------------------------- |
15+
| `/model` | choose what model and reasoning effort to use |
16+
| `/approvals` | choose what Codex can do without approval |
17+
| `/review` | review my current changes and find issues |
18+
| `/new` | start a new chat during a conversation |
19+
| `/init` | create an AGENTS.md file with instructions for Codex |
20+
| `/compact` | summarize conversation to prevent hitting the context limit |
21+
| `/undo` | ask Codex to undo a turn |
22+
| `/diff` | show git diff (including untracked files) |
23+
| `/mention` | mention a file |
24+
| `/status` | show current session configuration and token usage |
25+
| `/mcp` | list configured MCP tools |
26+
| `/logout` | log out of Codex |
27+
| `/quit` | exit Codex |
28+
| `/exit` | exit Codex |
29+
| `/feedback` | send logs to maintainers |
30+
31+
---

0 commit comments

Comments
 (0)