@mmmbuto/qwen-code-termux 0.6.1-termux → 0.6.3-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 +62 -124
- package/dist/cli.js +1529 -263
- package/dist/tiktoken_bg.wasm +0 -0
- package/package.json +26 -17
- package/scripts/postinstall.cjs +0 -13
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# 🤖 Qwen Code – Termux Edition
|
|
2
2
|
|
|
3
3
|
Android/Termux optimized fork of Qwen Code CLI. Installs cleanly on Termux
|
|
4
|
-
by skipping native modules and
|
|
4
|
+
by skipping native modules and using mobile‑friendly fallbacks.
|
|
5
5
|
|
|
6
6
|
[](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
|
|
7
7
|
[](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
|
|
@@ -13,15 +13,9 @@ by skipping native modules and adding mobile-specific optimizations.
|
|
|
13
13
|
|
|
14
14
|
**Optimized Termux edition** of `QwenLM/qwen-code`.
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- **Termux-First:** Pre-configured for Android filesystem and mobile constraints.
|
|
21
|
-
- **Lightweight:** Native dependencies managed for ARM64 without complex
|
|
22
|
-
compilation.
|
|
23
|
-
- **Up-to-Date:** Synchronized with the latest Qwen Code features.
|
|
24
|
-
- **Qwen3-Coder Optimized:** Best performance with Qwen3-Coder models.
|
|
16
|
+
- **Termux‑First:** Android filesystem and shell fallbacks.
|
|
17
|
+
- **Lightweight:** No native PTY/keychain deps.
|
|
18
|
+
- **Up‑to‑Date:** Tracks upstream Qwen Code.
|
|
25
19
|
|
|
26
20
|
## Installation (Termux)
|
|
27
21
|
|
|
@@ -30,7 +24,7 @@ pkg update && pkg upgrade -y
|
|
|
30
24
|
pkg install nodejs-lts -y
|
|
31
25
|
npm install -g @mmmbuto/qwen-code-termux
|
|
32
26
|
|
|
33
|
-
qwen --version # expected: 0.6.
|
|
27
|
+
qwen --version # expected: 0.6.3-termux
|
|
34
28
|
```
|
|
35
29
|
|
|
36
30
|
Build from source:
|
|
@@ -40,54 +34,21 @@ git clone https://github.com/DioNanos/qwen-code-termux.git
|
|
|
40
34
|
cd qwen-code-termux
|
|
41
35
|
npm install --ignore-optional --ignore-scripts
|
|
42
36
|
npm run build && npm run bundle
|
|
43
|
-
node
|
|
37
|
+
node dist/cli.js --version
|
|
44
38
|
```
|
|
45
39
|
|
|
46
|
-
## Termux Optimizations
|
|
47
|
-
|
|
48
|
-
- **Smart Clipboard:** Auto-detects Android environment to enable seamless
|
|
49
|
-
clipboard operations (fixes `TERMUX__PREFIX`).
|
|
50
|
-
- **Streamlined Install:** Native PTY/keychain deps are **omitted** on Termux
|
|
51
|
-
(fallback to `child_process` + file-based tokens), avoiding native builds.
|
|
52
|
-
- **Clean UX:** Suppresses desktop-centric warnings (like home directory checks)
|
|
53
|
-
to optimize the experience for mobile terminal usage.
|
|
54
|
-
- **ARM64 Native:** Bundled specifically for Android architecture.
|
|
55
|
-
- **Responsive Settings:** Fixed settings dialog layout for small screens.
|
|
56
|
-
|
|
57
|
-
## Environment Specifics
|
|
58
|
-
|
|
59
|
-
- **Shell Integration:** Uses robust `child_process` fallback instead of
|
|
60
|
-
`node-pty` for maximum stability on Android.
|
|
61
|
-
- **Credentials:** Keys are stored in standard config files for portability (no
|
|
62
|
-
dependency on system keychains).
|
|
63
|
-
- **Qwen OAuth:** Full OAuth support with free tier (2000 requests/day).
|
|
64
|
-
- **OpenAI Compatible:** Can use OpenAI-compatible APIs.
|
|
65
|
-
|
|
66
40
|
## Quick Start
|
|
67
41
|
|
|
68
42
|
```bash
|
|
69
|
-
# Start Qwen Code (interactive)
|
|
70
43
|
qwen
|
|
71
|
-
|
|
72
|
-
# Then, in the session:
|
|
44
|
+
# then
|
|
73
45
|
/help
|
|
74
46
|
/auth
|
|
75
47
|
```
|
|
76
48
|
|
|
77
|
-
On first use, you'll be prompted to sign in. You can run `/auth` anytime to switch authentication methods.
|
|
78
|
-
|
|
79
|
-
Example prompts:
|
|
80
|
-
|
|
81
|
-
```text
|
|
82
|
-
What does this project do?
|
|
83
|
-
Explain the codebase structure.
|
|
84
|
-
Help me refactor this function.
|
|
85
|
-
Generate unit tests for this module.
|
|
86
|
-
```
|
|
87
|
-
|
|
88
49
|
## Authentication
|
|
89
50
|
|
|
90
|
-
Qwen Code
|
|
51
|
+
Qwen Code supports two authentication methods:
|
|
91
52
|
|
|
92
53
|
- **Qwen OAuth (recommended & free)**: sign in with your `qwen.ai` account in a browser.
|
|
93
54
|
- **OpenAI-compatible API**: use `OPENAI_API_KEY` (and optionally a custom base URL / model).
|
|
@@ -100,11 +61,11 @@ Start `qwen`, then run:
|
|
|
100
61
|
/auth
|
|
101
62
|
```
|
|
102
63
|
|
|
103
|
-
Choose **Qwen OAuth** and complete the browser flow.
|
|
64
|
+
Choose **Qwen OAuth** and complete the browser flow. On Termux, the browser opens via `termux-open-url` with an Android fallback. Your credentials are cached locally.
|
|
104
65
|
|
|
105
66
|
### OpenAI-compatible API (API key)
|
|
106
67
|
|
|
107
|
-
Environment variables:
|
|
68
|
+
Environment variables (recommended for CI / headless environments):
|
|
108
69
|
|
|
109
70
|
```bash
|
|
110
71
|
export OPENAI_API_KEY="your-api-key-here"
|
|
@@ -112,6 +73,19 @@ export OPENAI_BASE_URL="https://api.openai.com/v1" # optional
|
|
|
112
73
|
export OPENAI_MODEL="gpt-4o" # optional
|
|
113
74
|
```
|
|
114
75
|
|
|
76
|
+
## Termux Optimizations
|
|
77
|
+
|
|
78
|
+
- **OAuth:** browser launch via `termux-open-url` with Android fallback.
|
|
79
|
+
- **Clean UX:** desktop‑centric warnings suppressed on Termux.
|
|
80
|
+
- **Defaults:** banner hidden by default on Termux (toggle in settings).
|
|
81
|
+
|
|
82
|
+
## Documentation & Fixes
|
|
83
|
+
|
|
84
|
+
- **Test Suite**: [`QWEN_TEST_SUITE.md`](./QWEN_TEST_SUITE.md)
|
|
85
|
+
- **Test Report**: [`QWEN_TEST_REPORT_v0.6.3.md`](./QWEN_TEST_REPORT_v0.6.3.md)
|
|
86
|
+
- **Patches**: [`docs/patches/README.md`](./docs/patches/README.md)
|
|
87
|
+
- **Termux Fixes**: [`docs/patches/TERMUX_FIXES.md`](./docs/patches/TERMUX_FIXES.md)
|
|
88
|
+
|
|
115
89
|
## Usage
|
|
116
90
|
|
|
117
91
|
As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
@@ -121,37 +95,46 @@ As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
|
121
95
|
3. IDE integration (VS Code, Zed)
|
|
122
96
|
4. TypeScript SDK
|
|
123
97
|
|
|
124
|
-
|
|
98
|
+
#### Interactive mode
|
|
125
99
|
|
|
126
100
|
```bash
|
|
127
101
|
cd your-project/
|
|
128
102
|
qwen
|
|
129
103
|
```
|
|
130
104
|
|
|
131
|
-
Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files.
|
|
105
|
+
Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).
|
|
132
106
|
|
|
133
|
-
|
|
107
|
+
#### Headless mode
|
|
134
108
|
|
|
135
109
|
```bash
|
|
136
110
|
cd your-project/
|
|
137
111
|
qwen -p "your question"
|
|
138
112
|
```
|
|
139
113
|
|
|
140
|
-
Use `-p` to run Qwen Code without the interactive UI—ideal for scripts and
|
|
114
|
+
Use `-p` to run Qwen Code without the interactive UI—ideal for scripts, automation, and CI/CD. Learn more: [Headless mode](https://qwenlm.github.io/qwen-code-docs/en/users/features/headless).
|
|
115
|
+
|
|
116
|
+
#### IDE integration
|
|
117
|
+
|
|
118
|
+
Use Qwen Code inside your editor (VS Code and Zed):
|
|
119
|
+
|
|
120
|
+
- [Use in VS Code](https://qwenlm.github.io/qwen-code-docs/en/users/integration-vscode/)
|
|
121
|
+
- [Use in Zed](https://qwenlm.github.io/qwen-code-docs/en/users/integration-zed/)
|
|
141
122
|
|
|
142
|
-
|
|
123
|
+
#### TypeScript SDK
|
|
143
124
|
|
|
144
|
-
|
|
125
|
+
Build on top of Qwen Code with the TypeScript SDK:
|
|
126
|
+
|
|
127
|
+
- [Use the Qwen Code SDK](./packages/sdk-typescript/README.md)
|
|
145
128
|
|
|
146
129
|
## Commands & Shortcuts
|
|
147
130
|
|
|
148
131
|
### Session Commands
|
|
149
132
|
|
|
150
133
|
- `/help` - Display available commands
|
|
151
|
-
- `/settings` - Configure Qwen Code (including hide banner)
|
|
152
134
|
- `/clear` - Clear conversation history
|
|
153
|
-
- `/
|
|
135
|
+
- `/compress` - Compress history to save tokens
|
|
154
136
|
- `/stats` - Show current session information
|
|
137
|
+
- `/bug` - Submit a bug report
|
|
155
138
|
- `/exit` or `/quit` - Exit Qwen Code
|
|
156
139
|
|
|
157
140
|
### Keyboard Shortcuts
|
|
@@ -160,84 +143,39 @@ Use Qwen Code inside your editor (VS Code and Zed) - see upstream documentation.
|
|
|
160
143
|
- `Ctrl+D` - Exit (on empty line)
|
|
161
144
|
- `Up/Down` - Navigate command history
|
|
162
145
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
Qwen Code can be configured via `settings.json`, environment variables, and CLI flags.
|
|
166
|
-
|
|
167
|
-
- **User settings**: `~/.qwen/settings.json`
|
|
168
|
-
- **Project settings**: `.qwen/settings.json`
|
|
169
|
-
|
|
170
|
-
Key settings available in `/settings`:
|
|
171
|
-
|
|
172
|
-
- `ui.hideBanner` - Hide the welcome banner
|
|
173
|
-
- `ui.hideTips` - Hide tips display
|
|
174
|
-
- `tools.approvalMode` - Control tool approval behavior
|
|
175
|
-
|
|
176
|
-
## Termux-Specific Changes
|
|
177
|
-
|
|
178
|
-
### v0.6.0-termux Modifications
|
|
179
|
-
|
|
180
|
-
This fork includes specific optimizations for Android/Termux:
|
|
181
|
-
|
|
182
|
-
**UI/UX Fixes:**
|
|
183
|
-
|
|
184
|
-
- **Responsive Settings Layout** - Fixed settings dialog for small screens (smartphones)
|
|
185
|
-
- Changed `minWidth={50}` to `flexGrow={1}` for adaptive labels
|
|
186
|
-
- Values no longer overflow on narrow terminals
|
|
187
|
-
- **Banner System** - Full banner component integration with hideBanner support
|
|
188
|
-
- `ThemedGradient.tsx` - Gradient theme for banner first line
|
|
189
|
-
- `Banner.tsx` - Dynamic warning/info banner display
|
|
190
|
-
- `useBanner.ts` - Smart banner counting (max 5 shows)
|
|
191
|
-
- `persistentState.ts` - State persistence across sessions
|
|
146
|
+
> Learn more about [Commands](https://qwenlm.github.io/qwen-code-docs/en/users/features/commands/)
|
|
192
147
|
|
|
193
|
-
|
|
148
|
+
## Updating
|
|
194
149
|
|
|
195
|
-
|
|
196
|
-
-
|
|
150
|
+
```bash
|
|
151
|
+
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
152
|
+
```
|
|
197
153
|
|
|
198
|
-
|
|
154
|
+
### Versions
|
|
199
155
|
|
|
200
|
-
|
|
201
|
-
| ----------------------------- | --------------------------------------- |
|
|
202
|
-
| `termux_battery_status` | Battery %, health, temp, charging state |
|
|
203
|
-
| `termux_clipboard_get/set` | Read/write Android clipboard |
|
|
204
|
-
| `termux_toast` | Show toast notification on screen |
|
|
205
|
-
| `termux_notification` | Create persistent notification |
|
|
206
|
-
| `termux_tts_speak` | Text-to-speech with language/pitch/rate |
|
|
207
|
-
| `termux_vibrate` | Vibrate device |
|
|
208
|
-
| `termux_torch` | Control camera flash |
|
|
209
|
-
| `termux_wifi_scan/connection` | WiFi info |
|
|
210
|
-
| `termux_location` | GPS location |
|
|
211
|
-
| `termux_camera_info/photo` | Camera access |
|
|
212
|
-
| `termux_dialog` | Text input dialog |
|
|
213
|
-
| `termux_telephony_call` | Initiate phone call |
|
|
214
|
-
| `termux_sensor_info/read` | Read device sensors |
|
|
156
|
+
- **latest / stable**: 0.6.3-termux
|
|
215
157
|
|
|
216
|
-
|
|
158
|
+
## Benchmark Results
|
|
217
159
|
|
|
218
|
-
|
|
219
|
-
- `cpu: ["arm64", ...]` - Targets Android architecture
|
|
220
|
-
- Minimal postinstall message: `✓ qwen-code-termux installed`
|
|
160
|
+
### Terminal-Bench Performance
|
|
221
161
|
|
|
222
|
-
|
|
162
|
+
| Agent | Model | Accuracy |
|
|
163
|
+
| --------- | ------------------ | -------- |
|
|
164
|
+
| Qwen Code | Qwen3-Coder-480A35 | 37.5% |
|
|
165
|
+
| Qwen Code | Qwen3-Coder-30BA3B | 31.3% |
|
|
223
166
|
|
|
224
|
-
|
|
167
|
+
## Ecosystem
|
|
225
168
|
|
|
226
|
-
|
|
169
|
+
Looking for a graphical interface?
|
|
227
170
|
|
|
228
|
-
|
|
171
|
+
- [**AionUi**](https://github.com/iOfficeAI/AionUi) A modern GUI for command-line AI tools including Qwen Code
|
|
172
|
+
- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) A cross-platform desktop/web/mobile UI for Qwen Code
|
|
229
173
|
|
|
230
|
-
##
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
234
|
-
```
|
|
174
|
+
## Troubleshooting
|
|
235
175
|
|
|
236
|
-
|
|
176
|
+
If you encounter issues, check the [troubleshooting guide](https://qwenlm.github.io/qwen-code-docs/en/users/support/troubleshooting/).
|
|
237
177
|
|
|
238
|
-
|
|
239
|
-
- Fork: https://github.com/DioNanos/qwen-code-termux
|
|
240
|
-
- Base: Google Gemini CLI architecture
|
|
178
|
+
To report a bug from within the CLI, run `/bug` and include a short title and repro steps.
|
|
241
179
|
|
|
242
180
|
## License
|
|
243
181
|
|
|
@@ -245,5 +183,5 @@ Apache 2.0 (same as upstream). See LICENSE.
|
|
|
245
183
|
|
|
246
184
|
## Acknowledgments
|
|
247
185
|
|
|
248
|
-
|
|
249
|
-
|
|
186
|
+
Based on [Qwen Code](https://github.com/QwenLM/qwen-code), which is based on
|
|
187
|
+
[Google Gemini CLI](https://github.com/google-gemini/gemini-cli).
|