Codex CLI
Inspect, edit, and run code from your terminal
Inspect code, make changes, run commands, and automate repeatable work without leaving your terminal.
╭──────────────────────────────────────────────────╮ │ >_ OpenAI Codex │ │ │ │ model: gpt-5.6-sol medium/model to change │ │ directory: ~/code │ ╰──────────────────────────────────────────────────╯ To get started, describe a task or try one of these commands: /init - create an AGENTS.md file with instructions for Codex /status - show current session configuration /permissions - choose what Codex is allowed to do /model - choose what model and reasoning effort to use /review - review any changes and find issues
› Refactor the Dashboard component to React Hooks
100% context left · ? for shortcuts
Work against your local repository
Let Codex inspect files, make edits, and run the tools already installed on your machine.
Stay in control
Choose the model, reasoning effort, permissions, and commands that fit the task.
Compose with scripts and CI
Use Codex interactively or call codex exec from repeatable workflows and pipelines.
Quickstart
Get started with Codex CLI
Install Codex, sign in, and run your first task from a project directory.
-
Install Codex
Install the Codex CLI with the standalone installer for macOS and Linux.
Install Codex
curl -fsSL https://chatgpt.com/codex/install.sh | shUpdate Codex
curl -fsSL https://chatgpt.com/codex/install.sh | sh -
Run Codex and sign in
Open a project directory and run
Review authentication optionscodex. The first time you run Codex, choose Sign in with ChatGPT or another available sign-in method. -
Start your first task
Describe what you want to accomplish. For example, ask Codex to explain the project, make a focused change, or help debug an issue.
Tell me about this projectCreate Git checkpoints before and after a task so you can revert changes. See the best practices.
See what Codex CLI can do
Use one focused terminal loop for interactive work, automation, review, and delegation.
Keep the coding loop in your terminal
Start Codex in a repository to explore unfamiliar code, plan a change, edit files, and run your local development tools. Steer the active turn, inspect commands and diffs as they appear, and keep follow-up work in the same session.
Learn moreUse skills and plugins
Package repeatable instructions as skills, then add plugins to connect Codex to your team's tools and data without leaving the CLI.
Learn moreReview changes before they ship
Run a dedicated review against uncommitted changes, a commit, or a base branch. Codex reports prioritized findings without modifying your working tree, so you can address risks before you commit or open a pull request.
Learn more