Skip to content

Latest commit

 

History

8,663 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenEx CLI

OpenEx is a public, local-first fork of OpenAI's Codex CLI. It keeps the upstream Codex CLI feature set while renaming the user-facing command to openex and adding first-class support for OpenAI-compatible API-key providers.

OpenEx is not an official OpenAI distribution. Internal Rust crate names, protocol IDs, telemetry names, and some upstream model identifiers still use codex where changing them would break inherited compatibility.

What It Does

  • Runs from the terminal as openex.
  • Uses ~/.openex / OPENEX_HOME for user config by default.
  • Supports the original Codex CLI workflows, including interactive chat, exec, MCP, plugins, completions, resume, debug commands, and model selection.
  • Adds a built-in openai-compatible provider that can point at any provider exposing an OpenAI-compatible /v1/responses API.
  • Keeps a built-in nvidia provider for NVIDIA NIM as a preset.
  • Refreshes /models from the active API-key provider's /v1/models endpoint when the provider supports model listing.

Quick Start

Use environment variables for provider credentials:

export OPENEX_API_KEY="<provider-api-key>"
export OPENEX_BASE_URL="https://provider.example.com/v1"
export OPENEX_MODEL="provider/model-id"

openex

The generic provider is:

model_provider = "openai-compatible"
model = "provider/model-id"
model_reasoning_summary = "none"

OPENEX_BASE_URL defaults to https://api.openai.com/v1 when omitted. OPENEX_MODEL defaults to gpt-5 only for the local launcher when an API key is present and no model is supplied.

NVIDIA NIM Example

export OPENEX_API_KEY="<your-nvidia-api-key>"
export OPENEX_BASE_URL="https://integrate.api.nvidia.com/v1"
export OPENEX_MODEL="nvidia/nemotron-3-ultra-550b-a55b"

openex

The NVIDIA preset is still available if you prefer the provider-specific variable:

export NVIDIA_API_KEY="<your-nvidia-api-key>"
openex -c model_provider=nvidia -c model=nvidia/nemotron-3-ultra-550b-a55b

Do not commit API keys. Keep keys in your shell environment, a private env file, or your secret manager.

Custom Providers

You can also define named providers in ~/.openex/config.toml:

model_provider = "my-provider"
model = "provider/model-id"
model_reasoning_summary = "none"

[model_providers.my-provider]
name = "My Provider"
base_url = "https://provider.example.com/v1"
env_key = "MY_PROVIDER_API_KEY"
wire_api = "responses"

Then run:

export MY_PROVIDER_API_KEY="<provider-api-key>"
openex

OpenEx speaks the Responses API. Providers that only expose Chat Completions need a dedicated adapter before they can be used reliably.

Local Build

cd codex-rs
OPENSSL_DIR=/usr \
OPENSSL_LIB_DIR=/usr/lib/x86_64-linux-gnu \
OPENSSL_INCLUDE_DIR=/usr/include \
cargo build -p codex-cli --bin openex

For this local checkout, ~/.local/bin/openex launches:

/home/coldplay/temp2/codex/codex-rs/target/debug/openex

Model Listing

Use /models in the TUI or openex debug models from the terminal to inspect models from the active provider. OpenEx accepts both the inherited internal model catalog shape and standard OpenAI-compatible responses such as:

{
  "data": [
    { "id": "provider/model-id" }
  ]
}

Provider model caches are keyed by provider name and base URL so switching providers does not reuse another provider's fresh model cache.

More Detail

This repository remains licensed under the Apache-2.0 License.

About

OpenEx CLI: public local-first Codex fork with OpenAI-compatible API-key provider support.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages