OpenAI is currently one of the most well-known names in artificial intelligence and is known for pushing the limits of what AI can accomplish. Over the years, the company has created a series of innovative solutions to make AI more useful and accessible to both individuals and businesses. The most widely used AI tool globally is their very own ChatGPT, an AI-powered virtual assistant capable of achieving different tasks such as answering queries, content creation, learning about new subjects, and even programming. With millions of users globally, ChatGPT has shown just how powerful AI can be in everyday life. Now, in a move that could once again shift the landscape of AI development, OpenAI introduced a new tool called Codex CLI, an AI-powered command-line assistant aimed at reimagining how developers interact with code.
All about Codex CLI
Codex CLI was introduced in April 2025 as a new tool for developers to interact with AI in their terminals. It is an open-source command-line tool designed to assist developers with coding tasks directly from their terminals. Instead of switching between a code editor and other tools, developers can input what they need directly into the terminal. Codex CLI will then write code, edit files, or explain parts of the code based on the instructions provided by the user. It also runs locally on the user’s computer, keeping files private, and works through the user’s OpenAI API key, which means developers can use the tool confidently without worrying about exposing their code or sensitive data online.
Features of Codex CLI
Codex CLI offers a variety of features that are designed to simplify and expedite the development process. With its user-friendly natural language interface, developers can interact with the tool in a way that feels like having a coding buddy right there in their terminal, ready to help with whatever they need.
- Approval Modes: With three approval levels tailored to your preferences for safety and automation, Codex CLI provides you with command over how modifications and instructions are handled. It expedites your process and helps avoid accidental edits.
-
Suggest Mode: Notifies you before making any code changes or executing commands.
-
Auto Edit Mode: This mode applies code changes automatically but still notifies the user before running terminal commands.
-
Full Auto Mode: Implements command and code modifications automatically in a sandboxed, network‑disabled environment
-
-
Local Execution: All actions are executed directly on your local machine, ensuring your code remains private. No data is sent to OpenAI servers unless you explicitly allow it.
-
Natural Language Interaction: You can use plain English to describe what you want Codex to do, whether writing, editing, or explaining code. This method makes it easier to communicate with your codebase.
-
Easy Installation: The CLI can be installed via the
npm
command and connected to your OpenAI account using your API key. Setup is quick and doesn’t require complex configuration. -
Multi-format Input Support: Codex CLI can interpret a variety of input formats, including plain text, screenshots, and diagrams. This makes it easier to express coding requirements in both visual and written forms.
Aside from the features mentioned above, Codex CLI offers other advanced features that make it an ideal option for developers seeking to improve productivity and workflow.
How to use Codex CLI?
As previously stated, Codex CLI provides a smooth installation process that enables developers to start the process promptly. These features highlight how Codex CLI is designed to make development easier. With the straightforward installation and flexible approval modes, using Codex CLI becomes simple but still effective. Here are a few easy steps to get you started using Codex CLI.
-
Install the CLI:
-
To begin, run the command
npm install -g @openai/codex
to install Codex globally on your system.
-
-
Authenticate:
-
Next, export your OpenAI API key by using the command
export OPENAI_API_KEY="<OAI_KEY>"
in your terminal to authenticate your session.
-
-
Run in Suggest mode:
-
From the root directory of your project, type
codex
and ask Codex to perform a task, such as explaining the codebase to help understand its structure and functionality:
👉codex "explain this codebase to me"
-
-
Switch Modes:
-
You can customize Codex’s behavior with different flags. For example, use
--auto-edit
to apply changes automatically or--full-auto
for full automation without manual approval.
-
-
Review and Apply:
-
Codex will show the recommendations in the terminal as soon as they have been generated. After that, you can examine the modifications and determine if they need to be approved, modified, or rejected.
-
By default, Codex CLI uses the o4-mini model for fast and efficient processing, but you can choose from other available models in the Responses API, such as codex -m o3
. Also, Codex officially supports macOS and Linux, with Windows support being experimental and may require Windows Subsystem for Linux (WSL).
Conclusion
Do you see how straightforward it is to use Codex CLI? Even though it may not yet be as polished and feature-rich as more established CLI-based assistants like Claude Code, its underlying foundation is robust and shows a lot of promise. Its ability to understand natural language commands, make local modifications safely, and even process visual inputs such as screenshots or diagrams all foreshadow a new era of development tools. Codex CLI may not be the ideal tool for now, but with continued advancements in the right direction, I believe it can transform the AI landscape and emerge as a top assistant tool for developers globally.
REFERENCES:
https://help.openai.com/en/articles/11096431-openai-codex-cli-getting-started
https://www.blott.studio/blog/post/openai-codex-cli-build-faster-code-right-from-your-terminal