___ __ ___ __ __ _ ___
/ _ \___ _/ /_/ _ \___ _/ /_ / /_____(_)__ ___ _______ ___/ (_)__ ___ _
/ // / _ `/ __/ , _/ _ `/ __/ / __/ __/ / -_|_-< / __/ _ \/ _ / / _ \/ _ `/
/____/\_,_/\__/_/|_|\_,_/\__/ \__/_/ /_/\__/___/ \__/\___/\_,_/_/_//_/\_, /
/___/
Source · Dependencies · Usage · Versions · License · Contributing · Notes
Build an AppImage for the OpenAI Codex desktop app on Linux.
The script downloads the upstream Codex desktop archive, extracts the Electron app payload, rebuilds native Node modules for Linux/Electron, downloads Linux Electron, and packages everything into an AppImage.
Tested on Arch Linux. Fedora, Debian/Ubuntu, and NixOS instructions are provided, but still need real-world verification.
- Codex desktop archive:
https://persistent.oaistatic.com/codex-app-prod/Codex-darwin-arm64-26.429.61741.zip - Electron runtime:
electron-v39.5.2-linux-x64.zip - Native modules:
better-sqlite3 12.8.0,node-pty 1.1.0 - Tested Codex CLI:
openai-codex 0.129.0
You need:
- Bash
- curl
- libarchive/bsdtar
- libicns/icns2png
- Node.js, npm, npx
- Python
- C/C++ build tools
- appimagetool
- Codex CLI in
PATH, optional but recommended
The script bundles the Codex CLI if codex is found in PATH. Otherwise the AppImage will try to use codex from the host at runtime.
sudo pacman -S --needed base-devel curl libarchive libicns nodejs npm python
yay -S --needed appimagetool-bin openai-codexsudo dnf install @development-tools curl libarchive libicns nodejs npm python3Install appimagetool from your preferred source, for example the AppImage project release binary, and make sure it is in PATH.
Install the Codex CLI separately if you want it bundled:
npm install -g @openai/codexsudo apt update
sudo apt install build-essential curl libarchive-tools icnsutils nodejs npm python3Install appimagetool from your preferred source, for example the AppImage project release binary, and make sure it is in PATH.
Install the Codex CLI separately if you want it bundled:
npm install -g @openai/codexExample shell:
nix shell nixpkgs#bash nixpkgs#curl nixpkgs#libarchive nixpkgs#libicns nixpkgs#nodejs nixpkgs#python3 nixpkgs#gcc nixpkgs#gnumake nixpkgs#pkg-config nixpkgs#appimagetoolInstall the Codex CLI separately if you want it bundled:
npm install -g @openai/codexClone the repo:
git clone https://github.com/DatRatVS/codex-appimage.git
cd codex-appimageInstall the dependencies for your distro from the section above, then build:
./build-codex-appimage.shThis uses the pinned stable Codex desktop archive.
To build with the newest Codex desktop archive listed in OpenAI's appcast:
./build-codex-appimage.sh bleeding-edgebleeding-edge only changes the Codex desktop archive. Electron, native module versions, and rebuild settings remain pinned by the script.
Output:
dist/OpenAI-Codex-x86_64.AppImage
The script uses .build/ for downloads and intermediate files, and Codex.AppDir/ for the generated AppDir.
Run it:
chmod +x dist/OpenAI-Codex-x86_64.AppImage
./dist/OpenAI-Codex-x86_64.AppImageOverride versions with environment variables:
CODEX_VERSION=26.429.61741 \
ELECTRON_VERSION=39.5.2 \
./build-codex-appimage.shThe default stable mode uses the pinned CODEX_VERSION and checksum. The bleeding-edge mode fetches the latest Codex desktop archive URL from:
https://persistent.oaistatic.com/codex-app-prod/appcast.xml
Because the latest archive changes over time, bleeding-edge skips the Codex archive checksum unless you provide one manually through CODEX_SHA256.
This repository's build script and documentation are licensed under the MIT License. See LICENSE.
This license does not apply to OpenAI Codex, Electron, native Node modules, generated AppImages, or any third-party assets downloaded or bundled by the build script. Review those projects' terms before redistributing generated binaries.
Windows or macOS Codex installs cannot be converted directly into this AppImage. The AppImage must be built from Linux-compatible files, including Linux native modules and a Linux Electron runtime.
Check OpenAI's terms and the licenses for bundled components before redistributing generated binaries.