Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

setup-codex

One-line setup for using OpenAI Codex CLI with CoreInfra AI Hub.

Quick start

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

Get a token at https://hub.coreinfra.ai. Then verify:

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

No uvx? Install uv first, e.g. brew install uv or curl -LsSf https://astral.sh/uv/install.sh | sh. Alternatively, pipx run works the same way:

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

What it does

  1. Regenerates <codex-home>/models.json — a codex model catalog covering every model CoreInfra AI Hub serves over the Responses API. The model list is fetched live from the hub's prices endpoint (every model with responses in its protocols). Codex's model_catalog_json replaces its bundled catalog rather than merging, so the file is rebuilt from your installed codex binary's own bundled catalog (codex debug models --bundled) — instruction templates, context windows, and reasoning levels always match your codex version. Models codex doesn't bundle yet get an entry cloned from the closest bundled sibling.
  2. Updates <codex-home>/config.toml — adds the coreinfra model provider, model_catalog_json, and (on a fresh config) sensible defaults. Existing settings (MCP servers, project trust, other providers) are preserved; already-present keys are only updated where needed.
  3. Optionally writes the API token to <codex-home>/.env (--api-key), chmod 600.

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

After a codex upgrade

Re-run the same command to refresh the catalog against the new binary (add --refresh to bypass the uvx cache):

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

Notes

  • Only models the hub serves over the Responses API are included; chat-completions and messages models (Kimi, GLM, Claude, deepseek-v4-pro) can't be used by codex.
  • ChatGPT Work only works with OpenAI models for now

About

Configure script for Codex harness to work with CoreInfra AI Hub

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages