Nix flake for OpenAI Codex CLI. macOS only.
- Always up-to-date —
versions.jsonis updated automatically every day via GitHub Actions, so you always have access to the latest release. - Easy rollback — every version is tagged, so switching to a previous version is a single command if a new release has a bug.
# Switch to a previous version instantly
nix run github:tttol/nix-codex/0.121.0# Run without installing
nix run github:tttol/nix-codex
# Run without installing and always fetch the latest flake
nix run github:tttol/nix-codex --refresh
# Install to user profile
nix profile install github:tttol/nix-codex
# Run a specific version
nix run github:tttol/nix-codex/0.122.0Create an alias like this:
alias ncodex='nix run github:tttol/nix-codex --refresh'
Now you can always use the latest version of codex without updating it manually.
A GitHub Actions workflow runs daily at 06:00 UTC and performs the following steps:
- Fetch the latest release from the openai/codex GitHub Releases API
- Compare with the current version in
versions.json - If a new version is found, compute the SHA-256 hash of each macOS binary and overwrite
versions.json - Commit and push the change with a version tag (e.g.
0.123.0)
If the version is already up to date, the workflow exits without making any changes.