@mmmbuto/qwen-code-termux 0.6.407-termux → 0.10.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.
Files changed (37) hide show
  1. package/README.md +62 -158
  2. package/dist/cli.js +155457 -135244
  3. package/package.json +13 -20
  4. package/dist/tiktoken_bg.wasm +0 -0
  5. package/scripts/build.js +0 -55
  6. package/scripts/build_package.js +0 -37
  7. package/scripts/build_sandbox.js +0 -196
  8. package/scripts/build_vscode_companion.js +0 -30
  9. package/scripts/check-build-status.js +0 -148
  10. package/scripts/check-i18n.ts +0 -462
  11. package/scripts/check-lockfile.js +0 -74
  12. package/scripts/clean.js +0 -59
  13. package/scripts/copy_bundle_assets.js +0 -128
  14. package/scripts/copy_files.js +0 -86
  15. package/scripts/create_alias.sh +0 -39
  16. package/scripts/esbuild-shims.js +0 -29
  17. package/scripts/generate-git-commit-info.js +0 -71
  18. package/scripts/get-release-version.js +0 -411
  19. package/scripts/lint.js +0 -205
  20. package/scripts/local_telemetry.js +0 -219
  21. package/scripts/postinstall.cjs +0 -14
  22. package/scripts/pre-commit.js +0 -22
  23. package/scripts/prepare-package.js +0 -156
  24. package/scripts/prepare-termux.cjs +0 -33
  25. package/scripts/sandbox_command.js +0 -126
  26. package/scripts/start.js +0 -83
  27. package/scripts/telemetry.js +0 -85
  28. package/scripts/telemetry_gcp.js +0 -188
  29. package/scripts/telemetry_utils.js +0 -439
  30. package/scripts/termux-tools/call.sh +0 -206
  31. package/scripts/termux-tools/discovery.sh +0 -382
  32. package/scripts/test-windows-paths.js +0 -51
  33. package/scripts/tests/get-release-version.test.js +0 -186
  34. package/scripts/tests/test-setup.ts +0 -12
  35. package/scripts/tests/vitest.config.ts +0 -26
  36. package/scripts/unused-keys-only-in-locales.json +0 -61
  37. package/scripts/version.js +0 -112
package/README.md CHANGED
@@ -1,204 +1,108 @@
1
- # 🤖 Qwen Code – Termux Edition
1
+ <div align="center">
2
2
 
