promptgarten ๐ŸŒฑ

Command reference ยท Codex CLI

codex review

Runs a review of changes via the CLI.

codex review runs a code review non-interactively from the command line, i.e. without opening a running TUI session. According to the docs, you choose exactly one review target: either --uncommitted (staged, unstaged, and untracked changes), --base <branch> (diff against a base branch), --commit <SHA> (changes from a specific commit), or your own review instructions as a free-text PROMPT (also readable from stdin with -) โ€” according to the docs, these options are mutually exclusive. --title sets the displayed commit title in the review summary, but only works together with --commit. There's also --strict-config, which triggers an error if config.toml contains unknown fields. Distinct from the standalone codex review call is the slash command /review, which according to the Codex source code is used within an already-running interactive session and also accepts instructions as an inline argument there.

โœ… WHEN TO USE IT?

Review uncommitted changes before committing

codex review --uncommitted

Review a specific commit with a title

codex review --commit a1b2c3d --title "Fix login bug"

โ›” WHEN NOT TO?

Specifying multiple review targets at once

According to the docs, --uncommitted, --base, --commit, and a custom PROMPT are mutually exclusive โ€” only one option is allowed.

Better: choose exactly one target option, e.g. only --base main

The review should be part of a running interactive session

codex review is a standalone, non-interactive CLI call outside a running TUI session.

Better: use /review instead within a running session

SOURCES

MORE COMMANDS ยท Codex CLI

codex resumecodex apply/init/compact/reasoning/fast/personality/memories/ide/feedback/approve/side

All commands ยท Codex CLI โ†’

Share:๐•in๐Ÿ’ฌ