cliproxy-codex-termux 0.77.0-cliproxy
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 +172 -0
- package/bin/codex +0 -0
- package/bin/codex-exec +0 -0
- package/bin/codex-exec.js +26 -0
- package/bin/codex.js +60 -0
- package/package.json +56 -0
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# 🚀 Codex CLI with CLIProxyAPIPlus Models
|
|
2
|
+
|
|
3
|
+
> **Pre-built Codex CLI with Gemini, Claude, Qwen, Grok, and Kiro models integrated in /model selector**
|
|
4
|
+
|
|
5
|
+
This is a modified version of [Codex Termux](https://github.com/DioNanos/codex-termux) with CLIProxyAPIPlus models pre-integrated. No need to build from source - just install and use!
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## ✨ Features
|
|
10
|
+
|
|
11
|
+
- ✅ **All CLIProxyAPIPlus models in /model selector**
|
|
12
|
+
- Gemini 2.5 Pro, Gemini 3 Pro Preview
|
|
13
|
+
- Claude Opus 4.5, Claude Sonnet 4.5
|
|
14
|
+
- Claude Opus 4.5 + Thinking
|
|
15
|
+
- Qwen3 Coder Plus
|
|
16
|
+
- Grok Code Fast
|
|
17
|
+
- Kiro Claude Opus 4.5, Kiro Claude Sonnet 4.5
|
|
18
|
+
|
|
19
|
+
- ✅ **Plus all default OpenAI models**
|
|
20
|
+
- gpt-5.2-codex
|
|
21
|
+
- gpt-5.1-codex-max
|
|
22
|
+
- gpt-5.1-codex-mini
|
|
23
|
+
- gpt-5.2
|
|
24
|
+
|
|
25
|
+
- ✅ **Pre-built for Termux ARM64**
|
|
26
|
+
- No need to install Rust
|
|
27
|
+
- No need to compile
|
|
28
|
+
- Just `npm install` and go!
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📦 Installation
|
|
33
|
+
|
|
34
|
+
### Prerequisites
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# In Termux
|
|
38
|
+
pkg update && pkg upgrade -y
|
|
39
|
+
pkg install nodejs-lts -y
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Install Codex
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g @cliproxy/codex-cli-termux
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Install CLIProxyAPIPlus (Required)
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
# Clone repo
|
|
52
|
+
git clone https://github.com/julianromli/CLIProxyAPIPlus-Easy-Installation.git
|
|
53
|
+
cd CLIProxyAPIPlus-Easy-Installation
|
|
54
|
+
|
|
55
|
+
# Install
|
|
56
|
+
bash scripts/install-cliproxyapi-termux.sh
|
|
57
|
+
source ~/.bashrc
|
|
58
|
+
|
|
59
|
+
# Start server
|
|
60
|
+
start-cliproxyapi -Background
|
|
61
|
+
|
|
62
|
+
# Login to providers
|
|
63
|
+
cliproxyapi-oauth
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## 🚀 Usage
|
|
69
|
+
|
|
70
|
+
### Start Codex
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
codex
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Select Model
|
|
77
|
+
|
|
78
|
+
Inside TUI:
|
|
79
|
+
```
|
|
80
|
+
> /model
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
You'll see all models including CLIProxyAPIPlus ones!
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
Select Model and Effort
|
|
87
|
+
────────────────────────────────────────────────────
|
|
88
|
+
1. gpt-5.2-codex (default)
|
|
89
|
+
2. gpt-5.1-codex-max
|
|
90
|
+
3. Gemini 2.5 Pro ← CLIProxyAPIPlus
|
|
91
|
+
4. Claude Opus 4.5 ← CLIProxyAPIPlus
|
|
92
|
+
5. Qwen3 Coder Plus ← CLIProxyAPIPlus
|
|
93
|
+
... and more!
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Use Specific Model
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
codex --model gemini-2.5-pro "your prompt"
|
|
100
|
+
codex --model claude-opus-4.5 "your prompt"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ⚙️ Environment Variables
|
|
106
|
+
|
|
107
|
+
Set these if CLIProxyAPIPlus runs on different port/host:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
export CLIPROXY_BASE_URL="http://localhost:8317/v1"
|
|
111
|
+
export CLIPROXY_API_KEY="sk-dummy"
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 🔧 Troubleshooting
|
|
117
|
+
|
|
118
|
+
### "Model not available" error
|
|
119
|
+
|
|
120
|
+
CLIProxyAPIPlus is not running or not logged in:
|
|
121
|
+
```bash
|
|
122
|
+
start-cliproxyapi -Status
|
|
123
|
+
start-cliproxyapi -Background
|
|
124
|
+
cliproxyapi-oauth
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Models don't appear in selector
|
|
128
|
+
|
|
129
|
+
Make sure you installed this package, not the original:
|
|
130
|
+
```bash
|
|
131
|
+
npm list -g @cliproxy/codex-cli-termux
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## 📊 Architecture
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
┌─────────────────────────────────────────────────────────┐
|
|
140
|
+
│ Codex CLI (This Package) │
|
|
141
|
+
│ ┌─────────────────────────────────────────────────┐ │
|
|
142
|
+
│ │ /model Selector │ │
|
|
143
|
+
│ │ • OpenAI models (default) │ │
|
|
144
|
+
│ │ • CLIProxyAPIPlus models (pre-integrated) │ │
|
|
145
|
+
│ └─────────────────────────────────────────────────┘ │
|
|
146
|
+
│ ↓ │
|
|
147
|
+
└─────────────────────────────────────────────────────────┘
|
|
148
|
+
↓
|
|
149
|
+
┌─────────────────────────────────────────────────────────┐
|
|
150
|
+
│ CLIProxyAPIPlus (localhost:8317) │
|
|
151
|
+
│ Routes requests to appropriate AI providers │
|
|
152
|
+
│ Gemini | Claude | Qwen | Grok | Kiro │
|
|
153
|
+
└─────────────────────────────────────────────────────────┘
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## 📝 Credits
|
|
159
|
+
|
|
160
|
+
- [Codex CLI](https://github.com/openai/codex) - Original by OpenAI
|
|
161
|
+
- [Codex Termux](https://github.com/DioNanos/codex-termux) - Termux patches
|
|
162
|
+
- [CLIProxyAPIPlus](https://github.com/router-for-me/CLIProxyAPIPlus) - Multi-model proxy
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 📄 License
|
|
167
|
+
|
|
168
|
+
Apache-2.0
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
**Happy Coding with All Models! 🤖📱✨**
|
package/bin/codex
ADDED
|
Binary file
|
package/bin/codex-exec
ADDED
|
Binary file
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const binaryPath = join(__dirname, 'codex-exec');
|
|
11
|
+
|
|
12
|
+
const env = {
|
|
13
|
+
...process.env,
|
|
14
|
+
CODEX_MANAGED_BY_NPM: '1',
|
|
15
|
+
CLIPROXY_BASE_URL: process.env.CLIPROXY_BASE_URL || 'http://localhost:8317/v1',
|
|
16
|
+
CLIPROXY_API_KEY: process.env.CLIPROXY_API_KEY || 'sk-dummy'
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const child = spawn(binaryPath, process.argv.slice(2), {
|
|
20
|
+
stdio: 'inherit',
|
|
21
|
+
env
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
child.on('exit', (code) => {
|
|
25
|
+
process.exit(code);
|
|
26
|
+
});
|
package/bin/codex.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from 'child_process';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
|
|
10
|
+
const binaryPath = join(__dirname, 'codex');
|
|
11
|
+
|
|
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.
|
|
16
|
+
const knownSubcommands = new Set([
|
|
17
|
+
'exec',
|
|
18
|
+
'review',
|
|
19
|
+
'login',
|
|
20
|
+
'logout',
|
|
21
|
+
'mcp',
|
|
22
|
+
'mcp-server',
|
|
23
|
+
'app-server',
|
|
24
|
+
'completion',
|
|
25
|
+
'sandbox',
|
|
26
|
+
'execpolicy',
|
|
27
|
+
'apply',
|
|
28
|
+
'resume',
|
|
29
|
+
'cloud',
|
|
30
|
+
'responses-api-proxy',
|
|
31
|
+
'stdio-to-uds',
|
|
32
|
+
'features',
|
|
33
|
+
'tui'
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
const args = process.argv.slice(2);
|
|
37
|
+
const first = args[0];
|
|
38
|
+
const isOption = first?.startsWith('-');
|
|
39
|
+
const isKnownSubcommand = first && knownSubcommands.has(first);
|
|
40
|
+
|
|
41
|
+
const finalArgs =
|
|
42
|
+
args.length === 0 ? [] : isOption || isKnownSubcommand ? args : ['exec', ...args];
|
|
43
|
+
|
|
44
|
+
// Set environment variables for CLIProxyAPIPlus integration
|
|
45
|
+
const env = {
|
|
46
|
+
...process.env,
|
|
47
|
+
CODEX_MANAGED_BY_NPM: '1',
|
|
48
|
+
// CLIProxyAPIPlus environment variables (can be overridden by user)
|
|
49
|
+
CLIPROXY_BASE_URL: process.env.CLIPROXY_BASE_URL || 'http://localhost:8317/v1',
|
|
50
|
+
CLIPROXY_API_KEY: process.env.CLIPROXY_API_KEY || 'sk-dummy'
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const child = spawn(binaryPath, finalArgs, {
|
|
54
|
+
stdio: 'inherit',
|
|
55
|
+
env
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
child.on('exit', (code) => {
|
|
59
|
+
process.exit(code);
|
|
60
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cliproxy-codex-termux",
|
|
3
|
+
"version": "0.77.0-cliproxy",
|
|
4
|
+
"description": "Codex CLI with CLIProxyAPIPlus models pre-integrated. All models (Gemini, Claude, Qwen, Grok, Kiro) appear in /model selector. For Android Termux ARM64.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "bin/codex.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"codex": "bin/codex.js",
|
|
9
|
+
"codex-exec": "bin/codex-exec.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"bin/codex.js",
|
|
13
|
+
"bin/codex-exec.js",
|
|
14
|
+
"bin/codex",
|
|
15
|
+
"bin/codex-exec",
|
|
16
|
+
"README.md"
|
|
17
|
+
],
|
|
18
|
+
"keywords": [
|
|
19
|
+
"codex",
|
|
20
|
+
"cliproxy",
|
|
21
|
+
"cliproxyapiplus",
|
|
22
|
+
"gemini",
|
|
23
|
+
"claude",
|
|
24
|
+
"qwen",
|
|
25
|
+
"grok",
|
|
26
|
+
"kiro",
|
|
27
|
+
"openai",
|
|
28
|
+
"termux",
|
|
29
|
+
"android",
|
|
30
|
+
"arm64",
|
|
31
|
+
"cli",
|
|
32
|
+
"ai",
|
|
33
|
+
"coding-agent",
|
|
34
|
+
"multi-model"
|
|
35
|
+
],
|
|
36
|
+
"author": "CLIProxyAPIPlus Integration",
|
|
37
|
+
"license": "Apache-2.0",
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "https://github.com/julianromli/CLIProxyAPIPlus-Easy-Installation.git"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/julianromli/CLIProxyAPIPlus-Easy-Installation#readme",
|
|
43
|
+
"bugs": {
|
|
44
|
+
"url": "https://github.com/julianromli/CLIProxyAPIPlus-Easy-Installation/issues"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=14.0.0"
|
|
48
|
+
},
|
|
49
|
+
"os": [
|
|
50
|
+
"android",
|
|
51
|
+
"linux"
|
|
52
|
+
],
|
|
53
|
+
"cpu": [
|
|
54
|
+
"arm64"
|
|
55
|
+
]
|
|
56
|
+
}
|