@mmmbuto/codex-cli-termux 0.55.3-termux → 0.55.5-termux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,16 +1,24 @@
1
1
  # @mmmbuto/codex-cli-termux
2
2
 
3
- > OpenAI Codex CLI v0.55.0 pre-compiled for Android Termux (ARM64)
3
+ OpenAI Codex CLI v0.55.4 pre-compiled for Android Termux (ARM64)
4
4
 
5
- ## 🔧 v0.55.1 - Auto-Update Detection Fix
5
+ ## 🔧 v0.55.4 - Agent Mode Bash Execution Fix (Patch #8)
6
6
 
7
- **Critical fix**: Version parser now correctly detects updates with `-termux` suffix
7
+ **Critical fix for Termux/Android**: Codex Agent can now execute bash commands correctly
8
8
 
9
9
  ### What was broken
10
- Users on 0.53.x versions never saw update notifications for 0.55.0-termux
10
+ - Bash commands in Agent mode failed with "Permission denied"
11
+ - Affected all Termux installations (issue existed since upstream)
11
12
 
12
13
  ### What's fixed
13
- Auto-update detection now works correctly across all version ranges
14
+ - Disabled unsupported sandbox on Android (landlock/seccomp)
15
+ - ✅ Preserved LD_* environment variables required by Termux
16
+ - ✅ Fixed shell detection to use $SHELL instead of getpwuid()
17
+
18
+ ### Impact
19
+ Agent mode now works fully on Termux - can execute pkg, git, npm, and all bash commands.
20
+
21
+ ---
14
22
 
15
23
  ## Installation
16
24
 
@@ -21,33 +29,29 @@ npm install -g @mmmbuto/codex-cli-termux
21
29
  ## Usage
22
30
 
23
31
  ```bash
24
- codex login
25
- codex
32
+ codex --help
33
+ codex --version
34
+ codex login # Authenticate with OpenAI
35
+ codex # Start interactive Agent mode
26
36
  ```
27
37
 
28
38
  ## Requirements
29
39
 
30
- - Android 7+ (Termux)
31
- - ARM64 architecture
32
- - Node.js ≥ 14.0.0
40
+ - **Platform**: Android with Termux
41
+ - **Architecture**: ARM64
42
+ - **Node.js**: ≥ 14.0.0
33
43
 
34
- ## About
44
+ ## Source
35
45
 
