OpenAI Introduces Open-Source Codex CLI Tool for Converting Natural Language into Code

OpenAI Introduces Open-Source Codex CLI Tool for Converting Natural Language into Code
Source: Unsplash - Pablo Merchán Montes

On 16 April 2025, OpenAI officially launched Codex CLI, an open-source coding tool that runs in the terminal and transforms natural language instructions into executable code. The new tool integrates OpenAI's advanced language models, including o3 and o4-mini, with local coding and computing tasks, enabling developers to perform functions such as building features, debugging, or understanding complex codebases through intuitive, conversation-based interactions.

Codex CLI offers various approval modes via the approval-mode flag, ranging from suggestion-only to full automation, allowing users to control the extent of automated operations. Codex CLI also supports multimodal inputs, enabling users to incorporate screenshots or sketches alongside textual prompts, enhancing its versatility in handling diverse development tasks. Running locally ensures that code execution and file manipulations occur within the user's system, maintaining data privacy and reducing latency. Sarah Friar, OpenAI's CFO, described Codex CLI as a first step towards a broader "agentic software engineer" vision that could eventually build and test applications from descriptions. It's worth noting the technology's limitations, as code-generating models frequently fail to fix security vulnerabilities and bugs, and may even introduce them.

OpenAI has also launched a $1 million initiative to support open-source projects that utilise Codex CLI, offering $25,000 blocks of API credits to selected projects. Codex CLI is available from 16 April 2025 and can be installed using the command npm install -g @openai/codex. The tool runs in developer terminal interfaces and offers various approval modes, from suggestion-only to full automation, which provides network-disabled execution and directory-sandboxed access for security.

Sources:

1.

OpenAI Releases Codex CLI: An Open-Source Local Coding Agent that Turns Natural Language into Working Code
OpenAI Releases Codex CLI: An Open-Source Local Coding Agent that Turns Natural Language into Working Code

2.

GitHub - openai/codex: Lightweight coding agent that runs in your terminal
Lightweight coding agent that runs in your terminal - openai/codex

3.

OpenAI debuts Codex CLI, an open source coding tool for terminals | TechCrunch
OpenAI is launching an open source tool called Codex CLI, which brings the company’s AI models to local terminal software.