OpenAI Codex
Status
Section titled “Status”Version: 1.0.0 | Tests: Passing
{
"features": {
"ghcr.io/infrashift/trusted-devcontainer-features/openai-codex:latest": {
"target_version": "latest"
}
}
} Options
Section titled “Options”| Option | Type | Default | Description |
|---|---|---|---|
target_version | string | latest | Select the OpenAI Codex version to install |
Dependencies
Section titled “Dependencies”How It Works
Section titled “How It Works”This feature uses Bun to globally install the @openai/codex npm package. The Ansible playbook runs bun install --global @openai/codex@<version>, which places the codex CLI binary in ~/.bun/bin. Because this installation method relies on Bun as the package manager and runtime, the Bun feature must be installed first, which is handled automatically through the dependency chain.
To use OpenAI Codex after installation, you need to set the OPENAI_API_KEY environment variable. You can do this in your devcontainer.json using containerEnv or remoteEnv, or by configuring it in a .env file that your devcontainer mounts.
The VS Code ChatGPT extension is also recommended as a companion to the Codex CLI for an integrated AI-assisted development experience. Codex provides a terminal-based AI coding assistant that can generate, explain, and refactor code directly from the command line, complementing editor-based AI tools.