A lightweight Bash wrapper for the Codex CLI that checks for npm updates, offers to install the latest version, and then launches Codex. Saves your from re-typing codex after the update.
- Checks for new
@openai/codexreleases at startup - Displays the installed and available versions
- Prompts before installing an update
- Skips update checks in non-interactive sessions
- Continues with the installed version if an update fails
- Supports custom Codex installation paths
- Can disable update checks when needed
- Linux or WSL
- Bash
- Node.js and npm
- GNU
timeoutandsort - Codex installed globally through npm
Install Codex with:
npm install -g @openai/codexBy default, the wrapper expects the official Codex executable at:
~/.local/share/npm-global/bin/codex
Clone the repository:
git clone https://github.com/DevilsNerve/codex-update-wrapper.git
cd codex-update-wrapperInstall the wrapper:
mkdir -p "$HOME/.local/bin"
install -m 755 codex "$HOME/.local/bin/codex"Make sure ~/.local/bin appears before the npm global binary directory in your PATH.
Verify the active command:
type -a codexThe first result should be:
/home/YOUR_USERNAME/.local/bin/codex
Launch Codex normally:
codexWhen an update is available, the wrapper displays:
Codex update available: 0.145.0 -> 0.146.0
Update now with npm install -g @openai/codex@latest? [Y/n]
Press Enter or type y to update. Type n to launch the currently installed version.
All command-line arguments are forwarded to the official Codex executable:
codex --help
codex --versionCODEX_SKIP_AUTO_UPDATE_PROMPT=1 codexCODEX_UPSTREAM=/path/to/codex codexDo not point CODEX_UPSTREAM to the wrapper itself, as that would create a launch loop.
Remove the wrapper:
rm "$HOME/.local/bin/codex"This does not uninstall the official Codex CLI. To uninstall that separately:
npm uninstall -g @openai/codexThis project is available for personal and noncommercial use under the PolyForm Noncommercial License 1.0.0.
Commercial use requires a separate written commercial license from DevilsNerve. Contact @DevilsNerve for commercial licensing.
This is an independent community wrapper and is not an official OpenAI project.