CLI
Install and automate the Codex coding agent from your terminal.
The Codex CLI is the primary local interface to the coding agent. It reads the current repository, edits files, runs commands, and reports its work interactively or through machine-readable output.
Install
Or use the official installer:
Run codex and sign in with ChatGPT, or configure API-key authentication in the OpenAI developer documentation.
Run in a repository
Codex uses the current directory by default. It is designed to work with a Git repository so changes can be reviewed and reverted normally.
MCP commands
Codex can consume external MCP servers configured in ~/.codex/config.toml:
For servers that support OAuth, use codex mcp login <server-name>. See MCP server configuration.
Automation and upgrades
For programmatic integration, use the TypeScript SDK. To upgrade the CLI:
Check the GitHub releases for release notes and standalone binaries.
Aktualisiert am 31. Aug. 2026