Skip to main content
CodeX

Preparation

CodeX billing method is synchronized with official. For price ratio, please refer to Models & Pricing. For API addresses and backup URLs, see API Call Examples

Process

1

Step 1 - Install Node.js

step-1

Verify Node.js Installation

Open terminal and enter node --version and npm --version to verify Node.js installation If you see a version number like v22.16.0, proceed to the next step. Otherwise, please download from the official website https://nodejs.org/en/download/
2

Step 2 - Install CodeX

step-2

Install CodeX

Open terminal and enter npm i -g @openai/codex to install CodeX globally After successful installation, use the codex command in the target folder path (such as the folder where you will create/modify code) As shown in the image, installation is successful (this is just to check if installation is successful, no interaction is needed, just use Ctrl+C to exit after successful startup)
3

Step 3 - Create Configuration File

Edit Configuration File

Navigate to ~/.codex path, create or edit the config.toml file with the following configuration:
config.toml
Then create a .env file in the ~/.codex path with the following content:
model_context_window and model_auto_compact_token_limit are only supported with 1M context by gpt-5.4. If using other models (e.g. o3-pro), comment out these two lines or you may get errors.
4

Step 4 Start Using

step-4

Start Using

Use the cd command to enter the project folder you want to edit, enter codex, and then you can start using CodeX