@mmmbuto/qwen-code-termux 0.6.1-termux → 0.6.2-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 +19 -190
- package/{dist/cli.js → cli.js} +187 -52
- package/locales/en.js +1073 -0
- package/locales/ru.js +1092 -0
- package/locales/zh.js +927 -0
- package/package.json +16 -122
- package/tiktoken_bg.wasm +0 -0
- package/scripts/postinstall.cjs +0 -13
- /package/{dist/sandbox-macos-permissive-closed.sb → sandbox-macos-permissive-closed.sb} +0 -0
- /package/{dist/sandbox-macos-permissive-open.sb → sandbox-macos-permissive-open.sb} +0 -0
- /package/{dist/sandbox-macos-permissive-proxied.sb → sandbox-macos-permissive-proxied.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-closed.sb → sandbox-macos-restrictive-closed.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-open.sb → sandbox-macos-restrictive-open.sb} +0 -0
- /package/{dist/sandbox-macos-restrictive-proxied.sb → sandbox-macos-restrictive-proxied.sb} +0 -0
- /package/{dist/vendor → vendor}/ripgrep/COPYING +0 -0
- /package/{dist/vendor → vendor}/ripgrep/arm64-darwin/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/arm64-linux/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-darwin/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-linux/rg +0 -0
- /package/{dist/vendor → vendor}/ripgrep/x64-win32/rg.exe +0 -0
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.2-termux
|
|
34
28
|
```
|
|
35
29
|
|
|
36
30
|
Build from source:
|
|
@@ -40,192 +34,29 @@ 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
|
-
|
|
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
|
-
## Authentication
|
|
89
|
-
|
|
90
|
-
Qwen Code Termux supports two authentication methods:
|
|
91
|
-
|
|
92
|
-
- **Qwen OAuth (recommended & free)**: sign in with your `qwen.ai` account in a browser.
|
|
93
|
-
- **OpenAI-compatible API**: use `OPENAI_API_KEY` (and optionally a custom base URL / model).
|
|
94
|
-
|
|
95
|
-
### Qwen OAuth (recommended)
|
|
96
|
-
|
|
97
|
-
Start `qwen`, then run:
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
/auth
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
Choose **Qwen OAuth** and complete the browser flow.
|
|
104
|
-
|
|
105
|
-
### OpenAI-compatible API (API key)
|
|
106
|
-
|
|
107
|
-
Environment variables:
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
export OPENAI_API_KEY="your-api-key-here"
|
|
111
|
-
export OPENAI_BASE_URL="https://api.openai.com/v1" # optional
|
|
112
|
-
export OPENAI_MODEL="gpt-4o" # optional
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Usage
|
|
116
|
-
|
|
117
|
-
As an open-source terminal agent, you can use Qwen Code in four primary ways:
|
|
118
|
-
|
|
119
|
-
1. Interactive mode (terminal UI)
|
|
120
|
-
2. Headless mode (scripts, CI)
|
|
121
|
-
3. IDE integration (VS Code, Zed)
|
|
122
|
-
4. TypeScript SDK
|
|
123
|
-
|
|
124
|
-
### Interactive mode
|
|
125
|
-
|
|
126
|
-
```bash
|
|
127
|
-
cd your-project/
|
|
128
|
-
qwen
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files.
|
|
132
|
-
|
|
133
|
-
### Headless mode
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
cd your-project/
|
|
137
|
-
qwen -p "your question"
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Use `-p` to run Qwen Code without the interactive UI—ideal for scripts and automation.
|
|
141
|
-
|
|
142
|
-
### IDE integration
|
|
143
|
-
|
|
144
|
-
Use Qwen Code inside your editor (VS Code and Zed) - see upstream documentation.
|
|
145
|
-
|
|
146
|
-
## Commands & Shortcuts
|
|
147
|
-
|
|
148
|
-
### Session Commands
|
|
149
|
-
|
|
150
|
-
- `/help` - Display available commands
|
|
151
|
-
- `/settings` - Configure Qwen Code (including hide banner)
|
|
152
|
-
- `/clear` - Clear conversation history
|
|
153
|
-
- `/auth` - Switch authentication method
|
|
154
|
-
- `/stats` - Show current session information
|
|
155
|
-
- `/exit` or `/quit` - Exit Qwen Code
|
|
156
|
-
|
|
157
|
-
### Keyboard Shortcuts
|
|
158
|
-
|
|
159
|
-
- `Ctrl+C` - Cancel current operation
|
|
160
|
-
- `Ctrl+D` - Exit (on empty line)
|
|
161
|
-
- `Up/Down` - Navigate command history
|
|
162
|
-
|
|
163
|
-
## Configuration
|
|
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
|
|
192
|
-
|
|
193
|
-
**Termux Tools Integration:**
|
|
194
|
-
|
|
195
|
-
- `scripts/termux-tools/discovery.sh` - Discovers 20+ Termux-API tools
|
|
196
|
-
- `scripts/termux-tools/call.sh` - Dispatcher for tool execution
|
|
197
|
-
|
|
198
|
-
**Available Termux Tools:**
|
|
199
|
-
|
|
200
|
-
| Tool | Description |
|
|
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 |
|
|
215
|
-
|
|
216
|
-
**npm Install Optimizations:**
|
|
217
|
-
|
|
218
|
-
- `os: ["android", ...]` - Allows Termux installs
|
|
219
|
-
- `cpu: ["arm64", ...]` - Targets Android architecture
|
|
220
|
-
- Minimal postinstall message: `✓ qwen-code-termux installed`
|
|
221
|
-
|
|
222
|
-
## Testing
|
|
49
|
+
## Termux Optimizations
|
|
223
50
|
|
|
224
|
-
|
|
51
|
+
- **OAuth:** browser launch via `termux-open-url` with Android fallback.
|
|
52
|
+
- **Clean UX:** desktop‑centric warnings suppressed on Termux.
|
|
53
|
+
- **Defaults:** banner hidden by default on Termux (toggle in settings).
|
|
225
54
|
|
|
226
|
-
##
|
|
55
|
+
## Documentation & Fixes
|
|
227
56
|
|
|
228
|
-
|
|
57
|
+
- **Test Suite**: [`QWEN_TEST_SUITE.md`](./QWEN_TEST_SUITE.md)
|
|
58
|
+
- **Test Report**: [`QWEN_TEST_REPORT_v0.6.2.md`](./QWEN_TEST_REPORT_v0.6.2.md)
|
|
59
|
+
- **Patches**: [`docs/patches/README.md`](./docs/patches/README.md)
|
|
229
60
|
|
|
230
61
|
## Updating
|
|
231
62
|
|
|
@@ -233,11 +64,9 @@ See `docs/patches/README.md` for complete list of Termux-specific modifications.
|
|
|
233
64
|
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
234
65
|
```
|
|
235
66
|
|
|
236
|
-
|
|
67
|
+
### Versions
|
|
237
68
|
|
|
238
|
-
-
|
|
239
|
-
- Fork: https://github.com/DioNanos/qwen-code-termux
|
|
240
|
-
- Base: Google Gemini CLI architecture
|
|
69
|
+
- **latest / stable**: 0.6.2-termux
|
|
241
70
|
|
|
242
71
|
## License
|
|
243
72
|
|
|
@@ -245,5 +74,5 @@ Apache 2.0 (same as upstream). See LICENSE.
|
|
|
245
74
|
|
|
246
75
|
## Acknowledgments
|
|
247
76
|
|
|
248
|
-
|
|
249
|
-
|
|
77
|
+
Based on [Qwen Code](https://github.com/QwenLM/qwen-code), which is based on
|
|
78
|
+
[Google Gemini CLI](https://github.com/google-gemini/gemini-cli).
|