A Dev Container feature to install OpenAI Codex CLI — a terminal-based coding agent — into your development environment.
Add the Codex feature to your devcontainer.json:
{
"features": {
"ghcr.io/dirien/devcontainer-feature-codex/codex:0": {}
}
}Note: This feature requires Node.js. Make sure to include the node feature or have Node.js pre-installed in your base image.
| Option | Type | Default | Description |
|---|---|---|---|
version |
string | latest |
Version of @openai/codex to install (e.g., 1.0.9). Set to latest for the latest. |
{
"features": {
"ghcr.io/dirien/devcontainer-feature-codex/codex:0": {
"version": "1.0.9"
}
}
}Set the OPENAI_API_KEY environment variable in your devcontainer.json:
{
"features": {
"ghcr.io/dirien/devcontainer-feature-codex/codex:0": {}
},
"remoteEnv": {
"OPENAI_API_KEY": "${localEnv:OPENAI_API_KEY}"
}
}Or sign in with your ChatGPT credentials by running codex after the container starts.