@mmmbuto/codex-cli-termux 0.80.0-termux → 0.86.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.
Files changed (3) hide show
  1. package/README.md +69 -76
  2. package/bin/codex +0 -0
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -13,16 +13,16 @@
13
13
  Built from upstream OpenAI Codex source, compiled for Android Termux. Since Termux is not officially supported by upstream, we apply minimal patches only for critical compatibility issues.
14
14
 
15
15
  ### What We Do:
16
- ✅ **Use official OpenAI Codex source** (https://github.com/openai/codex)
17
- ✅ **Compile for ARM64** (Android Termux native)
18
- ✅ **Apply minimal patches** only for Termux-specific issues not addressed upstream
19
- ✅ **Package as npm** for easy installation
20
- ✅ **Maintain full Apache 2.0 compliance** with OpenAI attribution
16
+ ✅ **Use official OpenAI Codex source** (https://github.com/openai/codex)
17
+ ✅ **Compile for ARM64** (Android Termux native)
18
+ ✅ **Apply minimal patches** only for Termux-specific issues not addressed upstream
19
+ ✅ **Package as npm** for easy installation
20
+ ✅ **Maintain full Apache 2.0 compliance** with OpenAI attribution
21
21
 
22
22
  ### What We DON'T Do:
23
- ❌ **NO new features**
24
- ❌ **NO behavior modifications** (works exactly like upstream)
25
- ❌ **NO replacement** of official Codex
23
+ ❌ **NO new features**
24
+ ❌ **NO behavior modifications** (works exactly like upstream)
25
+ ❌ **NO replacement** of official Codex
26
26
 
27
27
  ### 🔧 Compatibility Patches
28
28
 
@@ -52,7 +52,7 @@ pkg install nodejs-lts -y
52
52
 
53
53
  # Verify
54
54
  node --version # v18+ (recommended v22+)
55
- npm --version # v6+
55
+ npm --version # v9+
56
56
  ```
57
57
 
58
58
  **Requirements:**
@@ -71,11 +71,35 @@ npm --version # v6+
71
71
  npm install -g @mmmbuto/codex-cli-termux
72
72
  ```
73
73
 
74
+ ### Version policy (Stable vs Latest)
75
+
76
+ For now we keep **two tracks**:
77
+
78
+ - **Stable:** `0.80.0-termux` (recommended for reliability on Termux)
79
+ - **Latest:** newer upstream-based releases (e.g. `0.86.0-termux` and above)
80
+
81
+ Install a specific version when needed:
82
+
83
+ ```bash
84
+ # Stable (known-good)
85
+ npm install -g @mmmbuto/codex-cli-termux@0.80.0-termux
86
+
87
+ # Latest (tracks upstream)
88
+ npm install -g @mmmbuto/codex-cli-termux@latest
89
+ ```
90
+
91
+ Tip: check what npm considers “latest”:
92
+
93
+ ```bash
94
+ npm view @mmmbuto/codex-cli-termux dist-tags
95
+ npm view @mmmbuto/codex-cli-termux versions --json
96
+ ```
97
+
74
98
  ### Verify Installation
75
99
 
76
100
  ```bash
77
101
  codex --version
78
- # Output: codex-cli 0.80.0-termux
102
+ # Example: codex-cli 0.80.0-termux
79
103
 
80
104
  codex login
81
105
  # Opens browser for authentication
@@ -90,41 +114,19 @@ codex login
90
114
  ---
91
115
 
92
116
  ## ⚡ 2-Minute Quickstart / ⚡ 2分钟快速开始
117
+
93
118
  Get a first session running fast. Choose the path that matches your account.
94
119
  快速完成首次运行。选择与你的账号/网关匹配的路径。
95
120
 
96
121
  ### Path 1 — OpenAI (default)
122
+
97
123
  ```bash
98
124
  codex login
99
125
  codex
100
126
  ```
101
127
 
102
- ### Path 2 — GLM-4.7 (Zhipu ZAI) / GLM-4.7 (智谱 ZAI)
103
- Use Zhipu's GLM-4.7 model optimized for coding scenarios.
104
- 使用智谱的 GLM-4.7 模型(专为编程场景优化)。
128
+ ### Path 2 — OpenRouter & OpenAI-compatible gateways / OpenRouter 与兼容网关
105
129
 
106
- **Quick setup / 快速配置:**
107
- ```bash
108
- # 1. Add API key to ~/.zshrc (bash users: use ~/.bashrc)
109
- echo 'export ZAI_API_KEY="your-zai-api-key"' >> ~/.zshrc
110
-
111
- # 2. Add alias for GLM-4.7
112
- cat >> ~/.zshrc << 'ALIAS_EOF'
113
-
114
- # Codex CLI with GLM-4.7 (Coding Plan - dedicated endpoint)
115
- alias codex-glm='OPENAI_API_KEY="$ZAI_API_KEY" codex -m "GLM-4.7" -c model_provider="zai"'
116
- ALIAS_EOF
117
-
118
- # 3. Reload shell and test
119
- source ~/.zshrc
120
- codex-glm "Say hello in Chinese"
121
- ```
122
-
123
- If your ZAI setup requires a base URL, export `OPENAI_BASE_URL=...` — see [docs/GLM4.7-quickstart.md](./docs/GLM4.7-quickstart.md).
124
-
125
- **Full docs / 完整文档:** [docs/GLM4.7-quickstart.md](./docs/GLM4.7-quickstart.md)
126
-
127
- ### Path 3 — OpenRouter & gateways / OpenRouter 与兼容网关
128
130
  For OpenRouter or other OpenAI-compatible providers.
129
131
  适用于 OpenRouter 或其他 OpenAI 兼容的提供商。
130
132
 
@@ -136,20 +138,26 @@ source ~/.codex/.env
136
138
  codex --profile or-fast
137
139
  ```
138
140
 
139
- Caution: model slugs/names can change on providers—verify the current model list first.
141
+ Caution: model slugs/names can change on providers—verify the current model list first.
140
142
  注意:模型名称可能变化,请以提供商模型列表为准。
141
143
 
144
+ #### Gateways that don’t fully match Codex “Responses API” (Codex > 0.80.0)
145
+
146
+ Some gateways may not fully implement the endpoints/event-stream format expected by newer Codex versions.
147
+ If you see issues like unexpected 404/502 on `/v1/responses`, use the community bridge proxy:
148
+
149
+ - **zai-codex-bridge**: https://github.com/DioNanos/zai-codex-bridge
150
+
151
+ This keeps **codex-termux** minimal (no behavior changes) while allowing compatibility fixes to live in a separate project.
152
+
142
153
  ---
143
154
 
144
155
  ## 🧭 OpenRouter & gateways note / 🧭 OpenRouter 与兼容网关说明
145
- This Termux port only adds Android compatibility; it does not change Codex behavior.
146
- 本 Termux 版本仅提供 Android 兼容性,不改变 Codex 行为。
147
- Providers/models are determined by your own config and backend.
148
- 提供商与模型由你的配置与后端决定。
149
156
 
150
- For detailed setup guides, see:
151
- - **GLM-4.7**: [docs/GLM4.7-quickstart.md](./docs/GLM4.7-quickstart.md)
152
- - **OpenRouter**: [docs/openrouter-quickstart.md](./docs/openrouter-quickstart.md)
157
+ This Termux port only adds Android compatibility; it does not change Codex behavior.
158
+ Termux 版本仅提供 Android 兼容性,不改变 Codex 行为。
159
+ Providers/models are determined by your own config and backend.
160
+ 提供商与模型由你的配置与后端决定。
153
161
 
154
162
  ---
155
163
 
@@ -204,25 +212,31 @@ See the [Execpolicy quickstart](./docs/execpolicy.md) to set up rules that gover
204
212
  ---
205
213
 
206
214
  ## 🔧 Troubleshooting (Termux) / 🔧 故障排查(Termux)
215
+
207
216
  Common Termux issues and the fastest places to check.
208
217
  常见 Termux 问题与最快排查入口。
209
218
 
210
219
  - Upgrade alerts or shared library errors: see [docs/termux-upgrade-checks.md](./docs/termux-upgrade-checks.md)
211
220
  - Basic usage/setup: see [docs/getting-started.md](./docs/getting-started.md)
212
221
  - Authentication/login problems: see [docs/authentication.md](./docs/authentication.md)
213
- - GLM-4.7 setup: see [docs/GLM4.7-quickstart.md](./docs/GLM4.7-quickstart.md)
222
+ - Provider/gateway incompatibilities on **Codex > 0.80.0**: use **zai-codex-bridge** (link above)
214
223
  - Still stuck? Open an issue with repro steps: [GitHub Issues](https://github.com/DioNanos/codex-termux/issues)
215
224
 
216
225
  ---
217
226
 
218
227
  ## 🧪 Testing & Validation
219
228
 
220
- Latest validation (2026-01-10): 49 passed / 0 failed / 0 skipped — see [CODEX_TEST_REPORT_v0.80.0.md](./CODEX_TEST_REPORT_v0.80.0.md).
229
+ Stable validation (2026-01-10): 49 passed / 0 failed / 0 skipped — see [CODEX_TEST_REPORT_v0.80.0.md](./CODEX_TEST_REPORT_v0.80.0.md).
230
+
231
+ ## 🧪 Testing & Validation
232
+
233
+ Latest validation (2026-01-16): 49 passed / 0 failed / 0 skipped — see [CODEX_TEST_REPORT_v0.80.0.md](./CODEX_TEST_REPORT_v0.86.0.md).
221
234
 
222
235
  <details>
223
236
  <summary>Details: automated test suite, coverage, and sample report</summary>
224
237
 
225
238
  ### Automated Test Suite
239
+
226
240
  [CODEX_TEST_SUITE.md](./CODEX_TEST_SUITE.md) - Universal test suite compatible with all Codex versions
227
241
 
228
242
  **Coverage**:
@@ -276,33 +290,13 @@ Codex will automatically:
276
290
  - ✅ Browser opener availability (Patch #1 validation)
277
291
  - ✅ Architecture detection (aarch64/ARM64)
278
292
 
279
- **Suite size**: 82 tests defined (includes optional/manual). Automated run on Termux executes 49 applicable tests; last run (2026-01-10) completed with 47 / 0 ❌ / 2 ⚠️ skipped (WebSearch unavailable, git info skipped in non-repo workspace).
293
+ **Suite size**: 82 tests defined (includes optional/manual). Automated run on Termux executes the applicable subset; see the report linked above for the last run.
280
294
 
281
295
  **Success Criteria**:
282
296
  - All System, Files, Shell, and Termux tests must pass
283
297
  - At least 80% overall pass rate
284
298
  - No critical crashes
285
299
 
286
- **Example Report** (v0.80.0-termux, 2026-01-10):
287
- ```
288
- CODEX CLI TEST SUITE - FINAL REPORT
289
- ====================================
290
- Platform: Android Termux ARM64
291
- Codex Version: 0.80.0-termux
292
- Total Tests: 49
293
- ✅ Passed: 49
294
- ❌ Failed: 0
295
- ⚠️ Skipped: 0
296
- ✅ Passed: 47
297
- ❌ Failed: 0
298
- ⚠️ Skipped: 2 (WebSearch unavailable, git info skipped in non-repo workspace)
299
-
300
- Termux-Specific: 10/10 passed ✅
301
- Package & Binary: 8/8 passed ✅
302
-
303
- VERDICT: ✅ PASS
304
- ```
305
-
306
300
  </details>
307
301
 
308
302
  ---
@@ -313,7 +307,7 @@ VERDICT: ✅ PASS
313
307
  - [CLI usage](./docs/getting-started.md#cli-usage)
314
308
  - [Slash Commands](./docs/slash_commands.md)
315
309
  - [Running with a prompt as input](./docs/getting-started.md#running-with-a-prompt-as-input)
316
- - [Example prompts](./docs/getting-started.md#example-prompts)
310
+ - [Example prompts](./docs/getting-started.md#running-with-a-prompt-as-input)
317
311
  - [Custom prompts](./docs/prompts.md)
318
312
  - [Memory with AGENTS.md](./docs/getting-started.md#memory-with-agentsmd)
319
313
  - [**Configuration**](./docs/config.md)
@@ -348,10 +342,10 @@ See [BUILDING.md](./BUILDING.md) for compilation instructions.
348
342
  **Codex-Termux** is a community-maintained port enabling AI-powered coding on Android Termux.
349
343
 
350
344
  **Maintenance activities:**
351
- - 🔨 **ARM64 compilation** - Building native binaries for each upstream release (~18min per build)
345
+ - 🔨 **ARM64 compilation** - Building native binaries for each upstream release
352
346
  - 🔄 **Upstream synchronization** - Tracking OpenAI Codex updates and merging changes
353
347
  - 🐛 **Compatibility patches** - Maintaining Android-specific fixes for Termux environment
354
- - 📱 **Device testing** - Verification on real ARM64 hardware (ARM64 flagship device, other devices)
348
+ - 📱 **Device testing** - Verification on real ARM64 hardware
355
349
  - 📚 **Documentation & support** - Maintaining docs, responding to GitHub issues
356
350
 
357
351
  **Time investment:** Approximately 20 hours per month for project upkeep.
@@ -364,7 +358,7 @@ See [BUILDING.md](./BUILDING.md) for compilation instructions.
364
358
 
365
359
  This project maintains full compliance with the Apache 2.0 license from OpenAI Codex.
366
360
 
367
- **Original work**: Copyright OpenAI (https://github.com/openai/codex)
361
+ **Original work**: Copyright OpenAI (https://github.com/openai/codex)
368
362
  **Termux port**: Minimal patches for Android compatibility
369
363
 
370
364
  See [LICENSE](./LICENSE) file for details.
@@ -379,18 +373,17 @@ See [LICENSE](./LICENSE) file for details.
379
373
 
380
374
  ---
381
375
 
382
- **Version**: Based on OpenAI Codex main (rust-v0.80.0) with Termux compatibility patches
383
- **Platform**: Android Termux ARM64
384
- **Maintained**: Community-driven, not affiliated with OpenAI
376
+ **Version**: Based on OpenAI Codex main (Termux-compatible builds)
377
+ **Platform**: Android Termux ARM64
378
+ **Maintained**: Community-driven, not affiliated with OpenAI
385
379
 
386
380
  ---
387
381
 
388
382
  ## 📜 Changelog
389
383
 
390
- Upstream Codex releases: https://github.com/openai/codex/releases
391
-
384
+ Upstream Codex releases: https://github.com/openai/codex/releases
392
385
  Termux-specific changes: see [CHANGELOG.md](./CHANGELOG.md).
393
386
 
394
387
  ---
395
388
 
396
- **Testing**: Comprehensive test suite v1.2 with 82 tests (incl. Termux + Package) in [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
389
+ **Testing**: Comprehensive test suite in [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
package/bin/codex CHANGED
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mmmbuto/codex-cli-termux",
3
- "version": "0.80.0-termux",
4
- "description": "OpenAI Codex CLI (upstream main, post rust-v0.80.0) packaged as 0.80.0-termux – TUI + automation for Android Termux (ARM64). Use 'codex' for TUI, 'codex exec --json' for automation.",
3
+ "version": "0.86.0-termux",
4
+ "description": "OpenAI Codex CLI (upstream main, post rust-v0.86.0) packaged as 0.86.0-termux – TUI + automation for Android Termux (ARM64). Use 'codex' for TUI, 'codex exec --json' for automation.",
5
5
  "type": "module",
6
6
  "main": "bin/codex.js",
7
7
  "bin": {