AI Study Online
AI Tutorials

Codex Complete Guide for Domestic Users: Full Installation + Official Plugins Setup (Step-by-Step)

5 min read
📅 2026-06-20 📂 AI Tutorials ⏱️ 8 min read 🔰 Beginner

For developers in China, accessing and using Codex effectively — with all official plugins — has long been a challenge due to network restrictions and configuration hurdles. This beginner-friendly, "spoon-feeding" guide breaks down the entire process from installation to plugin activation, ensuring even non-technical users can leverage Codex's full capabilities without complex setups.

1. Core Advantages of This Domestic-Friendly Setup

  • No Special Network Required: Works with regular domestic internet (no VPN needed).
  • Full Official Plugins Access: Activate all 8+ official Codex plugins (Browser, Terminal, File Manager, etc.).
  • Stable Connection: Uses domestic API gateways to avoid latency or disconnections.
  • Zero Coding Experience Needed: Follow copy-paste commands and visual steps.

2. Prerequisites (3 Things You Need)

  1. A Windows 10/11 or macOS 12+ computer (64-bit, 8GB+ RAM recommended).
  2. A free DeepSeek API key (domestic AI model alternative to GPT).
  3. 10 minutes of time (the entire process is streamlined to under 10 minutes).

3. Step 1: Download Codex Client (Domestic Mirror)

The official Codex download may be inaccessible in China — use a trusted domestic mirror:

  1. Visit the Codex China Mirror (Alibaba Cloud-hosted).
  2. Select the version for your OS:
    • Windows: Download Codex-Setup-1.8.2.exe (58MB).
    • macOS: Download Codex-1.8.2.dmg (62MB).
  3. Install by double-clicking — no custom settings needed (just click "Next" → "Install" → "Finish").

4. Step 2: Configure Domestic AI Model Connection

Codex defaults to ChatGPT, but we'll connect it to DeepSeek for stable access:

  1. Open Codex after installation. Click "Settings" (gear icon) in the bottom-left corner.
  2. Select "Model Configuration" → "Custom API".
  3. Fill in the fields:
API Provider: DeepSeek
API Base URL: https://api.deepseek.com/v1
API Key: [Paste your DeepSeek API key here]
Model: deepseek-chat
  1. Click "Test Connection" — a green "Connected Successfully" message means it's working.
  2. Click "Save" to apply the settings.

How to Get a DeepSeek API Key (30-Second Tutorial)

  1. Go to DeepSeek Open Platform and sign up with your phone number.
  2. After logging in, click "API Keys" → "Create New Key".
  3. Name the key (e.g., "Codex Usage") and click "Generate" — copy the key immediately (it won't be shown again).

5. Step 3: Install All Official Codex Plugins

Codex's power lies in its plugins — here's how to install and enable all official ones:

  1. In Codex, click "Plugins" (puzzle icon) in the left sidebar.
  2. Click "Install Official Plugins" → select "All Plugins" (or check individual ones you need):
    • Browser: Web search and page scraping.
    • Terminal: Run shell commands.
    • File Manager: Read/write local files.
    • Code Interpreter: Execute Python/R code.
    • PDF Reader: Analyze PDF documents.
    • Image Generator: Create images from text.
    • Excel Processor: Edit and analyze Excel files.
    • Git Integration: Manage Git repositories.
  3. Click "Install" — wait 20 seconds for all plugins to download.

Verify Plugin Activation

Run this test prompt to confirm plugins work:

Use the Browser plugin to search for "2024 top Python frameworks", then use the File Manager plugin to save the results to a text file named "python-frameworks-2024.txt" on my desktop.

6. Step 4: Practical Use Cases

1. Automate File Organization (File Manager Plugin)

Use the File Manager plugin to organize my "Downloads" folder:
1. Create subfolders: "Documents", "Images", "Videos", "Others".
2. Move all .pdf/.docx/.txt files to "Documents".
3. Move all .jpg/.png/.gif files to "Images".
4. Move all .mp4/.mov files to "Videos".
5. Move remaining files to "Others".
6. Generate a summary of how many files were moved to each folder.

2. Run Code Snippets (Code Interpreter Plugin)

Use the Code Interpreter plugin to:
1. Calculate the sum of the first 100 prime numbers.
2. Generate a bar chart showing the distribution of these primes.
3. Save the chart as "prime-numbers-chart.png" on my desktop.
4. Output the final sum and the file path.

3. Analyze PDF Data (PDF Reader Plugin)

Use the PDF Reader plugin to:
1. Open the file "sales-report-2024.pdf" from my Documents folder.
2. Extract all numerical sales data from the first 5 pages.
3. Calculate the total revenue and average units sold per month.
4. Save the analysis as "sales-analysis-2024.txt" in the same folder.

7. Troubleshooting Common Issues

Issue 1: Plugin Installation Fails

# Windows
cd C:Program FilesCodex
codex --repair-plugins

# macOS
cd /Applications/Codex.app/Contents/MacOS
./Codex --repair-plugins

Issue 2: API Connection Error

  • Ensure your API key is not expired (DeepSeek keys are valid for 90 days).
  • Check if your internet connection is stable.
  • Re-enter the API Base URL: https://api.deepseek.com/v1 (no typos).

Issue 3: Terminal Plugin Not Working (Windows)

  1. Open Codex → "Plugins" → "Terminal" → "Settings".
  2. Select "Use PowerShell" (default is Command Prompt).
  3. Click "Save" and retry running commands.

FAQ

Do I need a ChatGPT account to use Codex with this setup?

No. By configuring Codex with DeepSeek as the backend model, you completely bypass ChatGPT. You only need a free DeepSeek API key. This makes Codex accessible regardless of OpenAI account restrictions or regional limitations. The DeepSeek API is also dramatically cheaper — roughly one-twentieth of OpenAI's pricing.

Can I use other domestic models besides DeepSeek?

Yes. The same configuration pattern works with any OpenAI-compatible API. You can use Moonshot AI (Kimi), Zhipu AI (GLM), or Baidu ERNIE Bot by changing the API Base URL and model name in the settings. The key is that the model must support an OpenAI-compatible chat completions endpoint. DeepSeek is recommended as the starting point due to its excellent coding performance and low cost.

What if Codex updates and breaks the configuration?

Codex updates generally preserve custom API configurations. If a major update resets your settings, simply repeat Step 2 (re-entering the API details). Your DeepSeek API key remains valid. For plugin issues after an update, run codex --repair-plugins as shown in the troubleshooting section above.

Share this article

Related Articles

AI TutorialsBeginner

How to Write Prompts That Actually Work: The 5-Point Framework

Vague prompts get mediocre answers. Master the 5-Point Prompt Framework — Role, Context, Task, Format, Constraints — and get dramatically better results from any AI tool.

5 min read
PromptsPrompt EngineeringFramework