Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

Add documentation for slash commands in `docs/slash_commands.md`. (#5685)

pygarapb48467296103
diff --git a/README.md b/README.md
index abd611e7bb..5b2b65b0b2 100644
--- a/README.md
+++ b/README.md
@@ -75,6 +75,7 @@ Codex CLI supports a rich set of configuration options, with preferences stored
- [**Getting started**](./docs/getting-started.md)
- [CLI usage](./docs/getting-started.md#cli-usage)
+ - [Slash Commands](./docs/slash_commands.md)
- [Running with a prompt as input](./docs/getting-started.md#running-with-a-prompt-as-input)
- [Example prompts](./docs/getting-started.md#example-prompts)
- [Custom prompts](./docs/prompts.md)
diff --git a/docs/slash_commands.md b/docs/slash_commands.md
new file mode 100644
index 0000000000..4c1a244764
--- /dev/null
+++ b/docs/slash_commands.md
@@ -0,0 +1,31 @@
+## Slash Commands
+
+### What are slash commands?
+
+Slash commands are special commands you can type that start with `/`.
+
+---
+
+### Built-in slash commands
+
+Control Codex’s behavior during an interactive session with slash commands.
+
+| Command | Purpose |
+| ------------ | ----------------------------------------------------------- |
+| `/model` | choose what model and reasoning effort to use |
+| `/approvals` | choose what Codex can do without approval |
+| `/review` | review my current changes and find issues |
+| `/new` | start a new chat during a conversation |
+| `/init` | create an AGENTS.md file with instructions for Codex |
+| `/compact` | summarize conversation to prevent hitting the context limit |
+| `/undo` | ask Codex to undo a turn |
+| `/diff` | show git diff (including untracked files) |
+| `/mention` | mention a file |
+| `/status` | show current session configuration and token usage |
+| `/mcp` | list configured MCP tools |
+| `/logout` | log out of Codex |
+| `/quit` | exit Codex |
+| `/exit` | exit Codex |
+| `/feedback` | send logs to maintainers |
+
+---