Recently, OpenAI announced that it will restructure its Codex CLI tool, completely abandoning TypeScript and switching to the Rust language. This decision aims to provide developers with a more efficient and stable AI terminal interaction experience. Codex CLI was initially designed to simplify developers' interactions with AI in the terminal, using TypeScript and the React-based Ink framework. However, as Codex CLI continued to evolve, the team found that TypeScript struggled to handle increasingly complex use cases.
Image source note: The image is AI-generated, and the image licensing service is Midjourney
OpenAI's technical team member Fouad Matin stated on a GitHub discussion: "We are rewriting Codex CLI in Rust." Although the TypeScript version performed well in rapid prototyping, its limitations became apparent as demands increased. To improve performance and maintainability, OpenAI has decided to completely replace the TypeScript version and focus on developing the Rust version in the future.
Regarding the core advantages of the Rust language, Matin pointed out several key improvements. First, Rust can offer a better installation experience; the current TypeScript version requires Node v22 or higher, which is a barrier for some users. Second, Rust provides better native bindings for security. Additionally, Rust offers better runtime performance, avoiding runtime garbage collection and reducing memory consumption.
OpenAI also plans to develop a "communication protocol" within Codex CLI, allowing developers to extend the tool using multiple languages such as TypeScript/JavaScript and Python. This means Codex CLI will not only be a tool but also an extensible, multi-language plugin-friendly runtime, supporting model-based automation.
Although the Rust version is still under development, developer feedback has been very positive. One user said, "The native Codex runs very smoothly," although there are still some differences between the TypeScript and Rust versions, such as support for configuration files and login features. OpenAI is addressing these issues systematically, ensuring that the Rust version will soon match the TypeScript version in functionality.
Overall, this shift by OpenAI is not just an update to the codebase, but a realignment of the future direction of Codex CLI. From a simple terminal tool, it is transforming into a programmable intelligent agent. The Rust-restructured Codex CLI will be more flexible, portable, and maintainable in the long run, providing developers with more robust support in practical applications.
Key points:
🌟 OpenAI announced the restructuring of Codex CLI, abandoning TypeScript and moving to Rust to improve performance.
🔧 Rust provides better installation experience and security for Codex CLI, while also reducing memory consumption.
🚀 The restructured Codex CLI will become a multi-language plugin-friendly tool, supporting more complex development needs.