Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Codex IDE Extension

Codex IDE Extension

The Codex IDE extension lets you use Codex directly in your familiar development environment, seamlessly integrating into your daily coding workflow.


Supported IDEs

Codex officially supports the following IDEs:

IDE Extension ID Installation method
VS Code openai.chatgpt vscode:extension/openai.chatgpt
VS Code Insiders openai.chatgpt Extension Marketplace
Cursor openai.chatgpt cursor:extension/openai.chatgpt
Windsurf openai.chatgpt windsurf:extension/openai.chatgpt

Install Extension

VS Code Installation

VS Code Installation

Method 1: Command-line Installation

code

--install-extension

openai.chatgpt

Method 2: In VS Code

1. Open the Extensions panel (Cmd+Shift+X)

2. Search for "Codex" or "ChatGPT"

3. Click Install

Cursor Installation

Cursor Installation

Method 1: Command Line

cursor

--install-extension

openai.chatgpt

Method 2: In Cursor

1. Open the Extensions panel

2. Search for "Codex"

3. Click Install

After installation, you need to sign in with a ChatGPT account or OpenAI API Key to use it.


Core Features

Automatic Context

The IDE extension automatically passes the following as context to Codex:

AI conversations

Talk to Codex directly in the IDE:

Code Actions

Right-click on selected code to:

Operation Function
Explanation Explain what the selected code does
rewritten Rewrite the selected code as requested
Review Check for code issues and improvement suggestions
Generate Tests Generate unit tests for the selected code

Slash commands

Use slash commands in the Codex panel:

Command Function
/explain Explain the selected code
/fix Fix issues in the selected code
/test Generate tests for the selected code
/review Review the selected code
/plan Plan before executing

Slash Command Examples

Explain code

/

explain

Fix Bug

/

fix this

function

throws error

for

null input

Plan a new feature

/

plan implement user authentication with JWT


Model selection

Switch models below the input box:

Model Feature
GPT-5.4 Flagship model, for complex tasks
GPT-5.4-mini Lightweight and fast, for simple tasks
GPT-5.3-Codex Professional coding model

Keyboard shortcut

Keyboard shortcut Function
Cmd+Shift+C Open the Codex panel
Cmd+Shift+Enter Code completion
Cmd+Shift+R Rewrite selected code
Cmd+Shift+E Explain the selected code

Shortcuts can be customized in IDE settings to avoid conflicts with other extensions.


Cloud Task Delegation

Start cloud tasks from the IDE extension:

Applicable scenarios


IDE Configuration

Set how files open

Configure file opening

~/.codex/config.toml

Specify the editor for opening files

file_opener = "vscode"

Optional values: vscode, vscode-insiders, windsurf, cursor, none

Set the default model

Configure the default model

~/.codex/config.toml

model = "gpt-5.4"


Usage tips

Select Code as Context

Once code is selected, Codex automatically uses it as context.

The more code you select, the more accurate Codex's replies are.

Multi-file Operations

When multiple files are open, Codex can handle them simultaneously.

Just describe the files to modify in the panel.

Use the Built-in Terminal

The IDE's built-in terminal can run the Codex CLI directly.

This gives you access to the full functionality of the CLI.


Common questions

Q: Extension cannot connect?

Make sure you're signed in to your Codex account, and check network and proxy settings.

Q: Shortcuts conflict with other extensions?

Search for "Codex" in IDE settings to customize shortcuts.

Q: How to update the extension?

The extension updates automatically with Codex, or manually via the IDE Extensions panel.

Q: Difference between the IDE extension and the App?

The IDE extension integrates deeply with the development environment and automatically reads file context; the App offers full features and multi-project management.