@mmmbuto/codex-cli-termux 0.58.4-termux → 0.61.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 +167 -55
- package/bin/codex +0 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -6,11 +6,6 @@
|
|
|
6
6
|
[](https://www.npmjs.com/package/@mmmbuto/codex-cli-termux)
|
|
7
7
|
[](https://ko-fi.com/dionanos)
|
|
8
8
|
|
|
9
|
-
> [!TIP]
|
|
10
|
-
> **Enjoying Codex on mobile?** ☕
|
|
11
|
-
> This project requires ~20 hours/month for ARM64 compilation, upstream tracking, and compatibility patches.
|
|
12
|
-
> [Support development →](https://ko-fi.com/dionanos)
|
|
13
|
-
|
|
14
9
|
---
|
|
15
10
|
|
|
16
11
|
## What This Is
|
|
@@ -83,7 +78,7 @@ npm install -g @mmmbuto/codex-cli-termux
|
|
|
83
78
|
|
|
84
79
|
```bash
|
|
85
80
|
codex --version
|
|
86
|
-
# Output: codex-
|
|
81
|
+
# Output: codex-tui 0.61.0
|
|
87
82
|
|
|
88
83
|
codex login
|
|
89
84
|
# Opens browser for authentication
|
|
@@ -113,6 +108,117 @@ codex --help
|
|
|
113
108
|
|
|
114
109
|
For full documentation, see [OpenAI Codex docs](https://github.com/openai/codex).
|
|
115
110
|
|
|
111
|
+
### Execpolicy Quickstart
|
|
112
|
+
|
|
113
|
+
Codex can enforce your own rules-based execution policy before it runs shell commands.
|
|
114
|
+
|
|
115
|
+
1. Create a policy directory: `mkdir -p ~/.codex/policy`.
|
|
116
|
+
2. Create one or more `.codexpolicy` files in that folder. Codex automatically loads every `.codexpolicy` file in there on startup.
|
|
117
|
+
3. Write `prefix_rule` entries to describe the commands you want to allow, prompt, or block:
|
|
118
|
+
|
|
119
|
+
```starlark
|
|
120
|
+
prefix_rule(
|
|
121
|
+
pattern = ["git", ["push", "fetch"]],
|
|
122
|
+
decision = "prompt", # allow | prompt | forbidden
|
|
123
|
+
match = [["git", "push", "origin", "main"]], # examples that must match
|
|
124
|
+
not_match = [["git", "status"]], # examples that must not match
|
|
125
|
+
)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
- `pattern` is a list of shell tokens, evaluated from left to right; wrap tokens in a nested list to express alternatives (e.g., match both `push` and `fetch`).
|
|
129
|
+
- `decision` sets the severity; Codex picks the strictest decision when multiple rules match (forbidden > prompt > allow).
|
|
130
|
+
- `match` and `not_match` act as (optional) unit tests. Codex validates them when it loads your policy, so you get feedback if an example has unexpected behavior.
|
|
131
|
+
|
|
132
|
+
In this example rule, if Codex wants to run commands with the prefix `git push` or `git fetch`, it will first ask for user approval.
|
|
133
|
+
|
|
134
|
+
Use [`execpolicy2` CLI](./codex-rs/execpolicy2/README.md) to preview decisions for policy files:
|
|
135
|
+
|
|
136
|
+
```shell
|
|
137
|
+
cargo run -p codex-execpolicy2 -- check --policy ~/.codex/policy/default.codexpolicy git push origin main
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Pass multiple `--policy` flags to test how several files combine. See the [`codex-rs/execpolicy2` README](./codex-rs/execpolicy2/README.md) for a more detailed walkthrough of the available syntax.
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 🧪 Testing & Validation
|
|
145
|
+
|
|
146
|
+
### Automated Test Suite
|
|
147
|
+
|
|
148
|
+
This project includes a comprehensive test suite specifically designed for Termux validation:
|
|
149
|
+
|
|
150
|
+
**Test Suite**: [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
|
|
151
|
+
|
|
152
|
+
**Coverage**:
|
|
153
|
+
- ✅ **74 automated tests** across 11 categories
|
|
154
|
+
- ✅ **10 Termux-specific tests** validating all 8 compatibility patches
|
|
155
|
+
- ✅ File operations, shell execution, environment detection
|
|
156
|
+
- ✅ Android permissions, library paths, package manager
|
|
157
|
+
- ✅ Error handling and edge cases
|
|
158
|
+
|
|
159
|
+
**How to use**:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Start Codex
|
|
163
|
+
codex
|
|
164
|
+
|
|
165
|
+
# Feed the test suite
|
|
166
|
+
> Read and execute all tests in https://github.com/DioNanos/codex-termux/blob/main/CODEX_TEST_SUITE.md
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Codex will automatically:
|
|
170
|
+
1. Execute all 74 tests sequentially
|
|
171
|
+
2. Report PASS/FAIL for each test
|
|
172
|
+
3. Generate a final summary with:
|
|
173
|
+
- Total passed/failed counts
|
|
174
|
+
- Category breakdowns
|
|
175
|
+
- Critical failures (if any)
|
|
176
|
+
- Overall verdict
|
|
177
|
+
|
|
178
|
+
**Test Categories**:
|
|
179
|
+
1. System Information (3 tests)
|
|
180
|
+
2. File Operations (8 tests)
|
|
181
|
+
3. Search & Discovery (3 tests)
|
|
182
|
+
4. Shell Execution (4 tests)
|
|
183
|
+
5. Text Processing (2 tests)
|
|
184
|
+
6. Web & Network (2 tests - optional)
|
|
185
|
+
7. Git Operations (2 tests - optional)
|
|
186
|
+
8. AI Capabilities (3 tests)
|
|
187
|
+
9. Error Handling (3 tests)
|
|
188
|
+
10. **Termux-Specific (10 tests)** ⭐ - Validates all Android patches
|
|
189
|
+
11. Cleanup (1 test)
|
|
190
|
+
|
|
191
|
+
**Termux-Specific Tests Include**:
|
|
192
|
+
- ✅ Environment paths (`$PREFIX`, `$HOME`, `$LD_LIBRARY_PATH`)
|
|
193
|
+
- ✅ Shell detection (bash/zsh on Android)
|
|
194
|
+
- ✅ Package manager (`pkg` commands)
|
|
195
|
+
- ✅ Storage access (`/sdcard`, `~/storage`)
|
|
196
|
+
- ✅ Android permissions and sandbox isolation
|
|
197
|
+
- ✅ Library path preservation (Patch #8 validation)
|
|
198
|
+
- ✅ Browser opener availability (Patch #1 validation)
|
|
199
|
+
- ✅ Architecture detection (aarch64/ARM64)
|
|
200
|
+
|
|
201
|
+
**Success Criteria**:
|
|
202
|
+
- All System, Files, Shell, and Termux tests must pass
|
|
203
|
+
- At least 80% overall pass rate
|
|
204
|
+
- No critical crashes
|
|
205
|
+
|
|
206
|
+
**Example Report** (v0.61.0):
|
|
207
|
+
```
|
|
208
|
+
CODEX CLI TEST SUITE - FINAL REPORT
|
|
209
|
+
====================================
|
|
210
|
+
Platform: Android Termux ARM64
|
|
211
|
+
Codex Version: 0.61.0
|
|
212
|
+
Total Tests: 42
|
|
213
|
+
✅ Passed: 40
|
|
214
|
+
❌ Failed: 0
|
|
215
|
+
⚠️ Skipped: 2 (WebSearch, Git - optional)
|
|
216
|
+
|
|
217
|
+
Termux-Specific: 10/10 passed ✅
|
|
218
|
+
|
|
219
|
+
VERDICT: ⚠️ PASS WITH WARNINGS
|
|
220
|
+
```
|
|
221
|
+
|
|
116
222
|
---
|
|
117
223
|
|
|
118
224
|
## 🔨 Building from Source
|
|
@@ -129,7 +235,7 @@ See [BUILDING.md](./BUILDING.md) for compilation instructions.
|
|
|
129
235
|
- 🔨 **ARM64 compilation** - Building native binaries for each upstream release (~18min per build)
|
|
130
236
|
- 🔄 **Upstream synchronization** - Tracking OpenAI Codex updates and merging changes
|
|
131
237
|
- 🐛 **Compatibility patches** - Maintaining Android-specific fixes for Termux environment
|
|
132
|
-
- 📱 **Device testing** - Verification on real ARM64 hardware (
|
|
238
|
+
- 📱 **Device testing** - Verification on real ARM64 hardware (ARM64 flagship device, other devices)
|
|
133
239
|
- 📚 **Documentation & support** - Maintaining docs, responding to GitHub issues
|
|
134
240
|
|
|
135
241
|
**Time investment:** Approximately 20 hours per month for project upkeep.
|
|
@@ -157,7 +263,7 @@ See [LICENSE](./LICENSE) file for details.
|
|
|
157
263
|
|
|
158
264
|
---
|
|
159
265
|
|
|
160
|
-
**Version**: Based on OpenAI Codex 0.
|
|
266
|
+
**Version**: Based on OpenAI Codex 0.61.0 (includes GPT-5.1 MAX support)
|
|
161
267
|
**Platform**: Android Termux ARM64
|
|
162
268
|
**Maintained**: Community-driven, not affiliated with OpenAI
|
|
163
269
|
|
|
@@ -165,66 +271,72 @@ See [LICENSE](./LICENSE) file for details.
|
|
|
165
271
|
|
|
166
272
|
## 📜 Changelog
|
|
167
273
|
|
|
168
|
-
### v0.
|
|
274
|
+
### v0.61.0-termux (2025-11-20)
|
|
169
275
|
|
|
170
|
-
**
|
|
276
|
+
**Update**: Synced with upstream OpenAI Codex rust-v0.61.0 (13 commits from v0.60.1)
|
|
171
277
|
|
|
172
|
-
**
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
278
|
+
**Upstream Features**:
|
|
279
|
+
- 🚀 **Single Pass Truncation**: Improved performance for context management
|
|
280
|
+
- 🔐 **execpolicy2 Integration**: Enhanced security with new execution policy system
|
|
281
|
+
- 🐚 **Shell Fallback Improvements**: Better shell detection with automatic fallbacks (bash → zsh)
|
|
282
|
+
- 🎨 **Model Migration UX**: Stop showing migration screen after first time
|
|
283
|
+
- 🪟 **World-Writable Warnings**: Reduced false positives on Android
|
|
176
284
|
|
|
177
|
-
**
|
|
178
|
-
- **
|
|
179
|
-
- **
|
|
180
|
-
- **
|
|
181
|
-
- **
|
|
285
|
+
**Termux-Specific**:
|
|
286
|
+
- ✅ **All 8 patches preserved and verified**
|
|
287
|
+
- ✅ **Shell fallback compatible**: Android `$SHELL` detection enhanced with upstream fallbacks
|
|
288
|
+
- ✅ **Build optimized for 8GB RAM**: Compiled successfully on ROG Phone 3 (9m 06s)
|
|
289
|
+
- ✅ **Binary size**: 42MB (+13% vs 0.60.1 due to execpolicy2)
|
|
290
|
+
- ✅ **Test Suite**: 40/42 tests PASSED (95.2%), 10/10 Termux-specific tests
|
|
182
291
|
|
|
183
|
-
**
|
|
292
|
+
**Patches Validated**:
|
|
293
|
+
1. ✅ Browser login (`termux-open-url`)
|
|
294
|
+
2. ✅ RAM optimizations (`lto=false`, `codegen-units=16`)
|
|
295
|
+
3. ✅ Android shell detection (`$SHELL` env var)
|
|
296
|
+
4. ✅ Android sandbox disabled
|
|
297
|
+
5. ✅ LD_* environment variables preserved
|
|
298
|
+
6. ✅ Auto-update URL (`DioNanos/codex-termux`)
|
|
299
|
+
7. ✅ Version parser (`-termux` suffix support)
|
|
300
|
+
8. ✅ NPM package name (`@mmmbuto/codex-cli-termux`)
|
|
184
301
|
|
|
185
|
-
**
|
|
186
|
-
- ✅ **Patch #1**: Browser login fix (`termux-open-url`)
|
|
187
|
-
- ✅ **Patch #2**: RAM optimizations (`lto=false`, `codegen-units=16`)
|
|
188
|
-
- ✅ **Patch #3**: Auto-update URL (`@mmmbuto/codex-cli-termux`)
|
|
189
|
-
- ✅ **Patch #4**: Auto-update detection (this release)
|
|
302
|
+
**Breaking Changes**: None - fully backward compatible
|
|
190
303
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
### v0.58.0-termux (2025-11-13)
|
|
304
|
+
**Testing**: Comprehensive test suite with 74 tests available at [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
|
|
194
305
|
|
|
195
|
-
|
|
306
|
+
Full upstream changelog: https://github.com/openai/codex/compare/rust-v0.60.1...rust-v0.61.0
|
|
196
307
|
|
|
197
|
-
|
|
198
|
-
- 🤖 **GPT-5.1 Support**: New model family (gpt-5.1-codex, gpt-5.1-codex-mini, gpt-5.1)
|
|
199
|
-
- 🧠 **Adaptive Reasoning**: Configurable effort levels (Low, Medium, High)
|
|
200
|
-
- ⌨️ **Enhanced TUI**: Job control, improved navigation, better model picker
|
|
201
|
-
- 🔧 **Shell Detection**: Centralized command generation for unified exec
|
|
202
|
-
- 📊 **App-server v2**: Thread/Turn APIs improvements
|
|
308
|
+
---
|
|
203
309
|
|
|
204
|
-
|
|
205
|
-
- ✅ All Android patches preserved and verified working
|
|
206
|
-
- ✅ Browser login fix (termux-open-url)
|
|
207
|
-
- ✅ RAM optimizations (lto=false, codegen-units=16)
|
|
208
|
-
- ✅ Auto-update for @mmmbuto/codex-cli-termux
|
|
310
|
+
### v0.60.1-termux (2025-11-20)
|
|
209
311
|
|
|
210
|
-
|
|
312
|
+
**Major Update**: Synced with upstream OpenAI Codex rust-v0.60.1 (250+ commits)
|
|
211
313
|
|
|
212
|
-
|
|
314
|
+
**Upstream Features**:
|
|
315
|
+
- 🤖 **GPT-5.1 MAX Support**: New MAX model with enhanced capabilities and performance
|
|
316
|
+
- 🔧 **App-Server Protocol**: Enhanced v2 APIs for thread management
|
|
317
|
+
- ⚡ **Performance Optimizations**: Improved TUI responsiveness and memory usage
|
|
318
|
+
- 🪟 **Windows Sandbox**: Enhanced security features (not applicable to Termux)
|
|
319
|
+
- 🐛 **Bug Fixes**: 250+ commits with stability improvements and fixes
|
|
213
320
|
|
|
214
|
-
|
|
321
|
+
**Termux-Specific**:
|
|
322
|
+
- ✅ **All 8 patches preserved and verified**
|
|
323
|
+
- ✅ **Patch #8 updated**: Shell detection refactored for upstream changes
|
|
324
|
+
- ✅ **Build optimized for 8GB RAM**: Compiled successfully on ROG Phone 3
|
|
325
|
+
- ✅ **Binary size**: 37MB (24% smaller than 0.58.4)
|
|
326
|
+
- ✅ **Test Suite**: 74 automated tests including 10 Termux-specific validations
|
|
215
327
|
|
|
216
|
-
|
|
328
|
+
**Patches Validated**:
|
|
329
|
+
1. ✅ Browser login (`termux-open-url`)
|
|
330
|
+
2. ✅ RAM optimizations (`lto=false`, `codegen-units=16`)
|
|
331
|
+
3. ✅ Android shell detection (`$SHELL` env var)
|
|
332
|
+
4. ✅ Android sandbox disabled
|
|
333
|
+
5. ✅ LD_* environment variables preserved
|
|
334
|
+
6. ✅ Auto-update URL (`DioNanos/codex-termux`)
|
|
335
|
+
7. ✅ Version parser (`-termux` suffix support)
|
|
336
|
+
8. ✅ NPM package name (`@mmmbuto/codex-cli-termux`)
|
|
217
337
|
|
|
218
|
-
**
|
|
219
|
-
- ⌨️ **TUI Navigation**: CTRL-n / CTRL-p for navigating slash commands, files, history
|
|
220
|
-
- 🔧 **Unified Exec**: Improved safe commands handling, process group timeout fixes
|
|
221
|
-
- 🪟 **WSL Support**: Path normalization for Windows Subsystem for Linux
|
|
222
|
-
- 🚀 **App-server v2**: New Thread/Turn APIs, account endpoints
|
|
223
|
-
- 🧹 **Refactoring**: Terminal cleanup (deprecated flush logic removed)
|
|
338
|
+
**Breaking Changes**: None - fully backward compatible
|
|
224
339
|
|
|
225
|
-
**
|
|
226
|
-
- ✅ Android auto-update disabled (manual update instructions shown)
|
|
227
|
-
- ✅ `termux-open-url` for browser login (ndk-context crash fix maintained)
|
|
228
|
-
- ✅ RAM optimizations for 16GB devices (lto=false, codegen-units=16)
|
|
340
|
+
**Testing**: Comprehensive test suite with 74 tests available at [`CODEX_TEST_SUITE.md`](./CODEX_TEST_SUITE.md)
|
|
229
341
|
|
|
230
|
-
Full upstream changelog: https://github.com/openai/codex/compare/rust-v0.
|
|
342
|
+
Full upstream changelog: https://github.com/openai/codex/compare/rust-v0.58.0...rust-v0.60.1
|
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.
|
|
4
|
-
"description": "OpenAI Codex CLI v0.
|
|
3
|
+
"version": "0.61.0-termux",
|
|
4
|
+
"description": "OpenAI Codex CLI v0.61.0 with GPT-5.1 MAX support, pre-compiled for Android Termux (ARM64)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/codex.js",
|
|
7
7
|
"bin": {
|