@mmmbuto/codex-cli-termux 0.91.0-termux → 0.93.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 CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  > **Built from upstream OpenAI Codex source, compiled for Android Termux (ARM64)**
4
4
 
5
- [![npm](https://img.shields.io/npm/v/@mmmbuto/codex-cli-termux?style=flat-square&logo=npm)](https://www.npmjs.com/package/@mmmbuto/codex-cli-termux)
6
- [![downloads](https://img.shields.io/npm/dt/@mmmbuto/codex-cli-termux?style=flat-square)](https://www.npmjs.com/package/@mmmbuto/codex-cli-termux)
5
+ [![npm](https://img.shields.io/npm/v/@mmmbuto/codex-cli-termux?style=flat-square&logo=npm)](https://www.npmjs.org/package/@mmmbuto/codex-cli-termux)
6
+ [![downloads](https://img.shields.io/npm/dt/@mmmbuto/codex-cli-termux?style=flat-square)](https://www.npmjs.org/package/@mmmbuto/codex-cli-termux)
7
7
  [![ko-fi](https://img.shields.io/badge/☕_Support-Ko--fi-FF5E5B?style=flat-square&logo=ko-fi)](https://ko-fi.com/dionanos)
8
8
 
9
9
  ---
@@ -12,17 +12,25 @@
12
12
 
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
+ ### Termux Edition (0.93.0)
16
+
17
+ This repo maintains **two release lines**:
18
+
19
+ - **Latest (main)**: Termux-only, tracks upstream more closely (current: **v0.93.0-termux** based on `rust-v0.93.0`).
20
+ - **LTS (lts)**: Long-term support based on upstream `rust-v0.80.0`, stable for compatibility.
21
+ The LTS line supports **both /chat and /responses** wire APIs, and receives **security and stability backports only**.
22
+
15
23
  ### 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
24
+ ✅ **Use official OpenAI Codex source** (https://github.com/openai/codex)
25
+ ✅ **Compile for ARM64** (Android Termux native)
26
+ ✅ **Apply minimal patches** only for Termux-specific issues not addressed upstream
27
+ ✅ **Package as npm** for easy installation
28
+ ✅ **Maintain full Apache 2.0 compliance** with OpenAI attribution
21
29
 
22
30
  ### What We DON'T Do:
23
- ❌ **NO new features**
24
- ❌ **NO behavior modifications** (works exactly like upstream)
25
- ❌ **NO replacement** of official Codex
31
+ ❌ **NO new features**
32
+ ❌ **NO behavior modifications** (works exactly like upstream)
33
+ ❌ **NO replacement** of official Codex
26
34
 
27
35
  ### 🔧 Compatibility Patches
28
36
 
@@ -31,10 +39,10 @@ We only apply patches for issues that:
31
39
  - **Are not addressed by upstream** (Termux is not officially supported)
32
40
  - **Are minimal and well-documented**
33
41
 
34
- **Current patches**: See [patches/](./patches/) directory for full documentation.
42
+ **Current patches**: See [patches/](../patches/) directory for full documentation.
35
43
 
36
44
  Need help debugging upgrade alerts? See
37
- [docs/termux-upgrade-checks.md](./docs/termux-upgrade-checks.md) for known causes
45
+ [docs/termux-upgrade-checks.md](../docs/termux-upgrade-checks.md) for known causes
38
46
  and fix strategies.
39
47
 
40
48
  **Found an issue?** Well-documented bug reports with reproduction steps are welcome! Open an [issue](https://github.com/DioNanos/codex-termux/issues).
@@ -71,24 +79,24 @@ npm --version # v9+
71
79
  npm install -g @mmmbuto/codex-cli-termux
72
80
  ```
73
81
 
74
- ### Version policy (Stable vs Latest)
82
+ ### Version policy (LTS vs Latest)
75
83
 
76
- For now we keep **two tracks**:
84
+ This repo maintains **two release lines**:
77
85
 
78
- - **Stable:** `0.80.0-termux` (recommended for reliability on Termux)
79
- - **Latest:** newer upstream-based releases (e.g. `0.88.0-termux` and above)
86
+ - **LTS:** `@mmmbuto/codex-cli-lts` - based on upstream `rust-v0.80.0`, stable for long-term compatibility
87
+ - **Latest:** `@mmmbuto/codex-cli-termux` - tracks upstream more closely (current: **v0.93.0-termux** based on `rust-v0.93.0`)
80
88
 
81
89
  Install a specific version when needed:
82
90
 
83
91
  ```bash
84
- # Stable (known-good)
85
- npm install -g @mmmbuto/codex-cli-termux@0.80.0-termux
92
+ # LTS (stable, long-term support)
93
+ npm install -g @mmmbuto/codex-cli-lts@latest
86
94
 
87
95
  # Latest (tracks upstream)
88
96
  npm install -g @mmmbuto/codex-cli-termux@latest
89
97
  ```
90
98
 
91
- Tip: check what npm considers latest”:
99
+ Tip: check what npm considers "latest":
92
100
 
93
101
  ```bash
94
102
  npm view @mmmbuto/codex-cli-termux dist-tags
@@ -99,68 +107,20 @@ npm view @mmmbuto/codex-cli-termux versions --json
99
107
 
100
108
  ```bash
101
109
  codex --version
102
- # Example: codex-cli 0.80.0-termux
110
+ # Output: codex-cli 0.93.0
103
111
 
104
112
  codex login
105
113
  # Opens browser for authentication
106
114
  ```
107
115
 
108
116
  **Links:**
109
- - npm: https://www.npmjs.com/package/@mmmbuto/codex-cli-termux
117
+ - npm: https://www.npmjs.org/package/@mmmbuto/codex-cli-termux
110
118
  - Releases: https://github.com/DioNanos/codex-termux/releases
111
119
  - Upstream: https://github.com/openai/codex
112
120
  - Web UI: [NexusCLI](https://github.com/DioNanos/nexuscli) - Optional web interface for Codex/Claude/Gemini
113
121
 
114
122
  ---
115
123
 
116
- ## ⚡ 2-Minute Quickstart / ⚡ 2分钟快速开始
117
-
118
- Get a first session running fast. Choose the path that matches your account.
119
- 快速完成首次运行。选择与你的账号/网关匹配的路径。
120
-
121
- ### Path 1 — OpenAI (default)
122
-
123
- ```bash
124
- codex login
125
- codex
126
- ```
127
-
128
- ### Path 2 — OpenRouter & OpenAI-compatible gateways / OpenRouter 与兼容网关
129
-
130
- For OpenRouter or other OpenAI-compatible providers.
131
- 适用于 OpenRouter 或其他 OpenAI 兼容的提供商。
132
-
133
- See [docs/openrouter-quickstart.md](./docs/openrouter-quickstart.md) for detailed configuration.
134
-
135
- ```bash
136
- # Quick example (see docs for full setup)
137
- source ~/.codex/.env
138
- codex --profile or-fast
139
- ```
140
-
141
- Caution: model slugs/names can change on providers—verify the current model list first.
142
- 注意:模型名称可能变化,请以提供商模型列表为准。
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
-
153
- ---
154
-
155
- ## 🧭 OpenRouter & gateways note / 🧭 OpenRouter 与兼容网关说明
156
-
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
- 提供商与模型由你的配置与后端决定。
161
-
162
- ---
163
-
164
124
  ## 🚀 Usage
165
125
 
166
126
  Same as official Codex CLI:
@@ -180,208 +140,30 @@ For full documentation, see [OpenAI Codex docs](https://developers.openai.com/co
180
140
 
181
141
  ### Non-Interactive Mode (Automation)
182
142
 
183
- The `codex` binary is a multitool that includes the `exec` subcommand for automation and scripting:
184
-
185
143
  ```bash
186
- # Enable web search tool (⚠️ avoid pasting secrets; be mindful of prompt injection from untrusted content)
187
- codex --search
188
-
189
- # Run non-interactively with JSON output
190
- codex exec --json "list files in current directory"
144
+ # Execute a prompt non-interactively
145
+ codex "Generate a hello world in Python"
191
146
 
192
- # With custom sandbox mode
193
- codex exec --json -s danger-full-access "run npm test"
194
-
195
- # Skip git repo check for non-repo directories
196
- codex exec --json --skip-git-repo-check "echo hello"
197
-
198
- # Output to file
199
- codex exec --json -o output.json "describe this project"
147
+ # JSON output for tooling integration
148
+ codex --json "List files in current directory"
200
149
  ```
201
150
 
202
- **Key flags:**
203
- - `--json` - Output events as JSONL (for parsing)
204
- - `-s, --sandbox` - Sandbox mode: `read-only`, `workspace-write`, `danger-full-access`
205
- - `--skip-git-repo-check` - Run outside git repositories
206
- - `-o, --output-last-message` - Save final response to file
207
-
208
- ### Execpolicy
209
-
210
- See the [Execpolicy quickstart](./docs/execpolicy.md) to set up rules that govern what commands Codex can execute.
211
-
212
- ---
213
-
214
- ## 🔧 Troubleshooting (Termux) / 🔧 故障排查(Termux)
215
-
216
- Common Termux issues and the fastest places to check.
217
- 常见 Termux 问题与最快排查入口。
218
-
219
- - Upgrade alerts or shared library errors: see [docs/termux-upgrade-checks.md](./docs/termux-upgrade-checks.md)
220
- - Basic usage/setup: see [docs/getting-started.md](./docs/getting-started.md)
221
- - Authentication/login problems: see [docs/authentication.md](./docs/authentication.md)
222
- - Provider/gateway incompatibilities on **Codex > 0.80.0**: use **zai-codex-bridge** (link above)
223
- - Still stuck? Open an issue with repro steps: [GitHub Issues](https://github.com/DioNanos/codex-termux/issues)
224
-
225
- ---
226
-
227
151
  ## 🧪 Testing & Validation
228
152
 
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
- Latest validation (2026-01-26): 50 passed / 0 failed / 1 skipped — see [CODEX_TEST_REPORT_v0.91.0.md](./CODEX_TEST_REPORT_v0.91.0.md).
232
-
233
- <details>
234
- <summary>Details: automated test suite, coverage, and sample report</summary>
235
-
236
- ### Automated Test Suite
237
-
238
- [CODEX_TEST_SUITE.md](./CODEX_TEST_SUITE.md) - Universal test suite compatible with all Codex versions
239
-
240
- **Coverage**:
241
- - ✅ **82 automated tests** across 12 categories (including prep/cleanup)
242
- - ✅ **10 Termux-specific tests** validating all active compatibility patches (#1-#6, #9)
243
- - ✅ **8 Package & Binary tests** for npm installation verification
244
- - ✅ File operations, shell execution, environment detection
245
- - ✅ Android permissions, library paths, package manager
246
- - ✅ Error handling and edge cases
247
-
248
- **How to use**:
249
-
250
- ```bash
251
- # Start Codex
252
- codex
253
-
254
- # Feed the test suite
255
- > Read and execute all tests in https://github.com/DioNanos/codex-termux/blob/main/CODEX_TEST_SUITE.md
256
- ```
257
-
258
- Codex will automatically:
259
- 1. Execute all applicable tests sequentially
260
- 2. Report PASS/FAIL for each test
261
- 3. Generate a final summary with:
262
- - Total passed/failed counts
263
- - Category breakdowns
264
- - Critical failures (if any)
265
- - Overall verdict
266
-
267
- **Test Categories**:
268
- 1. System Information (3 tests)
269
- 2. File Operations (8 tests)
270
- 3. Search & Discovery (3 tests)
271
- 4. Shell Execution (4 tests)
272
- 5. Text Processing (2 tests)
273
- 6. Web & Network (2 tests - optional)
274
- 7. Git Operations (2 tests - optional)
275
- 8. AI Capabilities (3 tests)
276
- 9. Error Handling (3 tests)
277
- 10. **Termux-Specific (10 tests)** ⭐ - Validates all Android patches
278
- 11. Cleanup (1 test)
279
- 12. **Package & Binary (8 tests)** ⭐ - Validates npm installation and binaries
280
-
281
- **Termux-Specific Tests Include**:
282
- - ✅ Environment paths (`$PREFIX`, `$HOME`, `$LD_LIBRARY_PATH`)
283
- - ✅ Shell detection (bash/zsh on Android)
284
- - ✅ Package manager (`pkg` commands)
285
- - ✅ Storage access (`/sdcard`, `~/storage`)
286
- - ✅ Android permissions and sandbox isolation
287
- - ✅ Library path preservation (Patch #8 validation)
288
- - ✅ Browser opener availability (Patch #1 validation)
289
- - ✅ Architecture detection (aarch64/ARM64)
290
-
291
- **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.
292
-
293
- **Success Criteria**:
294
- - All System, Files, Shell, and Termux tests must pass
295
- - At least 80% overall pass rate
296
- - No critical crashes
297
-
298
- </details>
299
-
300
- ---
301
-
302
- ## 📚 Documentation
303
-
304
- - [**Getting started**](./docs/getting-started.md)
305
- - [CLI usage](./docs/getting-started.md#cli-usage)
306
- - [Slash Commands](./docs/slash_commands.md)
307
- - [Running with a prompt as input](./docs/getting-started.md#running-with-a-prompt-as-input)
308
- - [Example prompts](./docs/getting-started.md#running-with-a-prompt-as-input)
309
- - [Custom prompts](./docs/prompts.md)
310
- - [Memory with AGENTS.md](./docs/getting-started.md#memory-with-agentsmd)
311
- - [**Configuration**](./docs/config.md)
312
- - [Example config](./docs/example-config.md)
313
- - [**Sandbox & approvals**](./docs/sandbox.md)
314
- - [**Execpolicy quickstart**](./docs/execpolicy.md)
315
- - [**Authentication**](./docs/authentication.md)
316
- - [Auth methods](./docs/authentication.md#forcing-a-specific-auth-method-advanced)
317
- - [Login on a "Headless" machine](./docs/authentication.md#connecting-on-a-headless-machine)
318
- - **Automating Codex**
319
- - [GitHub Action](https://github.com/openai/codex-action)
320
- - [TypeScript SDK](./sdk/typescript/README.md)
321
- - [Non-interactive mode (`codex exec`)](./docs/exec.md)
322
- - [**Skills**](./docs/skills.md)
323
- - [**Installing & building**](./docs/install.md)
324
- - [System Requirements](./docs/install.md#system-requirements)
325
- - [DotSlash](./docs/install.md#dotslash)
326
- - [Build from source](./docs/install.md#build-from-source)
327
- - [**Contributing**](./docs/contributing.md)
328
- - [**Open source fund**](./docs/open-source-fund.md)
329
-
330
- ---
331
-
332
- ## 🔨 Building from Source
153
+ **v0.93.0-termux** (2026-02-01): 18 tests, 18 passed / 0 failed / 1 warning — see [CODEX_TEST_REPORT_v0.93.0.md](../CODEX_TEST_REPORT_v0.93.0.md)
333
154
 
334
- See [BUILDING.md](./BUILDING.md) for compilation instructions.
335
-
336
- ---
337
-
338
- ## 🔧 Project Maintenance
339
-
340
- **Codex-Termux** is a community-maintained port enabling AI-powered coding on Android Termux.
341
-
342
- **Maintenance activities:**
343
- - 🔨 **ARM64 compilation** - Building native binaries for each upstream release
344
- - 🔄 **Upstream synchronization** - Tracking OpenAI Codex updates and merging changes
345
- - 🐛 **Compatibility patches** - Maintaining Android-specific fixes for Termux environment
346
- - 📱 **Device testing** - Verification on real ARM64 hardware
347
- - 📚 **Documentation & support** - Maintaining docs, responding to GitHub issues
348
-
349
- **Time investment:** Approximately 20 hours per month for project upkeep.
350
-
351
- **Thank you** to all users who have reported issues, provided feedback, and helped improve this project. Your contributions make Codex accessible on mobile platforms.
352
-
353
- ---
354
-
355
- ## 📝 License
356
-
357
- This project maintains full compliance with the Apache 2.0 license from OpenAI Codex.
358
-
359
- **Original work**: Copyright OpenAI (https://github.com/openai/codex)
360
- **Termux port**: Minimal patches for Android compatibility
361
-
362
- See [LICENSE](./LICENSE) file for details.
363
-
364
- ---
365
-
366
- ## 🙏 Credits
367
-
368
- - **OpenAI** for the amazing Codex CLI
369
- - **Termux** community for Android terminal environment
370
- - All contributors to upstream Codex project
371
-
372
- ---
155
+ **LTS validation** (2026-02-02): All categories PASS — see [CODEX_TEST_REPORT_v0.80.3-lts_termux.md](../CODEX_TEST_REPORT_v0.80.3-lts_termux.md)
373
156
 
374
- **Version**: Based on OpenAI Codex main (Termux-compatible builds)
375
- **Platform**: Android Termux ARM64
376
- **Maintained**: Community-driven, not affiliated with OpenAI
157
+ **LTS Linux** (2026-01-31): 62 tests, 60 passed / 0 failed / 11 skipped — see [CODEX_TEST_REPORT_v0.80.3-lts_linux.md](../CODEX_TEST_REPORT_v0.80.3-lts_linux.md)
377
158
 
378
159
  ---
379
160
 
380
- ## 📜 Changelog
161
+ ## License
381
162
 
382
- Upstream Codex releases: https://github.com/openai/codex/releases
383
- Termux-specific changes: see [CHANGELOG.md](./CHANGELOG.md).
163
+ See [LICENSE](../LICENSE) file for details.
384
164
 
385
165
  ---
386
166
 
387
- **Testing**: Comprehensive test suite in [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
167
+ **Version**: Based on OpenAI Codex rust-v0.93.0 with Termux compatibility patches
168
+ **Platform**: Android Termux ARM64
169
+ **Maintained**: Community-driven, not affiliated with OpenAI
package/bin/codex CHANGED
Binary file
package/bin/codex-exec.js CHANGED
@@ -8,6 +8,7 @@ const __filename = fileURLToPath(import.meta.url);
8
8
  const __dirname = dirname(__filename);
9
9
 
10
10
  const binaryPath = join(__dirname, 'codex');
11
+
11
12
  const args = ['exec', ...process.argv.slice(2)];
12
13
 
13
14
  const child = spawn(binaryPath, args, {
package/bin/codex.js CHANGED
@@ -10,9 +10,9 @@ const __dirname = dirname(__filename);
10
10
  const binaryPath = join(__dirname, 'codex');
11
11
 
12
12
  // Default behavior:
13
- // - `codex` (no args) starts the TUI (same as upstream).
14
- // - `codex <prompt>` runs `codex exec <prompt>` for convenience.
15
- // - `codex <known-subcommand|--flag>` passes args through unchanged.
13
+ // - `codex` (no args) starts to TUI
14
+ // - `codex <prompt>` runs `codex exec <prompt>` for convenience
15
+ // - `codex <known-subcommand|--flag>` passes args through unchanged
16
16
  const knownSubcommands = new Set([
17
17
  'exec',
18
18
  'review',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mmmbuto/codex-cli-termux",
3
- "version": "0.91.0-termux",
4
- "description": "OpenAI Codex CLI (upstream main, post rust-v0.91.0) packaged as 0.91.0-termux – TUI + automation for Android Termux (ARM64). Use 'codex' for TUI, 'codex exec --json' for automation.",
3
+ "version": "0.93.0-termux",
4
+ "description": "OpenAI Codex CLI (upstream rust-v0.93.0) packaged as 0.93.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": {
package/bin/codex-exec DELETED
Binary file