This document describes how Codex binaries and packages are distributed to end users after being built by the release pipeline. It covers the four primary distribution channels (GitHub Releases, npm Registry, Homebrew Cask, and DotSlash), how artifacts are staged and published to each channel, and the installation methods available to users.
For information about how artifacts are built and signed, see Release Pipeline. For the build system structure, see Cargo Workspace Structure.
The Codex release system distributes artifacts through multiple channels to support different user preferences and platform conventions. All channels source their artifacts from the same GitHub Actions release workflow.
Sources: .github/workflows/rust-release.yml374-521
GitHub Releases serve as the primary distribution channel for direct binary downloads. All signed and compressed artifacts are attached to a GitHub Release created for each version tag.
The release job creates a GitHub Release using the softprops/action-gh-release action:
The release includes:
.zst, .tar.gz, and .zip).sigstore for Linux binaries)config-schema.json)Sources: .github/workflows/rust-release.yml491-501 .github/workflows/rust-release.yml435-437
Artifacts are organized by target triple in the dist/ directory before upload:
| Target | Files | Compression Formats |
|---|---|---|
aarch64-apple-darwin | codex-aarch64-apple-darwin, codex-responses-api-proxy-aarch64-apple-darwin, codex-aarch64-apple-darwin.dmg | .zst, .tar.gz |
x86_64-apple-darwin | codex-x86_64-apple-darwin, codex-responses-api-proxy-x86_64-apple-darwin, codex-x86_64-apple-darwin.dmg | .zst, .tar.gz |
x86_64-unknown-linux-musl | codex-x86_64-unknown-linux-musl, codex-responses-api-proxy-x86_64-unknown-linux-musl, *.sigstore | .zst, .tar.gz |
aarch64-unknown-linux-musl | codex-aarch64-unknown-linux-musl, codex-responses-api-proxy-aarch64-unknown-linux-musl, *.sigstore | .zst, .tar.gz |
x86_64-unknown-linux-gnu | codex-x86_64-unknown-linux-gnu, codex-responses-api-proxy-x86_64-unknown-linux-gnu, *.sigstore | .zst, .tar.gz |
aarch64-unknown-linux-gnu | codex-aarch64-unknown-linux-gnu, codex-responses-api-proxy-aarch64-unknown-linux-gnu, *.sigstore | .zst, .tar.gz |
x86_64-pc-windows-msvc | codex-x86_64-pc-windows-msvc.exe, codex-responses-api-proxy-x86_64-pc-windows-msvc.exe, sandbox helpers | .zst, .tar.gz, .zip |
aarch64-pc-windows-msvc | codex-aarch64-pc-windows-msvc.exe, codex-responses-api-proxy-aarch64-pc-windows-msvc.exe, sandbox helpers | .zst, .tar.gz, .zip |
Sources: .github/workflows/rust-release.yml296-312 .github/workflows/rust-release-windows.yml184-194
Multiple compression formats are provided for compatibility:
.zst) - High compression ratio, used by DotSlash and advanced users.tar.gz) - Universal compatibility, works on systems without zstd.zip) - Windows-specific, bundled with sandbox helper binariesThe compression step preserves the original binaries on Windows but removes them on Unix to save artifact storage space:
Sources: .github/workflows/rust-release.yml314-348 .github/workflows/rust-release-windows.yml198-259
The release is marked as a pre-release if the version contains a suffix (e.g., -alpha, -beta):
Sources: .github/workflows/rust-release.yml499-500
The npm Registry hosts multiple packages that wrap the native Codex binaries with JavaScript tooling for easy installation via npm or pnpm.
Three packages are published to the @openai scope:
Sources: .github/workflows/rust-release.yml481-489
The stage_npm_packages.py script prepares npm tarballs from GitHub Release artifacts:
package.json metadata@openai/codex package with platform packages as optionalDependencies.tgz tarballsSources: .github/workflows/rust-release.yml481-489
The publish-npm job handles publication to the npm Registry:
Version-based publishing:
1.0.0) → publish to latest tag1.0.0-alpha.1) → publish to alpha tagSources: .github/workflows/rust-release.yml447-464 .github/workflows/rust-release.yml525-630
The npm publish process uses OpenID Connect (OIDC) Trusted Publishing instead of long-lived tokens:
id-token: write permissionNODE_AUTH_TOKEN secretSources: .github/workflows/rust-release.yml531-545
Platform-specific packages use composite tags to enable version + platform targeting:
| Package | Version | npm Tag |
|---|---|---|
@openai/codex | 1.0.0 | latest |
@openai/codex-npm-linux-x64 | 1.0.0 | linux-x64 |
@openai/codex-npm-darwin-arm64 | 1.0.0 | darwin-arm64 |
@openai/codex | 1.0.0-alpha.1 | alpha |
@openai/codex-npm-linux-x64 | 1.0.0-alpha.1 | alpha-linux-x64 |
Sources: .github/workflows/rust-release.yml589-606
The publish script gracefully handles already-published versions by detecting error messages:
Sources: .github/workflows/rust-release.yml614-629
Homebrew is the de facto package manager for macOS. Codex is distributed as a Homebrew Cask, which allows users to install and update via brew install --cask codex.
The Homebrew cask formula is maintained externally in the Homebrew Cask repository. It references:
Note: The Homebrew formula is updated manually by Homebrew maintainers or OpenAI contributors after each release. The release pipeline does not directly update Homebrew.
Sources: README.md1 README.md25-27
macOS releases include a DMG (disk image) for both installation methods:
codex and codex-responses-api-proxy binarieshdiutil create packages the directory into a compressed DMGSources: .github/workflows/rust-release.yml237-294
DotSlash is a binary manager that uses declarative JSON configuration files to fetch and cache platform-specific executables. Codex publishes DotSlash configurations to enable version-controlled binary dependencies.
The .github/dotslash-config.json file declares how to fetch Codex binaries for each platform:
Sources: .github/workflows/rust-release.yml502-507
The facebook/dotslash-publish-release action:
.github/dotslash-config.jsonThis enables users to commit a DotSlash file (e.g., ./.codex) to their repository that automatically fetches the correct Codex version and platform binary.
Sources: .github/workflows/rust-release.yml502-507
Users can install Codex through multiple methods depending on their platform and preferences:
How it works:
@openai/codex packageoptionalDependencies cause npm to fetch the appropriate platform-specific packagecodex binary is available in PATHAdvantages:
npm update -g @openai/codexSources: README.md1 README.md17-22
How it works:
/usr/local/bin/ (or appropriate Homebrew prefix)Advantages:
brew upgradeSources: README.md1 README.md24-27
Users can manually download binaries from the latest GitHub Release:
Download the appropriate archive for your platform:
codex-aarch64-apple-darwin.tar.gzcodex-x86_64-apple-darwin.tar.gzcodex-x86_64-unknown-linux-musl.tar.gzcodex-aarch64-unknown-linux-musl.tar.gzcodex-x86_64-pc-windows-msvc.zipcodex-aarch64-pc-windows-msvc.zipExtract the archive:
Rename the binary (optional):
Add to PATH or move to a directory in PATH:
Sources: README.md31-45
For repositories that want to pin a specific Codex version:
./.codex DotSlash file from the release artifacts./codex and DotSlash automatically fetches the correct binaryThis ensures consistent tooling versions across development environments.
Sources: .github/workflows/rust-release.yml502-507
The release pipeline includes version-based conditional logic to control which releases are published to npm:
| Version Format | Example | Published to npm? | npm Tag |
|---|---|---|---|
| Stable | 1.0.0 | ✅ Yes | latest |
| Alpha | 1.0.0-alpha.1 | ✅ Yes | alpha |
| Beta | 1.0.0-beta.1 | ❌ No | N/A |
| Other | 1.0.0-rc.1 | ❌ No | N/A |
Rationale:
alpha tagSources: .github/workflows/rust-release.yml447-464
Version numbers are extracted from Git tags in the format rust-v*.*.*:
Sources: .github/workflows/rust-release.yml439-445 .github/workflows/rust-release.yml447-464
Stable releases (without version suffixes) trigger an additional deployment hook to update the OpenAI developer website:
The webhook deploys the latest config.schema.json to developers.openai.com, ensuring documentation stays synchronized with released versions.
Sources: .github/workflows/rust-release.yml509-520
The shell-tool-mcp package follows a separate distribution workflow but integrates with the main release pipeline:
This workflow:
codex-exec-mcp-server and codex-execve-wrapper for multiple targetsSources: .github/workflows/rust-release.yml365-372 .github/workflows/shell-tool-mcp.yml1-677
| Channel | Platforms | Update Method | Target Audience |
|---|---|---|---|
| GitHub Releases | All | Manual download | Advanced users, CI/CD, custom integrations |
| npm Registry | All | npm update -g | JavaScript/TypeScript developers, cross-platform teams |
| Homebrew Cask | macOS | brew upgrade | macOS developers |
| DotSlash | All | Automatic via DotSlash | Teams wanting version-controlled binaries |
Sources: README.md1-61
The Codex distribution system provides multiple channels to accommodate different user preferences:
All channels are populated automatically by the rust-release.yml workflow when a version tag is pushed, ensuring consistent availability across distribution methods.
Refresh this wiki