Skip to content

Codex Setup Guide ​

Install Codex CLI ​

Use the same npm command on Windows, macOS, and Linux:

bash
npm install -g @openai/codex

Verify:

bash
codex --version

If a version number is printed, installation succeeded.

Configure API ​

Codex requires the OpenAI-compatible URL to end with /v1.

Config File Locations ​

Systemconfig.tomlauth.json
WindowsC:\Users\Username\.codex\config.tomlC:\Users\Username\.codex\auth.json
macOS / Linux~/.codex/config.toml~/.codex/auth.json

config.toml ​

toml
model_provider = "mioufun"
model = "your-model-name"
model_reasoning_effort = "high"
disable_response_storage = true

[model_providers.mioufun]
name = "MiouFun"
base_url = "https://api.mioufun.top/v1"
wire_api = "responses"
requires_openai_auth = true
model_context_window = 1000000
model_auto_compact_token_limit = 900000

auth.json ​

json
{
  "OPENAI_API_KEY": "sk-***"
}

Start Using ​

Enter your project directory and start:

bash
cd your-project-directory
codex

After the input box appears, describe what you want to do.

Tip

If you are unsure about the model name, check the model list in the MiouFun API console or test with the default model name provided by the portal.