How To Use Codex Cli
📖 Bu rehber ToolPazar ekibi tarafından hazırlanmıştır. Tüm araçlarımız ücretsiz ve reklamsızdır.
What it is
Codex CLI is OpenAI’s open-source terminal agent: a `codex` command that edits files, runs shell commands, and reasons about code inside a sandbox.
Install
Codex CLI gives you an agentic loop at the command line, backed by OpenAI’s coding-tuned models. You launch `codex` in any directory, describe a task, and it reads files, proposes edits, runs commands, and iterates until the task is done or it needs your input. Unlike a chat window, it keeps execution inside a sandbox and surfaces diffs for approval before touching disk, which makes it safer to hand real work.
First session
Run `codex` in a project directory. Pick an approval mode (suggest, auto-edit, or full-auto) and describe a task.
Everyday workflows
Full-auto mode is tempting but will happily rewrite large swaths of code if the task is vague. Use suggest mode for anything near production, and keep dirty working trees out — Codex occasionally stages changes it then undoes. Commit or stash before starting.
Gotchas and tips
The sandbox blocks network by default on some platforms; if your task needs npm install or a curl, enable network access explicitly for that session. A codex.md or AGENTS.md file at the repo root lets you pin conventions that apply every run.
Who it’s for
Developers already in the OpenAI ecosystem who want a terminal-native alternative to ChatGPT’s code interpreter, with real access to their local filesystem. Start with a test-fix task — narrow, verifiable, and a great sanity check of the tool’s behavior.