What is Codex CLI?
Codex CLI is a lightweight coding agent from OpenAI that reads, edits and runs code in your terminal, with sandboxing and approval modes. The client is open source and written in Rust.
Note: The client is open source, but it is designed for OpenAI's models and account sign-in.
Key features
- Sandboxed command execution
- Approval modes
- MCP support
- Written in Rust
Codex CLI as an open source alternative
Codex CLI is listed on 2 of our comparison pages as an open source replacement for Cursor and Claude Code. Compare it with the other options:
- Open source alternatives to Cursor (5 options)
- Open source alternatives to Claude Code (5 options)
Licence
Codex CLI is released under the Apache-2.0 licence, a permissive licence. More Apache-2.0 software →
Codex CLI: FAQ
Is Codex CLI open source?
Yes. Codex CLI is released under the Apache-2.0 licence (permissive), and its source code is public. The client is open source, but it is designed for OpenAI's models and account sign-in.
Is Codex CLI free?
The software is free to use.
What does Codex CLI replace?
Codex CLI is an open source alternative to Claude Code and Cursor.
Can I self-host Codex CLI?
Codex CLI runs on your own machine or in your own development environment.