Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-codex

Configure the OpenAI Codex CLI to use models served by CoreInfra AI Hub.

Prerequisites

You need the Codex CLI, a CoreInfra AI Hub token, and either uvx or pipx.

On a new Mac, install Apple's Command Line Tools first. Skip this step if they are already installed.

xcode-select --install

If you do not have uvx, install uv:

brew install uv

You can also use uv's official installer or choose the pipx command below.

Quick start

Run setup with your CoreInfra token:

uvx --from git+https://github.com/CoreInfraAI/setup-codex setup-codex --api-key <your-token>

Then verify that Codex works:

codex exec "2 + 2" --skip-git-repo-check

To run setup with pipx instead:

pipx run --spec git+https://github.com/CoreInfraAI/setup-codex setup-codex --api-key <your-token>

What it does

  1. Creates a model catalog at <codex-home>/models.json from the models available through CoreInfra AI Hub.
  2. Configures <codex-home>/config.toml to use the coreinfra provider while preserving your other settings.
  3. Stores your API token in <codex-home>/.env with file mode 600 when you pass --api-key.
  4. Backs up each existing file before changing it. Backups are saved beside the original file with a .bak suffix.

Configuration

Options

--codex-home PATH   codex home directory (default: $CODEX_HOME or ~/.codex)
--model SLUG        default model for a fresh config (default: gpt-5.6-sol)
--api-key TOKEN     CoreInfra API token to write into .env

Environment variables

Variable Default Description
COREINFRA_HUB_BASE_URL https://hub.coreinfra.ai Hub endpoint used by setup and written to the Codex config. Override it for another instance, such as staging. Trailing slashes are removed.

After a Codex upgrade

Re-run setup after upgrading Codex so the model catalog matches the new binary. Add --refresh to bypass the uvx cache:

uvx --refresh --from git+https://github.com/CoreInfraAI/setup-codex setup-codex

Limitations

  • Only models served over the Responses API are included. Models limited to chat-completions or messages — including Kimi, GLM, Claude — cannot be used by Codex.
  • ChatGPT Work currently supports only OpenAI models.

About

Configure script for Codex harness to work with CoreInfra AI Hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages