Installs the OpenAI Codex CLI from the official packaged GitHub release assets and persists ~/.codex in shared state across devcontainers.
The feature installs:
codex- a bundled
rgbinary that matches the upstream Codex package layout
"features": {
"ghcr.io/sliekens/devcontainer-features/codex:1": {}
}Pin a specific Codex version when you need deterministic builds:
"features": {
"ghcr.io/sliekens/devcontainer-features/codex:1": {
"version": "0.114.0"
}
}| Option | Type | Default | Description |
|---|---|---|---|
version |
string | latest |
Version to install. Accepts latest, 0.114.0, v0.114.0, or rust-v0.114.0. |
| Host path | Container path | Purpose |
|---|---|---|
~/.codex |
/var/lib/codex |
Auth and configuration |
This directory is bind-mounted from the host so that auth and configuration are preserved across container rebuilds.
Because Docker cannot bind-mount a directory that does not yet exist, consuming devcontainer.json files should add an initializeCommand to pre-create this directory on the host before the container starts:
{
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/sliekens/devcontainer-features/codex:1": {}
},
"initializeCommand": "mkdir -p \"$HOME/.codex\""
}This feature is released under the MIT License.
The installed tool is subject to its own license: Codex CLI license.
- Fix compatibility with new tarball layout
- Add trailing slash to bind mount source path to mark it explicitly as a directory.
- Use bind mount from host
~/.codexinstead of a Docker volume for persistent state.
- Initial release.