Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Official Download (macOS Version)
https://openai.com/en/codex/
Install via Command Line
npm install -g @openai/codex
Environment Variable Configuration
- Modify the
~/.codex/config.toml configuration file to add the following settings:
profile = "aihubmix"
[model_providers.aihubmix]
name = "aihubmix"
base_url = "https://aihubmix.com/v1"
personality = "pragmatic"
wire_api = "responses"
[profiles.aihubmix]
model = "gpt-5.2"
model_provider = "aihubmix"
model_reasoning_effort = "high"
- Modify the
~/.codex/auth.json configuration file to change the following settings:
{
"OPENAI_API_KEY": "AIHUBMIX_API_KEY"
}
- Run CC-Switch and add the provider.
- Select “AiHubMix” from the preset list.
- Enter your key in the “API Key” field and click “Add” to save the settings.
- Return to the home page, select “AiHubMix” from the provider list, and click “Enable” to start using it.
Using Codex
Using in the Terminal
- Open the terminal, navigate to your project directory, and run the
codex command.
cd /your/project/path
codex
- Set permissions as needed.
- Select the model you need based on your requirements.
- Input natural language; if you receive a normal response, the configuration is successful.
Using in the Codex Desktop Application
- Open the Codex desktop application and select the working directory.
- Enter the task in the input box; if you receive a normal response, the configuration is successful.
Useful Command References
Help Command
Complete Command Options
Usage
$ codex [options] <prompt>
Options
-h, --help Show help information and exit
-m, --model <model> Specify the model to use (default: codex-mini-latest)
-i, --image <path> Path to the file containing image input
-v, --view <rollout> View previously saved session records
-q, --quiet Non-interactive mode, only prints the final output of the assistant
-a, --approval-mode <mode> Override approval policy: 'suggest', 'auto-edit', or 'full-auto'
--auto-edit Automatically approve file edits; will still prompt for command confirmation
--full-auto Automatically approve edits and commands in sandbox environment
--no-project-doc Do not automatically include 'codex.md' file from the repository
--project-doc <file> Include specified Markdown file as context
--full-stdout Do not truncate stdout/stderr of command output
Dangerous Options
--dangerously-auto-approve-everything
Skip all confirmation prompts and execute commands directly (no sandbox protection)
For use only in temporary local testing environments
Experimental Options
-f, --full-context Start in "full context" mode, loading the entire repository into context
and applying bulk edits in a single operation
Only compatible with --model parameter
Examples
$ codex "Write and run a Python program that prints ASCII art"
$ codex -q "Fix build issues"