Package Details: openai-codex 0.16.0-1

Git Clone URL: https://aur.archlinux.org/openai-codex.git (read-only, click to copy)
Package Base: openai-codex
Description: Lightweight coding agent that runs in your terminal
Upstream URL: https://github.com/openai/codex
Keywords: agent ai llm
Licenses: Apache-2.0
Submitter: cg505
Maintainer: cg505
Last Packager: cg505
Votes: 4
Popularity: 1.38
First Submitted: 2025-04-16 19:44 (UTC)
Last Updated: 2025-08-07 18:53 (UTC)

Dependencies (3)

Required by (0)

Sources (1)

Pinned Comments

cg505 commented on 2025-07-22 18:02 (UTC)

This package has been updated to compile the new rust version of codex from scratch. If you want to save on compile time and use the prebuilt binaries from openai, please use the openai-codex-bin package!

Latest Comments

cg505 commented on 2025-07-22 18:02 (UTC)

This package has been updated to compile the new rust version of codex from scratch. If you want to save on compile time and use the prebuilt binaries from openai, please use the openai-codex-bin package!

jackmhny commented on 2025-07-21 20:52 (UTC)

just pushed https://aur.archlinux.org/packages/openai-codex-bin and no thank you in regard to co-maintain im pretty new to maintaining anyway. good luck w the cargo build!

cg505 commented on 2025-07-21 17:55 (UTC)

Testing the proposed cargo build patch. Also, @jackmhny, lmk if you want to be a co-maintainer.

cg505 commented on 2025-07-21 05:42 (UTC)

@jackmhny Thank you! Yes, I think you should submit this as openai-codex-bin. Feel free.

The non-bin package (this one) should compile the rust from source (e.g. cargo build). That's just what I haven't gotten a chance to figure out.

jackmhny commented on 2025-07-21 05:16 (UTC)

I've created a patch that switches from the npm package to using the pre-compiled binaries directly from the GitHub releases.

This updates the package to v0.8.0 and removes the nodejs and npm dependencies. I've tested this on x86_64 and it works perfectly. I don't have an aarch64 device, so I wasn't able to test that architecture, but it should work correctly as the logic is the same.

Here is the patch:

---
 PKGBUILD | 35 ++++++++++++++++++++++++++++-------
 1 file changed, 28 insertions(+), 7 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD
index 65bdc55..edad8a9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,21 +1,42 @@
 # Maintainer: Christopher Cooper <christopher@cg505.com>
 pkgname=openai-codex
-pkgver=0.7.0
+pkgver=0.8.0
 pkgrel=1
 pkgdesc="Lightweight coding agent that runs in your terminal"
 arch=('x86_64' 'aarch64')
 url="https://github.com/openai/codex"
 license=('Apache-2.0')
-depends=('nodejs')
-makedepends=('npm')
+depends=()
+makedepends=()
 optdepends=(
    'git'
    'ripgrep: accelerated large-repo search'
 )
