docs: align sandbox defaults, dedupe sections and improve getting started guide (#5357)
Tightened the docs so the sandbox guide matches reality, noted the new tools.view_image toggle next to web search, and linked the README to the getting-started guide which now owns the familiar tips (backtrack, --cd, --add-dir, etc.).
This commit is contained in:
committed by
GitHub
parent
3ed728790b
commit
2d9ee9dbe9
@@ -1,5 +1,11 @@
|
||||
## Getting started
|
||||
|
||||
Looking for something specific? Jump ahead:
|
||||
|
||||
- [Tips & shortcuts](#tips--shortcuts) – hotkeys, resume flow, prompts
|
||||
- [Non-interactive runs](./exec.md) – automate with `codex exec`
|
||||
- Ready for deeper customization? Head to [`advanced.md`](./advanced.md)
|
||||
|
||||
### CLI usage
|
||||
|
||||
| Command | Purpose | Example |
|
||||
@@ -77,21 +83,26 @@ For more information on how to use AGENTS.md, see the [official AGENTS.md docume
|
||||
|
||||
Typing `@` triggers a fuzzy-filename search over the workspace root. Use up/down to select among the results and Tab or Enter to replace the `@` with the selected path. You can use Esc to cancel the search.
|
||||
|
||||
#### Image input
|
||||
|
||||
Paste images directly into the composer (Ctrl+V / Cmd+V) to attach them to your prompt. You can also attach files via the CLI using `-i/--image` (comma‑separated):
|
||||
|
||||
```bash
|
||||
codex -i screenshot.png "Explain this error"
|
||||
codex --image img1.png,img2.jpg "Summarize these diagrams"
|
||||
```
|
||||
|
||||
#### Esc–Esc to edit a previous message
|
||||
|
||||
When the chat composer is empty, press Esc to prime “backtrack” mode. Press Esc again to open a transcript preview highlighting the last user message; press Esc repeatedly to step to older user messages. Press Enter to confirm and Codex will fork the conversation from that point, trim the visible transcript accordingly, and pre‑fill the composer with the selected user message so you can edit and resubmit it.
|
||||
|
||||
In the transcript preview, the footer shows an `Esc edit prev` hint while editing is active.
|
||||
|
||||
#### `--cd`/`-C` flag
|
||||
|
||||
Sometimes it is not convenient to `cd` to the directory you want Codex to use as the "working root" before running Codex. Fortunately, `codex` supports a `--cd` option so you can specify whatever folder you want. You can confirm that Codex is honoring `--cd` by double-checking the **workdir** it reports in the TUI at the start of a new session.
|
||||
|
||||
#### `--add-dir` flag
|
||||
|
||||
Need to work across multiple projects in one run? Pass `--add-dir` one or more times to expose extra directories as writable roots for the current session while keeping the main working directory unchanged. For example:
|
||||
|
||||
```shell
|
||||
codex --cd apps/frontend --add-dir ../backend --add-dir ../shared
|
||||
```
|
||||
|
||||
Codex can then inspect and edit files in each listed directory without leaving the primary workspace.
|
||||
|
||||
#### Shell completions
|
||||
|
||||
Generate shell completion scripts via:
|
||||
@@ -102,6 +113,11 @@ codex completion zsh
|
||||
codex completion fish
|
||||
```
|
||||
|
||||
#### `--cd`/`-C` flag
|
||||
#### Image input
|
||||
|
||||
Sometimes it is not convenient to `cd` to the directory you want Codex to use as the "working root" before running Codex. Fortunately, `codex` supports a `--cd` option so you can specify whatever folder you want. You can confirm that Codex is honoring `--cd` by double-checking the **workdir** it reports in the TUI at the start of a new session.
|
||||
Paste images directly into the composer (Ctrl+V / Cmd+V) to attach them to your prompt. You can also attach files via the CLI using `-i/--image` (comma‑separated):
|
||||
|
||||
```bash
|
||||
codex -i screenshot.png "Explain this error"
|
||||
codex --image img1.png,img2.jpg "Summarize these diagrams"
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user