@mmmbuto/codex-cli-termux 0.53.1-termux → 0.55.0-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 +12 -3
- package/bin/codex +0 -0
- package/bin/codex.js +66 -0
- package/package.json +8 -5
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @mmmbuto/codex-cli-termux
|
|
2
2
|
|
|
3
|
-
> OpenAI Codex CLI v0.
|
|
3
|
+
> OpenAI Codex CLI v0.55.0 pre-compiled for Android Termux (ARM64)
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 🎉 v0.55.0 - Upstream Upgrade
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Based on upstream OpenAI Codex 0.55.0 (46 commits ahead of 0.53.0)
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -19,6 +19,14 @@ codex login
|
|
|
19
19
|
codex
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
## What's New in 0.55.0
|
|
23
|
+
|
|
24
|
+
- Upgraded to upstream Codex 0.55.0
|
|
25
|
+
- Follow symlinks during file search
|
|
26
|
+
- Improved reasoning token handling
|
|
27
|
+
- DNS fixes and stability improvements
|
|
28
|
+
- All Termux patches maintained
|
|
29
|
+
|
|
22
30
|
## Requirements
|
|
23
31
|
|
|
24
32
|
- Android 7+ (Termux)
|
|
@@ -34,6 +42,7 @@ This is a pre-compiled build of the official OpenAI Codex CLI with minimal patch
|
|
|
34
42
|
- **GitHub**: https://github.com/DioNanos/codex-termux
|
|
35
43
|
- **Upstream**: https://github.com/openai/codex
|
|
36
44
|
- **Documentation**: https://github.com/DioNanos/codex-termux#readme
|
|
45
|
+
- **Patches**: https://github.com/DioNanos/codex-termux/blob/main/patches/README.md
|
|
37
46
|
|
|
38
47
|
## License
|
|
39
48
|
|
package/bin/codex
CHANGED
|
Binary file
|
package/bin/codex.js
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mmmbuto/codex-cli-termux",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "OpenAI Codex CLI v0.
|
|
5
|
-
"
|
|
3
|
+
"version": "0.55.0-termux",
|
|
4
|
+
"description": "OpenAI Codex CLI v0.55.0 for Termux (Android ARM64)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "bin/codex.js",
|
|
6
7
|
"bin": {
|
|
7
|
-
"codex": "bin/codex"
|
|
8
|
+
"codex": "bin/codex.js"
|
|
8
9
|
},
|
|
9
10
|
"files": [
|
|
11
|
+
"bin/codex.js",
|
|
10
12
|
"bin/codex"
|
|
11
13
|
],
|
|
12
14
|
"keywords": [
|
|
@@ -16,7 +18,8 @@
|
|
|
16
18
|
"android",
|
|
17
19
|
"arm64",
|
|
18
20
|
"cli",
|
|
19
|
-
"ai"
|
|
21
|
+
"ai",
|
|
22
|
+
"coding-agent"
|
|
20
23
|
],
|
|
21
24
|
"author": "Davide A. Guglielmi <dev@mmmbuto.com>",
|
|
22
25
|
"license": "Apache-2.0",
|