Codex Termux
August 10, 2026 ยท View on GitHub
Native Codex CLI for Termux / Android ARM64. This fork tracks upstream OpenAI Codex main and carries only the Android/Termux compatibility delta needed to package and run it.
Install
Termux (Android ARM64)
pkg update && pkg upgrade -y
pkg install nodejs-lts -y
npm install -g @mmmbuto/codex-cli-termux@latest
codex --version
codex login
Requirements:
- Android 10+ / API 29+ (the release binary is built with the API 29 NDK target)
- ARM64 device
- Node.js >= 18
Scope
What this fork does:
- tracks upstream OpenAI Codex closely
- builds native Android ARM64 binaries for Termux
- applies only the compatibility patches upstream does not ship
- publishes GitHub release assets and an npm package for Termux users
What this fork does not do:
- maintain a broad feature fork
- replace upstream Codex
- carry fork-only product features unrelated to Termux compatibility
Current Termux Delta
- browser login uses
termux-open-url - self-update points to
DioNanos/codex-termuxand@mmmbuto/codex-cli-termux - packaged wrappers set
CODEX_SELF_EXEto the native ELF, sanitizeLD_LIBRARY_PATH, and bundlelibc++_shared.so - Android binaries are linked with
RUNPATH=$ORIGIN exec/code-mode now runs for real on Android via the in-process V8 runtime (no longer a stub) - the meaningful capability gain on Termux- realtime voice/audio is no longer part of this build: upstream removed the TUI realtime voice feature (openai/codex#27801), so the fork's Android cpal/oboe enablement toggle (never usable from the Termux CLI anyway, as the backend needs an Android JavaVM/Activity) was dropped with it. Termux-native audio remains tracked on the Codex VL roadmap.
- Android PTY and lock-handling compatibility patches remain enabled where upstream behavior still breaks on Bionic/Termux
Releases and Updates
- Latest GitHub release: releases/latest
- Upstream base: OpenAI Codex
rust-v0.147.0, published as0.147.0on the npmlatestchannel with a matching GitHub tag and release. - npm package:
@mmmbuto/codex-cli-termux - Legacy
@mmmbuto/codex-cli-lts(OpenAI Codex 0.80.x) is archived; current builds live in this package or in@mmmbuto/codex-vl(multi-platform).
Maintainer publish flow:
- build the exact sanitized candidate with GitHub Actions and audit its immutable npm tarball
- land the validated full tree on
develop - publish that unchanged tarball to
next - promote the tested sanitized commit to clean GitHub
main - point
latestandnextat the stable version, then publish the annotated tag and GitHub release frommain - publish a post-release Termux device-validation summary
Documentation
- Changelog
- Patch inventory
- Building from source
- On-device validation of
0.147.0on a physical Termux install is still outstanding; in particular the TLS trust store, since the Termux-specific root handling was retired when upstream removed the client it wrapped. - Install docs
- Authentication
- Configuration
Security
This is a community fork of OpenAI Codex. Security-relevant properties of this build:
- Network: agents bind to loopback by default; nothing is exposed externally unless you opt in.
- Supply chain: builds and releases come only from fork-owned CI and the
@mmmbuto/...npm scope. This package does not silently fetch or run the upstream installer; updates flow through the fork's own channel. - Termux: TLS trust uses bundled webpki roots (no Android platform-verifier dependency). The daemon, history, PATH-alias, installation-id, and policy lock sites that are safe to run without advisory exclusion degrade only when the filesystem reports locking as unsupported; credential and certificate transactions remain fail-closed.
For sensitive work, prefer the official Codex CLI on Linux/macOS over SSH.
To report a vulnerability, see SECURITY.md.
Community guides
- OpenAI Codex CLI on Android via Termux, an independent third-party walkthrough covering Termux setup, the Bionic-libc incompatibility this package solves, and a small Hono test project.
License
This project remains under the Apache 2.0 license inherited from OpenAI Codex.
- Original work: OpenAI
- Termux port: minimal Android compatibility patches
See LICENSE.