Skip to content

Step 1: Install Codex

Install via npm

bash
npm install -g @openai/codex

Step 2: Configuration Files

Configure config.toml

Edit the file ~/.codex/config.toml:

toml
model_provider = "bsf-ai"
# Use gpt-5 or gpt-5-codex.
model = "gpt-5.4"
# Options: high, medium, low, minimal.
model_reasoning_effort = "high"
disable_response_storage = true

# bsf.ai configuration
[model_providers.bsf-ai]
name = "bsf.ai"
base_url = "https://api.bsf.ai/v1"
wire_api = "responses"
requires_openai_auth = true

[projects."/Users/chrischen/Library/Application Support/Orchids"]
trust_level = "trusted"

[projects."/Users/chrischen/code/docs-bsf-ai"]
trust_level = "trusted"

[notice.model_migrations]
gpt-5-codex = "gpt-5.4"

Configure auth.json

Edit the file ~/.codex/auth.json:

json
{
  "OPENAI_API_KEY": "Replace with your API Key"
}

Step 3: Use Latest Codex Model (Optional)

Method 1: Switch via Command

bash
codex -m gpt-5-codex

Method 2: Specify in Configuration File

Set in ~/.codex/config.toml:

toml
model = "gpt-5-codex"

Step 4: Start Using

Basic Usage

  • After configuration, run the codex command in your terminal to start using
  • Use codex --help to view more command options