3
- Android/Termux optimized fork of Qwen Code CLI. Installs cleanly on Termux
4
- with a native ARM64 PTY prebuild and mobile‑friendly fallbacks.
3
+ [![npm version](https://img.shields.io/npm/v/@mmmbuto/qwen-code-termux.svg)](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
4
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)
5
+ [![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)](https://nodejs.org/)
6
+ [![Downloads](https://img.shields.io/npm/dm/@mmmbuto/qwen-code-termux.svg)](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
7
+ [![Ko-fi](https://img.shields.io/badge/Ko--fi-Support%20me-ff5e5b?logo=ko-fi&logoColor=white)](https://ko-fi.com/dionanos)
5
8
 
6
- [![npm](https://img.shields.io/npm/v/@mmmbuto/qwen-code-termux?style=flat-square&logo=npm)](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
7
- [![downloads](https://img.shields.io/npm/dt/@mmmbuto/qwen-code-termux?style=flat-square)](https://www.npmjs.com/package/@mmmbuto/qwen-code-termux)
8
- [![ko-fi](https://img.shields.io/badge/☕_Support-Ko--fi-FF5E5B?style=flat-square&logo=ko-fi)](https://ko-fi.com/dionanos)
9
+ **An open-source AI agent that lives in your terminal — Termux Edition (Android).**
9
10
 
10
- ---
11
+ <a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> |
12
+ <a href="https://qwenlm.github.io/qwen-code-docs/de/users/overview">Deutsch</a> |
13
+ <a href="https://qwenlm.github.io/qwen-code-docs/fr/users/overview">français</a> |
14
+ <a href="https://qwenlm.github.io/qwen-code-docs/ja/users/overview">日本語</a> |
15
+ <a href="https://qwenlm.github.io/qwen-code-docs/ru/users/overview">Русский</a> |
16
+ <a href="https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview">Português (Brasil)</a>
11
17
 
12
- ## What This Is
18
+ </div>
13
19
 
14
- **Optimized Termux edition** of `QwenLM/qwen-code`.
20
+ Qwen Code is an open-source AI agent for the terminal, optimized for **Qwen3-Coder**.
21
+ This repository/package is a **Termux-first build** that keeps upstream behavior, while fixing the parts that commonly break on Android/Termux (notably PTY and a few runtime quirks).
15
22
 
16
- - **Termux‑First:** Android filesystem and shell fallbacks.
17
- - **Lightweight:** PTY via `@mmmbuto/node-pty-android-arm64`, no keychain deps.
18
- - **Up‑to‑Date:** Tracks upstream Qwen Code.
23
+ > **Not on Termux?** Use upstream: `npm install -g @qwen-code/qwen-code@latest` (or Homebrew).
24
+ > **On Termux?** Use this package: `npm install -g @mmmbuto/qwen-code-termux@latest`.
19
25
 
20
- ## Installation (Termux)
26
+ ![](https://gw.alicdn.com/imgextra/i1/O1CN01D2DviS1wwtEtMwIzJ_!!6000000006373-2-tps-1600-900.png)
21
27
 
22
- ```bash
23
- pkg update && pkg upgrade -y
24
- pkg install nodejs-lts -y
25
- npm install -g @mmmbuto/qwen-code-termux
28
+ ## Why a Termux Edition?
26
29
 
27
- qwen --version # expected: 0.6.405-termux
28
- ```
30
+ Upstream Qwen Code targets macOS/Linux/Windows. On Android/Termux, installs may fail due to native dependency issues (PTY / build tooling) and small environment differences.
29
31
 
30
- Build from source:
32
+ Termux Edition focuses on:
31
33
 
32
- ```bash
33
- git clone https://github.com/DioNanos/qwen-code-termux.git
34
- cd qwen-code-termux
35
- npm install
36
- npm run build && npm run bundle
37
- node dist/cli.js --version
38
- ```
34
+ - **Android PTY support** via `@mmmbuto/node-pty-android-arm64` (optional dependency)
35
+ - **Termux runtime patches** (polyfills/quirks, clipboard behavior)
36
+ - **Termux-safe install** (avoid node-gyp/husky pitfalls where possible)
37
+ - **Tested on-device** — see [test-reports/0.10.3-termux/](test-reports/0.10.3-termux/README.md)
39
38
 
40
- ## Quick Start
39
+ ## Installation (Termux / Android)
41
40
 
42
- ```bash
43
- qwen
44
- # then
45
- /help
46
- /auth
47
- ```
48
-
49
- ## Authentication
50
-
51
- Qwen Code supports two authentication methods:
41
+ ### Prerequisites
52
42
 
53
- - **Qwen OAuth (recommended & free)**: sign in with your `qwen.ai` account in a browser.
54
- - **OpenAI-compatible API**: use `OPENAI_API_KEY` (and optionally a custom base URL / model).
55
-
56
- ### Qwen OAuth (recommended)
57
-
58
- Start `qwen`, then run:
43
+ - Termux (recommended from F-Droid)
44
+ - Node.js **20+** (Termux `nodejs-lts` is recommended)
59
45
 
60
46
  ```bash
61
- /auth
47
+ pkg update -y && pkg upgrade -y
48
+ pkg install -y nodejs-lts git
62
49
  ```
63
50
 
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.
65
-
66
- ### OpenAI-compatible API (API key)
51
+ Optional (recommended) for extra tools:
67
52
 
68
- Environment variables (recommended for CI / headless environments):
53
+ - Install the **Termux:API** Android app
54
+ - Install the Termux package:
69
55
 
70
56
  ```bash
71
- export OPENAI_API_KEY="your-api-key-here"
72
- export OPENAI_BASE_URL="https://api.openai.com/v1" # optional
73
- export OPENAI_MODEL="gpt-4o" # optional
57
+ pkg install -y termux-api
74
58
  ```
75
59
 
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
- - **PTY:** prebuilt `@mmmbuto/node-pty-android-arm64` for interactive shells.
82
-
83
- ## Documentation & Fixes
84
-
85
- - **Test Suite**: [`QWEN_TEST_SUITE.md`](./QWEN_TEST_SUITE.md)
86
- - **Test Report**: [`QWEN_TEST_REPORT_v0.6.405-termux.md`](./QWEN_TEST_REPORT_v0.6.405-termux.md)
87
- (latest report; 0.6.405-termux)
88
- - **Patches**: [`docs/patches/README.md`](./docs/patches/README.md)
89
- - **Termux Fixes**: [`docs/patches/TERMUX_FIXES.md`](./docs/patches/TERMUX_FIXES.md)
90
-
91
- ## Usage
92
-
93
- As an open-source terminal agent, you can use Qwen Code in four primary ways:
94
-
95
- 1. Interactive mode (terminal UI)
96
- 2. Headless mode (scripts, CI)
97
- 3. IDE integration (VS Code, Zed)
98
- 4. TypeScript SDK
99
-
100
- #### Interactive mode
101
-
102
- ```bash
103
- cd your-project/
104
- qwen
105
- ```
106
-
107
- Run `qwen` in your project folder to launch the interactive terminal UI. Use `@` to reference local files (for example `@src/main.ts`).
108
-
109
- #### Headless mode
60
+ ### Install
110
61
 
111
62
  ```bash
112
- cd your-project/
113
- qwen -p "your question"
63
+ npm install -g @mmmbuto/qwen-code-termux@latest
64
+ qwen --version
114
65
  ```
115
66
 
116
- 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).
117
-
118
- #### IDE integration
119
-
120
- Use Qwen Code inside your editor (VS Code and Zed):
121
-
122
- - [Use in VS Code](https://qwenlm.github.io/qwen-code-docs/en/users/integration-vscode/)
123
- - [Use in Zed](https://qwenlm.github.io/qwen-code-docs/en/users/integration-zed/)
124
-
125
- #### TypeScript SDK
126
-
127
- Build on top of Qwen Code with the TypeScript SDK:
128
-
129
- - [Use the Qwen Code SDK](./packages/sdk-typescript/README.md)
130
-
131
- ## Commands & Shortcuts
132
-
133
- ### Session Commands
134
-
135
- - `/help` - Display available commands
136
- - `/clear` - Clear conversation history
137
- - `/compress` - Compress history to save tokens
138
- - `/stats` - Show current session information
139
- - `/bug` - Submit a bug report
140
- - `/exit` or `/quit` - Exit Qwen Code
141
-
142
- ### Keyboard Shortcuts
143
-
144
- - `Ctrl+C` - Cancel current operation
145
- - `Ctrl+D` - Exit (on empty line)
146
- - `Up/Down` - Navigate command history
147
-
148
- > Learn more about [Commands](https://qwenlm.github.io/qwen-code-docs/en/users/features/commands/)
149
-
150
- ## Updating
67
+ ## Quick Start
151
68
 
152
69
  ```bash
153
- npm install -g @mmmbuto/qwen-code-termux@latest
70
+ qwen # Interactive
71
+ qwen -p "Hello" # Non-interactive
72
+ qwen /help # Commands
73
+ qwen /auth # Authentication
154
74
  ```
155
75
 
156
- ### Versions
157
-
158
- - **latest / stable**: 0.6.405-termux
159
-
160
- ## Benchmark Results
161
-
162
- ### Terminal-Bench Performance
76
+ ## Resources
163
77
 
164
- | Agent | Model | Accuracy |
165
- | --------- | ------------------ | -------- |
166
- | Qwen Code | Qwen3-Coder-480A35 | 37.5% |
167
- | Qwen Code | Qwen3-Coder-30BA3B | 31.3% |
78
+ - **Test Reports**: [test-reports/0.10.3-termux/](test-reports/0.10.3-termux/README.md)
79
+ - **Patches**: [patches/](patches/README.md)
80
+ - **Build**: [docs/developers/BUILDING.md](docs/developers/BUILDING.md)
81
+ - **Config**: [docs/users/configuration.md](docs/users/configuration.md)
168
82
 
169
- ## Ecosystem
83
+ ---
170
84
 
171
- Looking for a graphical interface?
85
+ ## Changelog & Releases
172
86
 
173
- - Web UI: [NexusCLI](https://github.com/DioNanos/nexuscli) - Optional web interface for Codex/Claude/Gemini
87
+ - [CHANGELOG.md](./CHANGELOG.md)
174
88
 
175
89
  ## Troubleshooting
176
90
 
177
- If you encounter issues, check the [troubleshooting guide](https://qwenlm.github.io/qwen-code-docs/en/users/support/troubleshooting/).
178
-
179
- To report a bug from within the CLI, run `/bug` and include a short title and repro steps.
91
+ If you encounter issues, check the [upstream troubleshooting guide](https://qwenlm.github.io/qwen-code-docs/en/users/support/troubleshooting/).
180
92
 
181
- ## License
93
+ To report a bug from within the CLI, run `/bug`.
182
94
 
183
- Apache 2.0 (same as upstream). See LICENSE.
95
+ ## Support
184
96
 
185
- ## Acknowledgments
97
+ If this Termux edition helps you, you can support the project on Ko-fi:
186
98
 
187
- Based on [Qwen Code](https://github.com/QwenLM/qwen-code), which is based on
188
- [Google Gemini CLI](https://github.com/google-gemini/gemini-cli).
99
+ - https://ko-fi.com/dionanos
189
100
 
190
- ## PTY Support (Shared Library)
101
+ ## Connect with Upstream
191
102
 
192
- This project uses `@mmmbuto/pty-termux-utils` as a shared library for PTY
193
- management across all Termux CLI projects (Gemini, Qwen, Nexus).
103
+ - Discord: https://discord.gg/ycKBjdNd
104
+ - Dingtalk: https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1
194
105
 
195
- - **Native PTY:** Uses `@mmmbuto/node-pty-android-arm64@~1.1.0` when available
196
- - **Linux ARM64:** Uses `@lydell/node-pty-linux-arm64@~1.2.0-beta.2` when available
197
- - **Fallback:** Gracefully degrades to `child_process` adapter
198
- - **Debug Logging:** Enable with `PTY_DEBUG=1` environment variable
199
- - **Architecture:** See `@mmmbuto/pty-termux-utils` documentation
106
+ ## Acknowledgments
200
107
 
201
- ```bash
202
- # Enable PTY debug logging
203
- PTY_DEBUG=1 qwen "your prompt"
204
- ```
108
+ This project is based on [Google Gemini CLI](https://github.com/google-gemini/gemini-cli). We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.