@mmmbuto/qwen-code-termux 0.12.0-termux → 0.13.1-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 +181 -55
- package/dist/bundled/review/SKILL.md +123 -0
- package/{cli.js → dist/cli.js} +212435 -190033
- package/{sandbox-macos-permissive-open.sb → dist/sandbox-macos-permissive-open.sb} +3 -1
- package/dist/vendor/tree-sitter/tree-sitter-bash.wasm +0 -0
- package/dist/vendor/tree-sitter/tree-sitter.wasm +0 -0
- package/package.json +120 -25
- package/CHANGELOG.md +0 -77
- package/locales/de.js +0 -1613
- package/locales/en.js +0 -1665
- package/locales/ja.js +0 -1117
- package/locales/pt.js +0 -1608
- package/locales/ru.js +0 -1620
- package/locales/zh.js +0 -1485
- /package/{sandbox-macos-permissive-closed.sb → dist/sandbox-macos-permissive-closed.sb} +0 -0
- /package/{sandbox-macos-permissive-proxied.sb → dist/sandbox-macos-permissive-proxied.sb} +0 -0
- /package/{sandbox-macos-restrictive-closed.sb → dist/sandbox-macos-restrictive-closed.sb} +0 -0
- /package/{sandbox-macos-restrictive-open.sb → dist/sandbox-macos-restrictive-open.sb} +0 -0
- /package/{sandbox-macos-restrictive-proxied.sb → dist/sandbox-macos-restrictive-proxied.sb} +0 -0
- /package/{vendor → dist/vendor}/ripgrep/COPYING +0 -0
- /package/{vendor → dist/vendor}/ripgrep/arm64-darwin/rg +0 -0
- /package/{vendor → dist/vendor}/ripgrep/arm64-linux/rg +0 -0
- /package/{vendor → dist/vendor}/ripgrep/x64-darwin/rg +0 -0
- /package/{vendor → dist/vendor}/ripgrep/x64-linux/rg +0 -0
- /package/{vendor → dist/vendor}/ripgrep/x64-win32/rg.exe +0 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
|
|
4
4
|
[](./LICENSE)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
[](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
|
|
@@ -16,102 +16,228 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
> 🎉 **News (2026-03-27)**: Termux Edition v0.13.1 is here! TTS notifications,
|
|
20
|
+
> full upstream v0.13.1 sync, and a streamlined install experience on Android.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-

|
|
22
|
+
Qwen Code is an open-source AI agent for the terminal, optimized for [Qwen3-Coder](https://github.com/QwenLM/Qwen3-Coder).
|
|
23
|
+
This **Termux Edition** fork keeps upstream behaviour while fixing what breaks on Android/Termux.
|
|
26
24
|
|
|
27
25
|
## Why a Termux Edition?
|
|
28
26
|
|
|
29
|
-
Upstream Qwen Code targets macOS/Linux/Windows. On Android/Termux, installs
|
|
27
|
+
Upstream Qwen Code targets macOS/Linux/Windows. On Android/Termux, installs fail due to
|
|
28
|
+
native dependency issues (PTY, node-gyp) and environment quirks.
|
|
30
29
|
|
|
31
|
-
Termux Edition
|
|
30
|
+
Termux Edition fixes:
|
|
32
31
|
|
|
33
|
-
- **Android PTY support** via `@mmmbuto/pty-termux-utils`
|
|
34
|
-
- **Termux runtime patches** (polyfills
|
|
35
|
-
- **Termux-safe install** (
|
|
36
|
-
- **
|
|
32
|
+
- **Android PTY support** via `@mmmbuto/pty-termux-utils`
|
|
33
|
+
- **Termux runtime patches** (base64 polyfills, character encoding)
|
|
34
|
+
- **Termux-safe install** (skips husky + sandbox bundle on npm install)
|
|
35
|
+
- **TTS Notifications** — speak completion/alerts via `termux-tts-speak`
|
|
36
|
+
- **Tested on-device** — see [test-reports/](test-reports/)
|
|
37
37
|
|
|
38
38
|
## Installation (Termux / Android)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
```bash
|
|
41
|
+
# Requires: Termux (F-Droid), Node.js 20+
|
|
42
|
+
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
43
|
+
qwen --version
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Requirements:**
|
|
47
|
+
|
|
48
|
+
- [Termux (F-Droid)](https://f-droid.org/packages/com.termux/) — Google Play version has issues
|
|
49
|
+
- Node.js 20+ (`pkg install nodejs-lts`)
|
|
50
|
+
- `termux-api` package (optional, for TTS): `pkg install termux-api`
|
|
41
51
|
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
> **Not on Termux?** Use upstream instead:
|
|
53
|
+
> `npm install -g @qwen-code/qwen-code@latest`
|
|
54
|
+
|
|
55
|
+
## Installation (Linux / macOS / Windows)
|
|
56
|
+
|
|
57
|
+
For non-Termux platforms, use the official upstream:
|
|
44
58
|
|
|
45
59
|
```bash
|
|
46
|
-
|
|
47
|
-
|
|
60
|
+
# Linux / macOS
|
|
61
|
+
bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)"
|
|
62
|
+
|
|
63
|
+
# Windows (Admin CMD)
|
|
64
|
+
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
|
48
65
|
```
|
|
49
66
|
|
|
50
|
-
|
|
67
|
+
Or via Homebrew:
|
|
51
68
|
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
```bash
|
|
70
|
+
brew install qwen-code
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
54
74
|
|
|
55
75
|
```bash
|
|
56
|
-
|
|
76
|
+
cd your-project/
|
|
77
|
+
qwen
|
|
78
|
+
|
|
79
|
+
# Then inside the session:
|
|
80
|
+
/help
|
|
81
|
+
/auth
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
On first use, you'll be prompted to sign in. Run `/auth` anytime to switch auth method.
|
|
85
|
+
|
|
86
|
+
Example prompts:
|
|
87
|
+
|
|
88
|
+
```text
|
|
89
|
+
What does this project do?
|
|
90
|
+
Explain the codebase structure.
|
|
91
|
+
Help me refactor this function.
|
|
92
|
+
Generate unit tests for this module.
|
|
57
93
|
```
|
|
58
94
|
|
|
59
|
-
|
|
95
|
+
## Authentication
|
|
96
|
+
|
|
97
|
+
Two methods — API-KEY is recommended for headless/Termux environments.
|
|
98
|
+
|
|
99
|
+
### API-KEY (recommended)
|
|
100
|
+
|
|
101
|
+
Set up `~/.qwen/settings.json`:
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"modelProviders": {
|
|
106
|
+
"openai": [
|
|
107
|
+
{
|
|
108
|
+
"id": "qwen3.5-plus",
|
|
109
|
+
"name": "qwen3.5-plus",
|
|
110
|
+
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
"env": {
|
|
115
|
+
"DASHSCOPE_API_KEY": "sk-your-key"
|
|
116
|
+
},
|
|
117
|
+
"security": { "auth": { "selectedType": "openai" } },
|
|
118
|
+
"model": { "name": "qwen3.5-plus" }
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Qwen OAuth
|
|
60
123
|
|
|
61
124
|
```bash
|
|
62
|
-
|
|
63
|
-
|
|
125
|
+
qwen
|
|
126
|
+
/auth
|
|
127
|
+
# Complete browser flow
|
|
64
128
|
```
|
|
65
129
|
|
|
66
|
-
|
|
130
|
+
> OAuth requires a browser — not available over SSH/headless. Use API-KEY instead.
|
|
131
|
+
|
|
132
|
+
## Usage
|
|
133
|
+
|
|
134
|
+
### Interactive mode
|
|
67
135
|
|
|
68
136
|
```bash
|
|
69
|
-
qwen
|
|
70
|
-
|
|
71
|
-
qwen /help # Commands
|
|
72
|
-
qwen /auth # Authentication
|
|
137
|
+
qwen
|
|
138
|
+
# Use @ to reference files: @src/main.ts
|
|
73
139
|
```
|
|
74
140
|
|
|
75
|
-
|
|
141
|
+
### Headless mode
|
|
76
142
|
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
- **Config**: [docs/users/configuration.md](docs/users/configuration.md)
|
|
143
|
+
```bash
|
|
144
|
+
qwen -p "your question"
|
|
145
|
+
```
|
|
81
146
|
|
|
82
|
-
|
|
147
|
+
### Session commands
|
|
83
148
|
|
|
84
|
-
|
|
149
|
+
| Command | Description |
|
|
150
|
+
| ----------- | ------------------------------- |
|
|
151
|
+
| `/help` | Available commands |
|
|
152
|
+
| `/clear` | Clear history |
|
|
153
|
+
| `/compress` | Compress history to save tokens |
|
|
154
|
+
| `/stats` | Session info |
|
|
155
|
+
| `/bug` | Submit bug report |
|
|
156
|
+
| `/exit` | Quit |
|
|
85
157
|
|
|
86
|
-
|
|
158
|
+
### Keyboard shortcuts
|
|
87
159
|
|
|
88
|
-
|
|
160
|
+
- `Ctrl+C` — Cancel operation
|
|
161
|
+
- `Ctrl+D` — Exit (empty line)
|
|
162
|
+
- `Up/Down` — Command history
|
|
89
163
|
|
|
90
|
-
|
|
164
|
+
## Termux-Specific Features
|
|
91
165
|
|
|
92
|
-
|
|
166
|
+
### TTS Notifications
|
|
93
167
|
|
|
94
|
-
|
|
168
|
+
When a task completes or needs your attention, Qwen Code can speak a notification
|
|
169
|
+
using Android's text-to-speech engine:
|
|
95
170
|
|
|
96
|
-
|
|
171
|
+
```bash
|
|
172
|
+
# Install termux-api for TTS
|
|
173
|
+
pkg install termux-api
|
|
97
174
|
|
|
98
|
-
|
|
175
|
+
# TTS is used automatically by the tts_notification tool
|
|
176
|
+
```
|
|
99
177
|
|
|
100
|
-
|
|
178
|
+
### PTY Support
|
|
101
179
|
|
|
102
|
-
-
|
|
103
|
-
-
|
|
180
|
+
Shell execution uses a PTY (pseudo-terminal) for proper ANSI colour and interactive
|
|
181
|
+
command support. On Termux, PTY deps are auto-installed on first `npm install`.
|
|
104
182
|
|
|
105
|
-
|
|
183
|
+
### Runtime Patches
|
|
184
|
+
|
|
185
|
+
| File | Purpose |
|
|
186
|
+
| --------------------------------------------- | ------------------------------ |
|
|
187
|
+
| `packages/core/src/patches/termux-runtime.ts` | Android base64 polyfill |
|
|
188
|
+
| `scripts/prepare-termux.cjs` | Skip husky + bundle on Termux |
|
|
189
|
+
| `scripts/postinstall.cjs` | Termux install confirmation |
|
|
190
|
+
| `packages/core/src/utils/termux-detect.ts` | `isTermux()` detection utility |
|
|
191
|
+
|
|
192
|
+
## Building from Source
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
git clone https://github.com/DioNanos/qwen-code-termux.git
|
|
196
|
+
cd qwen-code-termux
|
|
197
|
+
npm install
|
|
198
|
+
npm run build
|
|
199
|
+
npm run bundle
|
|
200
|
+
|
|
201
|
+
# Install globally
|
|
202
|
+
npm install -g
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
See [docs/developers/BUILDING.md](docs/developers/BUILDING.md) for full details.
|
|
106
206
|
|
|
107
|
-
|
|
207
|
+
## Configuration
|
|
208
|
+
|
|
209
|
+
| File | Scope | Description |
|
|
210
|
+
| ----------------------- | ------- | ----------------------------- |
|
|
211
|
+
| `~/.qwen/settings.json` | User | Global settings (recommended) |
|
|
212
|
+
| `.qwen/settings.json` | Project | Project-level overrides |
|
|
213
|
+
|
|
214
|
+
See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for all options.
|
|
215
|
+
|
|
216
|
+
> **Security note:** Never commit API keys to version control.
|
|
217
|
+
|
|
218
|
+
## Troubleshooting
|
|
219
|
+
|
|
220
|
+
- [Qwen Code docs](https://qwenlm.github.io/qwen-code-docs/en/users/support/troubleshooting/)
|
|
221
|
+
- From the CLI: run `/bug` for a bug report template
|
|
222
|
+
- [Test reports](test-reports/) — Termux-specific test results
|
|
223
|
+
|
|
224
|
+
## Ecosystem
|
|
225
|
+
|
|
226
|
+
- [**AionUi**](https://github.com/iOfficeAI/AionUi) — Modern GUI for Qwen Code
|
|
227
|
+
- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) — Cross-platform desktop UI
|
|
228
|
+
|
|
229
|
+
## Connect
|
|
230
|
+
|
|
231
|
+
- [Discord](https://discord.gg/RN7tqZCeDK)
|
|
232
|
+
- [Dingtalk](https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1)
|
|
233
|
+
|
|
234
|
+
## Acknowledgments
|
|
108
235
|
|
|
109
|
-
|
|
236
|
+
This project is based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) and
|
|
237
|
+
[Qwen Code](https://github.com/QwenLM/qwen-code). We acknowledge and appreciate the excellent
|
|
238
|
+
work of both teams. This fork focuses on Termux/Android compatibility and Termux-specific
|
|
239
|
+
features.
|
|
110
240
|
|
|
111
241
|
## License
|
|
112
242
|
|
|
113
|
-
|
|
114
|
-
Apache License 2.0 (upstream Qwen Code)<br>
|
|
115
|
-
Termux-port maintenance by Davide A. Guglielmi<br>
|
|
116
|
-
See [LICENSE](./LICENSE) for details and upstream terms.<br>
|
|
117
|
-
Made in Italy 🇮🇹
|
|
243
|
+
Apache-2.0 — see [LICENSE](./LICENSE)
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: review
|
|
3
|
+
description: Review changed code for correctness, security, code quality, and performance. Use when the user asks to review code changes, a PR, or specific files. Invoke with `/review`, `/review <pr-number>`, or `/review <file-path>`.
|
|
4
|
+
allowedTools:
|
|
5
|
+
- task
|
|
6
|
+
- run_shell_command
|
|
7
|
+
- grep_search
|
|
8
|
+
- read_file
|
|
9
|
+
- glob
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Code Review
|
|
13
|
+
|
|
14
|
+
You are an expert code reviewer. Your job is to review code changes and provide actionable feedback.
|
|
15
|
+
|
|
16
|
+
## Step 1: Determine what to review
|
|
17
|
+
|
|
18
|
+
Your goal here is to understand the scope of changes so you can dispatch agents effectively in Step 2. Based on the arguments provided:
|
|
19
|
+
|
|
20
|
+
- **No arguments**: Review local uncommitted changes
|
|
21
|
+
- Run `git diff` and `git diff --staged` to get all changes
|
|
22
|
+
- If both diffs are empty, inform the user there are no changes to review and stop here — do not proceed to the review agents
|
|
23
|
+
|
|
24
|
+
- **PR number or URL** (e.g., `123` or `https://github.com/.../pull/123`):
|
|
25
|
+
- Save the current branch name, stash any local changes (`git stash --include-untracked`), then `gh pr checkout <number>`
|
|
26
|
+
- Run `gh pr view <number>` and save the output (title, description, base branch, etc.) to a temp file (e.g., `/tmp/pr-review-context.md`) so agents can read it without you repeating it in each prompt
|
|
27
|
+
- Note the base branch (e.g., `main`) — agents will use `git diff <base>...HEAD` to get the diff and can read files directly
|
|
28
|
+
|
|
29
|
+
- **File path** (e.g., `src/foo.ts`):
|
|
30
|
+
- Run `git diff HEAD -- <file>` to get recent changes
|
|
31
|
+
- If no diff, read the file and review its current state
|
|
32
|
+
|
|
33
|
+
## Step 2: Parallel multi-dimensional review
|
|
34
|
+
|
|
35
|
+
Launch **four parallel review agents** to analyze the changes from different angles. Each agent should focus exclusively on its dimension.
|
|
36
|
+
|
|
37
|
+
**IMPORTANT**: Do NOT paste the full diff into each agent's prompt — this duplicates it 4x. Instead, give each agent the command to obtain the diff, a concise summary of what the changes are about, and its review focus. Each agent can read files and search the codebase on its own.
|
|
38
|
+
|
|
39
|
+
### Agent 1: Correctness & Security
|
|
40
|
+
|
|
41
|
+
Focus areas:
|
|
42
|
+
|
|
43
|
+
- Logic errors and edge cases
|
|
44
|
+
- Null/undefined handling
|
|
45
|
+
- Race conditions and concurrency issues
|
|
46
|
+
- Security vulnerabilities (injection, XSS, SSRF, path traversal, etc.)
|
|
47
|
+
- Type safety issues
|
|
48
|
+
- Error handling gaps
|
|
49
|
+
|
|
50
|
+
### Agent 2: Code Quality
|
|
51
|
+
|
|
52
|
+
Focus areas:
|
|
53
|
+
|
|
54
|
+
- Code style consistency with the surrounding codebase
|
|
55
|
+
- Naming conventions (variables, functions, classes)
|
|
56
|
+
- Code duplication and opportunities for reuse
|
|
57
|
+
- Over-engineering or unnecessary abstraction
|
|
58
|
+
- Missing or misleading comments
|
|
59
|
+
- Dead code
|
|
60
|
+
|
|
61
|
+
### Agent 3: Performance & Efficiency
|
|
62
|
+
|
|
63
|
+
Focus areas:
|
|
64
|
+
|
|
65
|
+
- Performance bottlenecks (N+1 queries, unnecessary loops, etc.)
|
|
66
|
+
- Memory leaks or excessive memory usage
|
|
67
|
+
- Unnecessary re-renders (for UI code)
|
|
68
|
+
- Inefficient algorithms or data structures
|
|
69
|
+
- Missing caching opportunities
|
|
70
|
+
- Bundle size impact
|
|
71
|
+
|
|
72
|
+
### Agent 4: Undirected Audit
|
|
73
|
+
|
|
74
|
+
No preset dimension. Review the code with a completely fresh perspective to catch issues the other three agents may miss.
|
|
75
|
+
Focus areas:
|
|
76
|
+
|
|
77
|
+
- Business logic soundness and correctness of assumptions
|
|
78
|
+
- Boundary interactions between modules or services
|
|
79
|
+
- Implicit assumptions that may break under different conditions
|
|
80
|
+
- Unexpected side effects or hidden coupling
|
|
81
|
+
- Anything else that looks off — trust your instincts
|
|
82
|
+
|
|
83
|
+
## Step 3: Restore environment and present findings
|
|
84
|
+
|
|
85
|
+
If you checked out a PR branch in Step 1, restore the original state first: check out the original branch, `git stash pop` if changes were stashed, and remove the temp file.
|
|
86
|
+
|
|
87
|
+
Then combine results from all four agents into a single, well-organized review. Use this format:
|
|
88
|
+
|
|
89
|
+
### Summary
|
|
90
|
+
|
|
91
|
+
A 1-2 sentence overview of the changes and overall assessment.
|
|
92
|
+
|
|
93
|
+
### Findings
|
|
94
|
+
|
|
95
|
+
Use severity levels:
|
|
96
|
+
|
|
97
|
+
- **Critical** — Must fix before merging. Bugs, security issues, data loss risks.
|
|
98
|
+
- **Suggestion** — Recommended improvement. Better patterns, clearer code, potential issues.
|
|
99
|
+
- **Nice to have** — Optional optimization. Minor style tweaks, small performance gains.
|
|
100
|
+
|
|
101
|
+
For each finding, include:
|
|
102
|
+
|
|
103
|
+
1. **File and line reference** (e.g., `src/foo.ts:42`)
|
|
104
|
+
2. **What's wrong** — Clear description of the issue
|
|
105
|
+
3. **Why it matters** — Impact if not addressed
|
|
106
|
+
4. **Suggested fix** — Concrete code suggestion when possible
|
|
107
|
+
|
|
108
|
+
### Verdict
|
|
109
|
+
|
|
110
|
+
One of:
|
|
111
|
+
|
|
112
|
+
- **Approve** — No critical issues, good to merge
|
|
113
|
+
- **Request changes** — Has critical issues that need fixing
|
|
114
|
+
- **Comment** — Has suggestions but no blockers
|
|
115
|
+
|
|
116
|
+
## Guidelines
|
|
117
|
+
|
|
118
|
+
- Be specific and actionable. Avoid vague feedback like "could be improved."
|
|
119
|
+
- Reference the existing codebase conventions — don't impose external style preferences.
|
|
120
|
+
- Focus on the diff, not pre-existing issues in unchanged code.
|
|
121
|
+
- Keep the review concise. Don't repeat the same point for every occurrence.
|
|
122
|
+
- When suggesting a fix, show the actual code change.
|
|
123
|
+
- Flag any exposed secrets, credentials, API keys, or tokens in the diff as **Critical**.
|