How to Install and Use OpenAI Codex
From a developer’s perspective, the important point is that Codex is not so much an “installable program” as a tool you connect to and use in several ways.
In other words, it is not a structure that must always be installed locally. It can be used through many interfaces such as ChatGPT, CLI, IDE, and the web.
Installing Codex
Using It in ChatGPT (Easiest Method)
In fact, most people start without a separate installation.
Method
- Log in to ChatGPT
- Enable the Codex feature (plan required)
- Start using it immediately
Codex is provided as part of ChatGPT plans.
Features
- No installation
- Immediate use
- Simplest method
Installing the CLI on Mac (Recommended for Developers)
If you want to use Codex from a terminal-based Mac environment, this is the key method.
Prerequisites
First, check the basic environment.
The following are required:
- macOS (Ventura or later recommended)
- Node.js (18 or later)
- npm or pnpm
Installing Node (if not already installed)
brew install node
Check installation:
node -v
npm -v
Installing Codex CLI
This is the officially provided CLI installation method.
npm install -g @openai/codex
Check installation:
codex --version
Login (Most Important)
codex
On first execution, the console screen appears as follows.
Welcome to Codex, OpenAI's command-line coding agent
Sign in with ChatGPT to use Codex as part of your paid plan
or connect an API key for usage-based billing
> 1. Sign in with ChatGPT
Usage included with Plus, Pro, Business, and Enterprise plans
2. Sign in with Device Code
Sign in from another device with a one-time code
3. Provide your own API key
Pay for what you use
Press Enter to continue
Select option 1 to log in with your ChatGPT account, and the browser will open.

After logging in, the CLI and your account are connected.
Next, check the content shown in the console and press the required buttons a few times. Then you are finally ready to use it.
╭───────────────────────────────────────────────╮
│ >_ OpenAI Codex (v0.125.0) │
│ │
│ model: gpt-5.5 /model to change │
│ directory: ~/develop/devkuma/devkuma-hugo-www │
╰───────────────────────────────────────────────╯
Tip: GPT-5.5 is now available in Codex. It's our strongest agentic coding model yet, built to reason through large codebases, check
assumptions with tools, and keep going until the work is done.
Learn more: https://openai.com/index/introducing-gpt-5-5/
› Use /skills to list available skills
Usage Flow
To summarize, the usage flow is as follows.
- Run
codexin the CLI - Proceed with login using your ChatGPT account
- Run it from the project folder
- Give tasks in natural language
After this process, the CLI and account are connected.
Example:
"Add Redis caching to this project"
IDE Extension (VS Code, etc.)
How to Use
- Open VS Code
- Install the Codex extension
- Log in
Advantages
- Make changes while viewing code
- Automatic refactoring
- Code review support
Web/App-Based Use
Codex also supports the following methods:
- Codex web
- Dedicated Codex app
- GitHub integration
GitHub connection is especially required on the web.
Using Codex
API/SDK Method (Advanced)
If you want to use it directly from the backend:
- Use an OpenAI API key
- Call a Codex model
- Build an automation system
Recommended Installation and Use by Developer Level
Realistically, it can be divided as follows:
- Beginner
- ChatGPT -> use immediately
- Practical work
- Use CLI and IDE together
- Advanced
- API + automation (CI/CD integration)
Summary
Important Point (Often Confused)
“Installing Codex = downloading a program” is not accurate. More precisely, it means “installing an interface that lets you use Codex.”
Developer Tips
This combination is efficient:
- CLI: Large tasks such as refactoring and feature additions
- ChatGPT: Ideas and design
- IDE: Detailed edits
The key is to use them together.
One-Line Summary
Codex is not a tool you install; it is an AI development agent you connect to and use