DEV Community

Cover image for Codex CLI in 10 minutes: a hands-on tour for the curious dev
hao yang
hao yang

Posted on

Codex CLI in 10 minutes: a hands-on tour for the curious dev

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'
Enter fullscreen mode Exit fullscreen mode

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

  1. 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.
  2. It explains its plan before editing. You can interrupt with Esc and steer.
  3. 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)