Skip to main content
Codex is OpenAI’s coding agent and comes in three forms: Codex CLI in the terminal, the Codex extension in VS Code and the Codex app. All three read the same ~/.codex folder, so one setup covers all of them.

One-command install

Replace sk-xxx with your key, open a terminal, paste and press Enter. The script verifies the key, lists every model the key may call and lets you pick (Enter = recommended: gpt-astra for Astra, gpt-5.6-sol for GPT, claude-opus-5 for Claude), installs Codex CLI and writes the config.
The script first asks for a language (1 = Vietnamese, 2 = English; skip with --lang en or --lang vi). Without --key it prompts for the key. To force a model add --model gpt-astra or --model gpt-5.6-sol.
Read the source before running if you like: codex.sh, codex.ps1. The script runs only on your machine and sends the key only to gpt.teamsoclo.site for verification.

What the script does

  1. Verifies the key with the gateway and picks the model for your package; a bad key stops here without touching your machine.
  2. Backs up your existing config.toml, if any, as config.toml.bak.<timestamp>.
  3. Writes ~/.codex/config.toml: model gpt-5.6-sol, the TeamSocLo gateway, Responses API.
  4. Stores the key in the environment variable TEAMSOCLO_API_KEY (in ~/.zshrc / ~/.bashrc, or as a user variable on Windows). The key is not in the config file, so you can share config.toml without leaking it.
  5. Installs or upgrades Codex CLI with npm install -g @openai/codex.
Run it again any time to change keys or packages; the old config is always backed up first.
Prefer not to use a terminal? TeamSocLo Key Tool is an app for Windows and macOS: paste your key once to configure Codex, Claude Code and 20+ other tools.

After installing

1

Open a new terminal, run codex

The old terminal has not loaded the new variable; open a new tab. Ask Codex anything to verify.
2

VS Code: install the extension, quit fully, reopen

VS Code → Extensions → search Codex (OpenAI’s coding agent) → Install. Then quit VS Code completely: macOS Cmd + Q, Windows close every window. Reload Window is not enough; the extension reads config only at process start.
3

Codex app

Reopen the app after running the command. On macOS the command set the variable for GUI apps via launchctl; on Windows setx applies to apps started afterwards.
No OpenAI login is needed. requires_openai_auth = false tells Codex to use the gateway key from the environment variable.

Manual configuration

If you prefer to edit yourself, ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml) must contain exactly:
and the environment variable TEAMSOCLO_API_KEY must hold your key.
Keep wire_api = "responses". Codex speaks the Responses API; switching to chat breaks it.
Open the config folder quickly:

Changing the model

The GPT Astra package uses gpt-astra. Edit the first line of config.toml and restart Codex:
A GPT key calling gpt-astra gets “no available channel”, and vice versa. The model follows the package you bought, see Models and packages.

Uninstall

To keep Codex but return to your previous config, copy config.toml.bak.<timestamp> back over config.toml.

If it does not work

  • You opened a new terminal or quit VS Code fully after installing.
  • echo $TEAMSOCLO_API_KEY (Windows: echo %TEAMSOCLO_API_KEY% in cmd) prints the full key.
  • base_url ends with /v1, wire_api is responses.
  • The key is still valid and has quota: check here.
  • Otherwise see Troubleshooting, it has a Codex section.