Introduction to Codex CLI
Codex CLI is a coding agent from OpenAI that runs locally on your computer. It brings ChatGPT-level reasoning with the power to execute code, manipulate files, and iterate — all under version control.What is Codex CLI?
Codex CLI is built for developers who live in the terminal and want ChatGPT-level reasoning with the ability to execute code, manipulate files, and iterate. It’s chat-driven development that understands and executes your repo.Get started
Install Codex CLI and get up and running in minutes
Authentication
Sign in with ChatGPT or configure API key authentication
Quickstart guide
Run your first commands and see Codex in action
Core concepts
Learn about approval modes, sandboxing, and more
Why use Codex CLI?
Codex CLI is designed for developers who already work in the terminal and want powerful AI assistance without leaving their workflow.Key features
Zero setup Bring your OpenAI API key or sign in with ChatGPT and it just works. No complex configuration required. Safe and secure Codex runs in a sandbox with network disabled and directory restrictions. Full auto-approval is safe because commands are isolated from your system. Full auto-approval Let Codex work autonomously while staying secure. In full auto mode, commands run network-disabled and directory-sandboxed. Multimodal Pass in screenshots or diagrams to implement features. Codex understands visual context. Open source Fully open source so you can see how it works and contribute to development.How it works
Codex CLI operates in three approval modes, giving you control over how much autonomy the agent has:- Suggest (default): Codex reads files and suggests changes. You approve all file writes and shell commands.
- Auto Edit: Codex reads and writes files automatically. You approve shell commands.
- Full Auto: Codex reads, writes files, and executes commands. All operations run in a sandbox with network disabled.
In full auto mode, every command runs network-disabled and confined to your working directory for defense-in-depth. Codex will warn you if you start in auto modes without Git tracking.
Example use cases
Next steps
Install Codex CLI
Follow the installation guide to get Codex running on your system.
Authenticate
Sign in with ChatGPT or configure your API key using the authentication guide.
Run your first command
Complete the quickstart to see Codex in action.