What Codex CLI actually is
I kept seeing Codex CLI show up in my feed and finally gave it a real weekend. Here is the short version: it is a terminal-based coding agent from OpenAI that you can drive from your shell, in your repo, with a single command. If you have used Claude Code, it will feel familiar — but it is a separate product with its own personality.
The 5 commands I actually use
| Command | What it does |
|---|---|
codex |
Opens an interactive REPL in the current dir |
codex "fix the failing test in foo.ts" |
One-shot prompt, exits when done |
codex --approval-mode full-auto |
Lets it run shell commands itself |
codex --quiet |
Suppresses the chatty tool-call logs |
codex /review |
Loads a code-review sub-agent |
A small but useful trick
I aliased it in my shell config so I never have to remember flags:
alias cx='codex --quiet --approval-mode full-auto'
Now cx "refactor this to use the new SDK" is my default. It still asks before destructive ops, but skips the "y/n" loop for read-only steps.
Where it surprised me
- It reads your repo first. A 1-shot prompt behaves very differently depending on whether the project has a README, a CI config, or nothing.
-
It explains its plan before editing. You can interrupt with
Escand steer. - It is not magic on big refactors. Same lesson as every agent in 2026: small, well-scoped tasks win.
Try this on your own code
Pick a 50-line file you do not love. Run codex "rewrite this file in a more modern style, keep behavior identical" and just watch. 10 minutes, no commitment.
That is it. Have fun.
Top comments (0)