Community-maintained Homebrew tap that tracks the latest upstream Codex release, including prereleases.
The official Homebrew codex cask is a good default if you only want stable releases. This tap exists for two cases:
- upstream is moving quickly and you want a dedicated mirror that checks for new releases every 5 minutes
- you want the highest upstream release by version, including alpha releases that the official cask does not publish
The official Homebrew cask tracks stable rust-v... releases only. This tap tracks the highest upstream rust-v... version by SemVer precedence, whether that release is stable or a prerelease such as rust-v0.113.0-alpha.1.
brew install --cask hksw-io/codex/codexUpgrade:
brew upgrade --cask hksw-io/codex/codexIf you want a single Homebrew upgrade command that also includes greedy casks, set:
export HOMEBREW_UPGRADE_GREEDY=1Then plain brew upgrade will include them.
Notes:
hksw-io/codexis the tap name, not the install target.brew install --cask codexinstalls the official Homebrew cask, not this tap.- This tap's
codexcask may point to either a stable release or a prerelease, depending on which upstream version is highest.
This tap keeps a single active cask, codex, and points it at the highest upstream rust-v... release by SemVer precedence.
Examples:
0.113.0supersedes0.113.0-alpha.20.114.0-alpha.1supersedes0.113.10.114.0supersedes0.114.0-alpha.1
If you want stable-only behavior, use the official Homebrew codex cask instead of this tap.
This tap polls the upstream GitHub Releases API every 5 minutes and mirrors only rust-v... releases from openai/codex.
Each mirrored release:
- creates a matching git tag
- creates a GitHub Release in
hksw-io/homebrew-codex - updates
Casks/codex.rbonly if that upstream release becomes the highest version seen so far
Clone the repo wherever you want to run the mirror:
git clone https://github.com/hksw-io/homebrew-codex.git
cd homebrew-codexCreate an environment file. The default location is ${XDG_CONFIG_HOME:-$HOME/.config}/codex-tap.env, but every helper script also accepts an explicit path:
mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}"
cat > "${XDG_CONFIG_HOME:-$HOME/.config}/codex-tap.env" <<'EOF'
GH_TOKEN=...
TAP_REPO=hksw-io/homebrew-codex
UPSTREAM_REPO=openai/codex
GIT_BRANCH=master
GIT_USER_NAME="Your Name"
GIT_USER_EMAIL="you@example.com"
EOF
chmod 600 "${XDG_CONFIG_HOME:-$HOME/.config}/codex-tap.env"Run the updater once:
./scripts/run_update.sh --dry-run --verboseThe updater mirrors every upstream rust-v... release, but only changes codex.rb when that release outranks the currently active version.
Run the tests:
python3 -m unittest discover -s tests -vAutomate it on Linux with systemd:
sudo ./scripts/install_systemd_units.sh "${XDG_CONFIG_HOME:-$HOME/.config}/codex-tap.env"
systemctl status codex-tap-sync.timer
systemctl list-timers codex-tap-sync.timerAutomate it on macOS with launchd:
./scripts/install_launchd_agent.sh "${XDG_CONFIG_HOME:-$HOME/.config}/codex-tap.env"
launchctl print "gui/$(id -u)/io.hksw.codex-tap-sync"Notes:
- The helper scripts render the scheduler config with your actual clone path, so you do not need to use
/srv/homebrew-codex. GH_TOKENneeds permission to readopenai/codexreleases and write tohksw-io/homebrew-codex.- Set
GIT_USER_NAMEandGIT_USER_EMAILif you want mirrored commits to use a specific identity. If unset, the updater falls back to the repo's local git config. - The Linux installer defaults to running the timer as the invoking user. Override
CODEX_TAP_USER,CODEX_TAP_GROUP, orCODEX_TAP_HOMEif you want a dedicated service account.