36
- This is a pre-compiled build of the official OpenAI Codex CLI with minimal patches for Termux compatibility.
46
+ This package contains a pre-compiled binary of [OpenAI Codex](https://github.com/openai/codex) for ARM64 Termux.
37
47
 
38
- ### Total Patches Applied: 5
39
- 1. Browser login fix (termux-open-url)
40
- 2. RAM optimizations (compilation settings)
41
- 3. Version alignment
42
- 4. Auto-update URL redirect
43
- 5. **Version parser fix** (NEW in 0.55.1)
48
+ - **Upstream**: [github.com/openai/codex](https://github.com/openai/codex)
49
+ - **Fork**: [github.com/DioNanos/codex-termux](https://github.com/DioNanos/codex-termux)
44
50
 
45
- ## Links
51
+ ## License
46
52
 
47
- - **GitHub**: https://github.com/DioNanos/codex-termux
48
- - **Upstream**: https://github.com/openai/codex
49
- - **Patches**: https://github.com/DioNanos/codex-termux/blob/main/patches/README.md
53
+ Apache 2.0 - See [LICENSE](https://github.com/DioNanos/codex-termux/blob/main/LICENSE)
50
54
 
51
- ## License
55
+ ## Maintainer
52
56
 
53
- Apache-2.0 (same as upstream OpenAI Codex)
57
+ Davide A. Guglielmi <dev@mmmbuto.com>
package/bin/codex CHANGED
Binary file
package/package.json CHANGED
@@ -1,25 +1,21 @@
1
1
  {
2
2
  "name": "@mmmbuto/codex-cli-termux",
3
- "version": "0.55.3-termux",
4
- "description": "OpenAI Codex CLI v0.55.3 - Complete auto-update fix for Termux (Android ARM64)",
5
- "type": "module",
6
- "main": "bin/codex.js",
3
+ "version": "0.55.5-termux",
4
+ "description": "OpenAI Codex CLI v0.55.5 - Agent mode fully working on Termux (Android ARM64)",
5
+ "main": "bin/codex",
7
6
  "bin": {
8
- "codex": "bin/codex.js"
7
+ "codex": "./bin/codex"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "echo '✅ @mmmbuto/codex-cli-termux installed successfully'"
9
11
  },
10
- "files": [
11
- "bin/codex.js",
12
- "bin/codex"
13
- ],
14
12
  "keywords": [
15
13
  "codex",
16
14
  "openai",
17
15
  "termux",
18
16
  "android",
19
17
  "arm64",
20
- "cli",
21
- "ai",
22
- "coding-agent"
18
+ "cli"
23
19
  ],
24
20
  "author": "Davide A. Guglielmi <dev@mmmbuto.com>",
25
21
  "license": "Apache-2.0",
@@ -27,18 +23,18 @@
27
23
  "type": "git",
28
24
  "url": "https://github.com/DioNanos/codex-termux.git"
29
25
  },
30
- "homepage": "https://github.com/DioNanos/codex-termux#readme",
31
26
  "bugs": {
32
27
  "url": "https://github.com/DioNanos/codex-termux/issues"
33
28
  },
34
- "engines": {
35
- "node": ">=14.0.0"
36
- },
29
+ "homepage": "https://github.com/DioNanos/codex-termux#readme",
37
30
  "os": [
38
- "android",
39
- "linux"
31
+ "linux",
32
+ "android"
40
33
  ],
41
34
  "cpu": [
42
35
  "arm64"
43
- ]
36
+ ],
37
+ "engines": {
38
+ "node": ">=14.0.0"
39
+ }
44
40
  }
package/bin/codex.js DELETED
@@ -1,66 +0,0 @@
1
- #!/usr/bin/env node
2
- // Wrapper for Codex CLI on Termux (Android ARM64)
3
- // Sets CODEX_MANAGED_BY_NPM=1 to enable auto-update functionality
4
-
5
- import { spawn } from "node:child_process";
6
- import path from "node:path";
7
- import { fileURLToPath } from "node:url";
8
-
9
- // Get directory of this script
10
- const __filename = fileURLToPath(import.meta.url);
11
- const __dirname = path.dirname(__filename);
12
-
13
- // Path to the Rust binary
14
- const binaryPath = path.join(__dirname, "codex");
15
-
16
- // Set environment variable to enable npm auto-update
17
- const env = {
18
- ...process.env,
19
- CODEX_MANAGED_BY_NPM: "1",
20
- };
21
-
22
- // Spawn the Rust binary with all arguments
23
- const child = spawn(binaryPath, process.argv.slice(2), {
24
- stdio: "inherit",
25
- env,
26
- });
27
-
28
- // Handle spawn errors (e.g., binary not found or not executable)
29
- child.on("error", (err) => {
30
- console.error("Failed to start Codex:", err.message);
31
- process.exit(1);
32
- });
33
-
34
- // Forward termination signals to child process
35
- const forwardSignal = (signal) => {
36
- if (child.killed) {
37
- return;
38
- }
39
- try {
40
- child.kill(signal);
41
- } catch {
42
- /* ignore */
43
- }
44
- };
45
-
46
- ["SIGINT", "SIGTERM", "SIGHUP"].forEach((sig) => {
47
- process.on(sig, () => forwardSignal(sig));
48
- });
49
-
50
- // Wait for child to exit and mirror its exit status
51
- const childResult = await new Promise((resolve) => {
52
- child.on("exit", (code, signal) => {
53
- if (signal) {
54
- resolve({ type: "signal", signal });
55
- } else {
56
- resolve({ type: "code", exitCode: code ?? 1 });
57
- }
58
- });
59
- });
60
-
61
- // Exit with same code/signal as child
62
- if (childResult.type === "signal") {
63
- process.kill(process.pid, childResult.signal);
64
- } else {
65
- process.exit(childResult.exitCode);
66
- }