Overview

Prerequisites
Before configuring, make sure you have:1. Install Node.js and npm
Why needed? Node.js is the runtime environment for CLI tools (like installing WeChat on your phone to chat, you need to install Node.js on your computer to run CLI tools). If already installed: Runnode -v and npm -v to check version. If v20+, skip this step.
First-time installation:
- Download and install from Node.js official website (recommend LTS version)
- If you’re unfamiliar with the installation process, refer to Runoob - Node.js Installation Guide
- Recommended: Node.js v20 or higher
- Verify installation:

2. Get EvoLink API Key
- Log in to EvoLink Dashboard
- Find API Keys in the dashboard, click ‘Create New Key’ button, then copy the generated Key
- API Key usually starts with
sk-
How to Open Terminal
- Windows
- macOS
- Linux
- Method 1: Press
Win + R, typecmdorpowershell, then press Enter - Method 2: Search for “Command Prompt” or “PowerShell” in the Start menu
- Method 3: Hold Shift and right-click in a folder, select “Open PowerShell window here”
Step 1: Install Codex CLI
1. Global Installation
added XX packages (takes 1-3 minutes).
If error occurs: permission denied means Windows needs “Run as administrator” PowerShell, macOS/Linux add sudo before command.
2. Verify Installation
1.x.x).

Step 2: Configure EvoLink API
Codex CLI supports a custom Provider via config file, no source code modification needed.- Method 1: GUI Operation
- Method 2: One-Command Creation
1. Open Config Directory
- Windows
- macOS
- Linux
Press 
Win + R, paste the following, then press Enter to open the Codex config directory:

2. Edit config.toml
Find theconfig.toml file in the config directory and edit it with the following content:- Copy completely without missing any symbols
- Replace
"your-evolink-api-key"with actual API Key - TOML format is sensitive to indentation and symbols
model: default model namemodel_reasoning_effort: reasoning depth (adjust as needed)model_provider: provider name that matches the section belowbase_url: EvoLink API endpointenv_key: environment variable name for the API keywire_api: must beresponses
2. Configure API Key
- Windows PowerShell
- macOS / Linux
Temporary (current session only)PermanentRestart the terminal for changes to take effect.Verify Configuration
If it outputs your API Key, the configuration is successful.

Step 3: Start Using Codex CLI
1. Enter working directory
<your-working-directory> with actual path
2. Interactive mode

3. Verify configuration
- See AI response text (several lines)
- No errors like
401,403,API Key invalid
401 Unauthorized: API Key not set or invalid → Check environment variable403 Forbidden: Insufficient API Key permissions → Verify API KeyNetwork error: Network issue → Check connection
FAQ
1. What is Codex CLI and what is it used for?
Codex CLI is OpenAI’s official command-line tool focused on code-related tasks. It emphasizes engineering-ready output with clearer, actionable code changes.2. How do I verify installation and configuration on first use?
Run these commands in sequence:node -vandnpm -v: Confirm Node.js and npm are installedcodex --version: Confirm Codex CLI is installedcodex "Who are you": Confirm API configuration is correct
3. What’s the difference between interactive mode and single command mode?
- Interactive mode: Run
codexto enter continuous conversation for multi-turn interactions - Single command mode: Run
codex "question"to get a single response and exit
4. Will Codex CLI automatically read or upload my local files and code?
No. Codex CLI only reads file content when you explicitly reference or authorize it. It’s recommended to use it in a dedicated project folder.5. How do I use Codex CLI to analyze local file content?
In interactive mode, you can reference files by:- Typing the file path for Codex to read
- Dragging files into the terminal window
- Copy and pasting file content
6. Does Codex CLI support Chinese input and output?
Yes, fully supported.7. No output after execution—what could be the cause?
Common causes include:- Network connection issues
- Invalid API Key or insufficient balance
- Incorrect
base_urlconfiguration - Firewall or proxy blocking requests
8. Why don’t my config changes take effect?
- Restart your terminal
- Check
config.tomlsyntax (TOML format) - Verify config file path:
- Windows:
C:\Users\{username}\.codex\config.toml - macOS / Linux:
~/.codex/config.toml
- Windows:
9. What causes 401/403 errors?
- 401 error:
OPENAI_API_KEYnot set or invalid - 403 error: Insufficient permissions or expired key
- Check that
env_keymatches your environment variable name
10. What scenarios is Codex CLI suited for?
Suited for:- Code writing, debugging, and refactoring
- Quick Q&A in command-line environments
- File content analysis
- Complex GUI interactions
- Real-time collaborative editing
11. How do I switch models?
Open the configuration fileconfig.toml (located at ~/.codex/config.toml or C:\Users\{username}\.codex\config.toml), and modify the model field:
12. How do I upload images?
- Option 1: Reference the image path
- Option 2: Drag and drop an image into the terminal
- Option 3: Paste an image directly
