The docs read as OpenAI's Codex CLI: a getting-started page titled for it, `codex --enable skills` and `code sandbox macos` for commands that do not exist, defaults given as gpt-5.1-codex-max/openai when they are zen5-coder/hanzo, a Homebrew page describing a formula we do not publish. Removed three tui-stream-chunking notes and the execpolicy page: they document modules and a subcommand that live only in the vendored upstream copy. There is no execpolicy subcommand and no .codexpolicy loader in code-rs; the page told users to run something the binary does not have. Rewrote tui-alternate-screen against the source. It described an auto/always/never enum and a --no-alt-screen flag; the shipped behavior is a tui.alternate_screen bool with Ctrl+T, which replays the transcript into scrollback on the way out — a better answer to Zellij than the one written down. Genuine openai-provider documentation stays.
4.6 KiB
Getting started
CLI usage
| Command | Purpose | Example |
|---|---|---|
dev |
Interactive TUI | dev |
dev "..." |
Initial prompt for interactive TUI | dev "fix lint errors" |
dev exec "..." |
Non-interactive "automation mode" | dev exec "explain utils.ts" |
Key flags: --model/-m, --ask-for-approval/-a.
Running with a prompt as input
You can also run Dev with a prompt as input:
dev "explain this codebase to me"
dev --full-auto "create the fanciest todo-list app"
That's it - Dev will scaffold a file, run it inside a sandbox, install any missing dependencies, and show you the live result. Approve the changes and they'll be committed to your working directory.
Example prompts
Below are a few bite-size examples you can copy-paste. Replace the text in quotes with your own task.
| ✨ | What you type | What happens |
|---|---|---|
| 1 | dev "Refactor the Dashboard component to React Hooks" |
Dev rewrites the class component, runs npm test, and shows the diff. |
| 2 | dev "Generate SQL migrations for adding a users table" |
Infers your ORM, creates migration files, and runs them in a sandboxed DB. |
| 3 | dev "Write unit tests for utils/date.ts" |
Generates tests, executes them, and iterates until they pass. |
| 4 | dev "Bulk-rename *.jpeg -> *.jpg with git mv" |
Safely renames files and updates imports/usages. |
| 5 | dev "Explain what this regex does: ^(?=.*[A-Z]).{8,}$" |
Outputs a step-by-step human explanation. |
| 6 | dev "Carefully review this repo, and propose 3 high impact well-scoped PRs" |
Suggests impactful PRs in the current codebase. |
| 7 | dev "Look for vulnerabilities and create a security review report" |
Finds and explains security bugs. |
Memory with AGENTS.md
You can give Dev extra instructions and guidance using AGENTS.md files. Dev looks for AGENTS.md files in the following places, and merges them top-down:
~/.code/AGENTS.md- personal global guidance (a legacy~/.codex/AGENTS.mdis also read if present)AGENTS.mdat repo root - shared project notesAGENTS.mdin the current working directory - sub-folder/feature specifics
For more information on how to use AGENTS.md, see the official AGENTS.md documentation.
Tips & shortcuts
Use @ for file search
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):
dev -i screenshot.png "Explain this error"
dev --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 Dev 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.
Shell completions
Generate shell completion scripts via:
dev completion bash
dev completion zsh
dev completion fish
--cd/-C flag
Sometimes it is not convenient to cd to the directory you want Dev to use as the "working root" before running. Fortunately, dev supports a --cd option so you can specify whatever folder you want. You can confirm that Dev is honoring --cd by double-checking the workdir it reports in the TUI at the start of a new session.