Codex CLI: first win is a git diff
Do not treat Codex CLI as a chat box. First success is one file you can git diff.
You treat codex like ChatGPT in the terminal, close the pane, and the repo has nothing to review. First success is not a chat; it is one file you can git diff. When a diagram needs a shared page, start a room.
Stop when the official installer is on PATH, you ran codex inside a repository, signed in with ChatGPT, and git diff shows a one-file change. Search query: OpenAI Codex CLI first file edit. Docs: developers.openai.com/codex/cli.
Install from the docs
On the Codex CLI page, the standalone installer for macOS and Linux is the command below. The same page also lists npm and Homebrew; pick one environment.
curl -fsSL https://chatgpt.com/codex/install.sh | sh
# new terminal
codex --version- 1Install the CLI
Run the official
install.sh(updates use the same command). Windows: follow the Windows tab on that page; do not paste the Linux curl line. - 2Start inside a repository
cdinto a project with.git, then runcodex. Launching it in an empty home directory gives it no working tree to edit. - 3Sign in
The first run asks you to Sign in with ChatGPT or another available method. Do not send an edit task before that finishes.
The first task must leave a diff
The docs sample “Tell me about this project” only chats. Ask for a single-file change instead: one sentence in README.md, or one comment on an existing function.
# at the repo root
codex
# in the session, something like:
# Add one sentence to README.md describing how to run tests. Do not touch other files.The session shows commands and file diffs. Approve writes after you read them. The docs recommend git checkpoints before and after a task so you can revert.
Leave the chat box
Chat-only habit
Ask for architecture, ask it to explain a file, then quit. git status stays clean. That is not a working install.
A reviewable first run
One file changed, git diff readable. Then commit, discard, or run /review. For opening a PR, see GitHub CLI first PR.
Success is not “the terminal printed an answer.” Success is the file you asked for appearing in
git diff.
Next: uv run for scripts · guide · start a room
Must I sign in with ChatGPT?
The docs say the first run lets you Sign in with ChatGPT or another available method. Use whatever the installer actually lists on your machine.
Does /review write files?
No. Docs: it reviews uncommitted changes, a commit, or a base branch and reports findings without modifying the working tree.
Can I use this in CI?
Yes. The same page covers interactive sessions and codex exec for non-interactive, repeatable workflows. Still prove a local git diff first.
Does hereink ship Codex?
No. hereink is a temporary browser whiteboard. Open a room when a diagram needs a shared page; this site is not the Codex vendor.