-source=("https://registry.npmjs.org/@openai/codex/-/codex-$pkgver.tgz")
-b2sums=('ba4046764fe40d44da8a644d177e4ca5efc6ad58edd6beafb509bbba329842ca8ef118b090dbef390af7bc7de38c900ebbad5a67319cd23f112dfba8554f3805')
-noextract=("codex-${pkgver}.tgz")
+
+source_x86_64=(
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-x86_64-unknown-linux-musl.tar.gz"
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-exec-x86_64-unknown-linux-musl.tar.gz"
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-linux-sandbox-x86_64-unknown-linux-musl.tar.gz"
+)
+sha256sums_x86_64=(
+    'db86033cf86489bf47e6a5309ae5276497709b60ecb51596a475ac070c9c17f0'
+    '3e02ef37e6a352286a7ab2ed27a6f8c781f552ea9e4ca8a35238066c4d56db48'
+    '691095a4e1db54ef7030ef89ca787bf1d37a22d8308c51a2b4984b220c001b01'
+)
+
+source_aarch64=(
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-aarch64-unknown-linux-musl.tar.gz"
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-exec-aarch64-unknown-linux-musl.tar.gz"
+    "https://github.com/openai/codex/releases/download/rust-v${pkgver}/codex-linux-sandbox-aarch64-unknown-linux-musl.tar.gz"
+)
+sha256sums_aarch64=(
+    'b42788e4da013d3c94c87210c367f49241455b5638f0a28850ce050403d1e34f'
+    'd9daea8e7e660dd4ff15e5202768b0d13808c44269b8e029436fddf95a136f49'
+    'c58ccb799b09f23481ea3df5c5bdc14db090eb32b11870432ab8388ef2baccec'
+)

 package() {
-   npm install -g --prefix "${pkgdir}/usr" "${srcdir}/codex-${pkgver}.tgz"
+    install -Dm755 "${srcdir}/codex-${CARCH}-unknown-linux-musl" "${pkgdir}/usr/bin/codex"
+    install -Dm755 "${srcdir}/codex-exec-${CARCH}-unknown-linux-musl" "${pkgdir}/usr/bin/codex-exec"
+    install -Dm755 "${srcdir}/codex-linux-sandbox-${CARCH}-unknown-linux-musl" "${pkgdir}/usr/bin/codex-linux-sandbox"
 }
--

One question for the maintainer: Since this now uses pre-compiled binaries, should I submit this as a new openai-codex-bin package to follow AUR conventions? That would also allow this current openai-codex package to be updated to build from source in the future using a system like

source=("git+${url}.git#tag=rust-v${pkgver}")
build() {
    cd "${srcdir}/${_pkgrepo}/codex-rs"
    cargo build --release --locked
}
package() {
    install -Dm755 "${srcdir}/${_pkgrepo}/codex-rs/target/release/codex" "${pkgdir}/usr/bin/codex"
    install -Dm755 "${srcdir}/${_pkgrepo}/codex-rs/target/release/codex-exec" "${pkgdir}/usr/bin/codex-exec"
    install -Dm755 "${srcdir}/${_pkgrepo}/codex-rs/target/release/codex-linux-sandbox" "${pkgdir}/usr/bin/codex-linux-sandbox"
}

cg505 commented on 2025-07-09 23:35 (UTC) (edited on 2025-07-22 18:01 (UTC) by cg505)

edit 2025-07-22: this is fixed Heads up - this package has yet to be updated to build the new Rust version and is still installing from npm. It seems OpenAI is shipping the prebuilt binary in the published npm package lol.

If you want to figure out how to fix the PKGBUILD to build the rust package from source, contributions are welcome (I'm not sure when I will get to it). Feel free to post in the comments or email me.

arch-lsf commented on 2025-05-27 04:18 (UTC)

错误:无法从 mirrors.aliyun.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirrors.aliyun.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 singapore.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 singapore.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 taipei.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 taipei.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 losangeles.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 losangeles.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 sydney.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 sydney.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 mirror.ams1.nl.leaseweb.net : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 america.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.ams1.nl.leaseweb.net : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 america.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 arch.mirror.constant.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 arch.mirror.constant.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 geo.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 geo.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 london.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 london.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.ufscar.br : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.ufscar.br : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 johannesburg.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 johannesburg.mirror.pkgbuild.com : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.lcarilla.de : Connection timed out after 10000 milliseconds 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 mirror.lcarilla.de : Connection timed out after 10000 milliseconds 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.ubrco.de : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.ubrco.de : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 mirror.sfo12.us.leaseweb.net : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 mirror.sfo12.us.leaseweb.net : The requested URL returned error: 404 获取文件 'npm-11.3.0-1-any.pkg.tar.zst' 错误:无法从 mirror.wdc1.us.leaseweb.net : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 mirror.xtom.com.hk : The requested URL returned error: 403 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 错误:无法从 arch.phinau.de : The requested URL returned error: 404 获取文件 'semver-7.7.1-1-any.pkg.tar.zst' 警告:无法获取某些文件