@mmmbuto/qwen-code-termux 0.14.0-termux → 0.14.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 +54 -152
- package/bundled/qc-helper/docs/configuration/settings.md +41 -16
- package/bundled/qc-helper/docs/features/_meta.ts +3 -0
- package/bundled/qc-helper/docs/features/approval-mode.md +16 -8
- package/bundled/qc-helper/docs/features/code-review.md +279 -0
- package/bundled/qc-helper/docs/features/commands.md +86 -3
- package/bundled/qc-helper/docs/features/followup-suggestions.md +109 -0
- package/bundled/qc-helper/docs/features/status-line.md +235 -0
- package/bundled/qc-helper/docs/overview.md +1 -0
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/DESIGN.md +165 -0
- package/bundled/review/SKILL.md +358 -88
- package/cli.js +45987 -42820
- package/locales/de.js +29 -1
- package/locales/en.js +29 -1
- package/locales/ja.js +27 -1
- package/locales/pt.js +29 -1
- package/locales/ru.js +29 -1
- package/locales/zh.js +27 -1
- package/package.json +7 -3
- package/scripts/postinstall.cjs +12 -0
- package/bundled/qc-helper/docs/configuration.md +0 -73
package/README.md
CHANGED
|
@@ -7,97 +7,71 @@
|
|
|
7
7
|
|
|
8
8
|
**An open-source AI agent that lives in your terminal — Termux Edition (Android).**
|
|
9
9
|
|
|
10
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/zh/users/overview">中文</a> |
|
|
11
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/de/users/overview">Deutsch</a> |
|
|
12
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/fr/users/overview">français</a> |
|
|
13
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/ja/users/overview">日本語</a> |
|
|
14
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/ru/users/overview">Русский</a> |
|
|
15
|
-
<a href="https://qwenlm.github.io/qwen-code-docs/pt-BR/users/overview">Português (Brasil)</a>
|
|
16
|
-
|
|
17
10
|
</div>
|
|
18
11
|
|
|
19
|
-
>
|
|
12
|
+
> News (2026-04-07): `v0.14.1-termux` is rebuilt from upstream `v0.14.1` on a clean history line for the Termux fork.
|
|
13
|
+
|
|
14
|
+
Qwen Code Termux is a clean fork of [QwenLM/qwen-code](https://github.com/QwenLM/qwen-code), rebuilt release-by-release from upstream and patched only where Android/Termux needs different behavior.
|
|
15
|
+
|
|
16
|
+
## Why a Termux fork?
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
This **Termux Edition** fork keeps upstream behaviour while fixing what breaks on Android/Termux.
|
|
18
|
+
Upstream targets desktop Unix and Windows first. On Android/Termux, the main breakpoints are:
|
|
23
19
|
|
|
24
|
-
|
|
20
|
+
- PTY availability on ARM64
|
|
21
|
+
- install-time scripts that are fine on desktop but noisy on Termux
|
|
22
|
+
- attention/notification workflows that are useful on mobile
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
native dependency issues (PTY, node-gyp) and environment quirks.
|
|
24
|
+
This fork keeps upstream behavior as close as possible while adding:
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
- Android ARM64 PTY fallback via `@mmmbuto/node-pty-android-arm64`
|
|
27
|
+
- optional `tts_notification` tool backed by `termux-tts-speak`
|
|
28
|
+
- Termux environment detection for runtime-specific behavior
|
|
29
|
+
- release docs and test suites intended to be run directly inside Termux
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
- **Termux runtime patches** (base64 polyfills, character encoding)
|
|
33
|
-
- **Termux-safe install** (skips husky + sandbox bundle on npm install)
|
|
34
|
-
- **TTS Notifications** — speak completion/alerts via `termux-tts-speak`
|
|
35
|
-
- **Tested on-device** — see [test-reports/](test-reports/)
|
|
31
|
+
## Installation
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
### Termux / Android
|
|
38
34
|
|
|
39
35
|
```bash
|
|
40
|
-
|
|
36
|
+
pkg install nodejs-lts
|
|
37
|
+
pkg install termux-api # optional, only for TTS
|
|
38
|
+
|
|
41
39
|
npm install -g @mmmbuto/qwen-code-termux@latest
|
|
42
40
|
qwen --version
|
|
43
41
|
```
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- [Termux (F-Droid)](https://f-droid.org/packages/com.termux/) — Google Play version has issues
|
|
48
|
-
- Node.js 20+ (`pkg install nodejs-lts`)
|
|
49
|
-
- `termux-api` package (optional, for TTS): `pkg install termux-api`
|
|
43
|
+
Requirements:
|
|
50
44
|
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
- [Termux from F-Droid](https://f-droid.org/packages/com.termux/)
|
|
46
|
+
- Node.js 20+
|
|
47
|
+
- `termux-api` only if you want TTS notifications
|
|
53
48
|
|
|
54
|
-
|
|
49
|
+
### Non-Termux platforms
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
Use upstream:
|
|
57
52
|
|
|
58
53
|
```bash
|
|
59
|
-
|
|
60
|
-
bash -c "$(curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh)"
|
|
61
|
-
|
|
62
|
-
# Windows (Admin CMD)
|
|
63
|
-
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
Or via Homebrew:
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
brew install qwen-code
|
|
54
|
+
npm install -g @qwen-code/qwen-code@latest
|
|
70
55
|
```
|
|
71
56
|
|
|
72
57
|
## Quick Start
|
|
73
58
|
|
|
74
59
|
```bash
|
|
75
|
-
cd your-project
|
|
60
|
+
cd your-project
|
|
76
61
|
qwen
|
|
77
|
-
|
|
78
|
-
# Then inside the session:
|
|
79
|
-
/help
|
|
80
|
-
/auth
|
|
81
62
|
```
|
|
82
63
|
|
|
83
|
-
|
|
64
|
+
Useful first commands:
|
|
84
65
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
What does this project do?
|
|
89
|
-
Explain the codebase structure.
|
|
90
|
-
Help me refactor this function.
|
|
91
|
-
Generate unit tests for this module.
|
|
92
|
-
```
|
|
66
|
+
- `/help`
|
|
67
|
+
- `/auth`
|
|
68
|
+
- `/model`
|
|
93
69
|
|
|
94
70
|
## Authentication
|
|
95
71
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
### API-KEY (recommended)
|
|
72
|
+
For headless or Termux-heavy workflows, API-key auth is the practical default.
|
|
99
73
|
|
|
100
|
-
|
|
74
|
+
Example `~/.qwen/settings.json`:
|
|
101
75
|
|
|
102
76
|
```json
|
|
103
77
|
{
|
|
@@ -107,7 +81,7 @@ Set up `~/.qwen/settings.json`:
|
|
|
107
81
|
"id": "qwen3.6-plus",
|
|
108
82
|
"name": "qwen3.6-plus",
|
|
109
83
|
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
|
|
110
|
-
"description": "
|
|
84
|
+
"description": "Qwen via DashScope OpenAI-compatible API",
|
|
111
85
|
"envKey": "DASHSCOPE_API_KEY"
|
|
112
86
|
}
|
|
113
87
|
]
|
|
@@ -126,77 +100,31 @@ Set up `~/.qwen/settings.json`:
|
|
|
126
100
|
}
|
|
127
101
|
```
|
|
128
102
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
```bash
|
|
132
|
-
qwen
|
|
133
|
-
/auth
|
|
134
|
-
# Complete browser flow
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
> OAuth requires a browser — not available over SSH/headless. Use API-KEY instead.
|
|
103
|
+
OAuth still works where a browser is available, but API-key auth is the safer recommendation on Termux and over SSH.
|
|
138
104
|
|
|
139
|
-
##
|
|
105
|
+
## Termux-specific features
|
|
140
106
|
|
|
141
|
-
###
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
qwen
|
|
145
|
-
# Use @ to reference files: @src/main.ts
|
|
146
|
-
```
|
|
107
|
+
### TTS notifications
|
|
147
108
|
|
|
148
|
-
|
|
109
|
+
If `termux-api` is installed, the fork exposes a `tts_notification` tool that can speak short alerts:
|
|
149
110
|
|
|
150
111
|
```bash
|
|
151
|
-
|
|
112
|
+
termux-tts-speak "Qwen Code Termux ready"
|
|
152
113
|
```
|
|
153
114
|
|
|
154
|
-
###
|
|
155
|
-
|
|
156
|
-
| Command | Description |
|
|
157
|
-
| ----------- | ------------------------------- |
|
|
158
|
-
| `/help` | Available commands |
|
|
159
|
-
| `/clear` | Clear history |
|
|
160
|
-
| `/compress` | Compress history to save tokens |
|
|
161
|
-
| `/stats` | Session info |
|
|
162
|
-
| `/bug` | Submit bug report |
|
|
163
|
-
| `/exit` | Quit |
|
|
115
|
+
### PTY fallback
|
|
164
116
|
|
|
165
|
-
|
|
117
|
+
The fork keeps upstream PTY loading first, then falls back to `@mmmbuto/node-pty-android-arm64` for Android ARM64.
|
|
166
118
|
|
|
167
|
-
|
|
168
|
-
- `Ctrl+D` — Exit (empty line)
|
|
169
|
-
- `Up/Down` — Command history
|
|
119
|
+
### Release testing from Termux
|
|
170
120
|
|
|
171
|
-
|
|
121
|
+
Run the documented Termux release checks from:
|
|
172
122
|
|
|
173
|
-
|
|
123
|
+
- [docs/developers/BUILDING.md](docs/developers/BUILDING.md)
|
|
124
|
+
- [test-reports/README.md](test-reports/README.md)
|
|
125
|
+
- [test-reports/suites/latest/termux.md](test-reports/suites/latest/termux.md)
|
|
174
126
|
|
|
175
|
-
|
|
176
|
-
using Android's text-to-speech engine:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
# Install termux-api for TTS
|
|
180
|
-
pkg install termux-api
|
|
181
|
-
|
|
182
|
-
# TTS is used automatically by the tts_notification tool
|
|
183
|
-
```
|
|
184
|
-
|
|
185
|
-
### PTY Support
|
|
186
|
-
|
|
187
|
-
Shell execution uses a PTY (pseudo-terminal) for proper ANSI colour and interactive
|
|
188
|
-
command support. On Termux, PTY deps are auto-installed on first `npm install`.
|
|
189
|
-
|
|
190
|
-
### Runtime Patches
|
|
191
|
-
|
|
192
|
-
| File | Purpose |
|
|
193
|
-
| --------------------------------------------- | ------------------------------ |
|
|
194
|
-
| `packages/core/src/patches/termux-runtime.ts` | Android base64 polyfill |
|
|
195
|
-
| `scripts/prepare-termux.cjs` | Skip husky + bundle on Termux |
|
|
196
|
-
| `scripts/postinstall.cjs` | Termux install confirmation |
|
|
197
|
-
| `packages/core/src/utils/termux-detect.ts` | `isTermux()` detection utility |
|
|
198
|
-
|
|
199
|
-
## Building from Source
|
|
127
|
+
## Building from source
|
|
200
128
|
|
|
201
129
|
```bash
|
|
202
130
|
git clone https://github.com/DioNanos/qwen-code-termux.git
|
|
@@ -204,47 +132,21 @@ cd qwen-code-termux
|
|
|
204
132
|
npm install
|
|
205
133
|
npm run build
|
|
206
134
|
npm run bundle
|
|
207
|
-
|
|
208
|
-
# Install globally
|
|
209
|
-
npm install -g
|
|
210
135
|
```
|
|
211
136
|
|
|
212
|
-
See [docs/developers/BUILDING.md](docs/developers/BUILDING.md) for
|
|
213
|
-
|
|
214
|
-
## Configuration
|
|
215
|
-
|
|
216
|
-
| File | Scope | Description |
|
|
217
|
-
| ----------------------- | ------- | ----------------------------- |
|
|
218
|
-
| `~/.qwen/settings.json` | User | Global settings (recommended) |
|
|
219
|
-
| `.qwen/settings.json` | Project | Project-level overrides |
|
|
220
|
-
|
|
221
|
-
See the [authentication guide](https://qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/) for all options.
|
|
222
|
-
|
|
223
|
-
> **Security note:** Never commit API keys to version control.
|
|
137
|
+
See [docs/developers/BUILDING.md](docs/developers/BUILDING.md) for the fork-specific notes.
|
|
224
138
|
|
|
225
139
|
## Troubleshooting
|
|
226
140
|
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
230
|
-
|
|
231
|
-
## Ecosystem
|
|
232
|
-
|
|
233
|
-
- [**AionUi**](https://github.com/iOfficeAI/AionUi) — Modern GUI for Qwen Code
|
|
234
|
-
- [**Gemini CLI Desktop**](https://github.com/Piebald-AI/gemini-cli-desktop) — Cross-platform desktop UI
|
|
235
|
-
|
|
236
|
-
## Connect
|
|
237
|
-
|
|
238
|
-
- [Discord](https://discord.gg/RN7tqZCeDK)
|
|
239
|
-
- [Dingtalk](https://qr.dingtalk.com/action/joingroup?code=v1,k1,+FX6Gf/ZDlTahTIRi8AEQhIaBlqykA0j+eBKKdhLeAE=&_dt_no_comment=1&origin=1)
|
|
141
|
+
- If you are not on Termux, install upstream instead of this fork.
|
|
142
|
+
- If shell execution is broken on Android, verify the PTY dependency is present.
|
|
143
|
+
- If TTS does nothing, install `termux-api` and check `termux-tts-speak`.
|
|
144
|
+
- For release validation, use the Termux suite in [test-reports/suites/latest/termux.md](test-reports/suites/latest/termux.md).
|
|
240
145
|
|
|
241
146
|
## Acknowledgments
|
|
242
147
|
|
|
243
|
-
This
|
|
244
|
-
[Qwen Code](https://github.com/QwenLM/qwen-code). We acknowledge and appreciate the excellent
|
|
245
|
-
work of both teams. This fork focuses on Termux/Android compatibility and Termux-specific
|
|
246
|
-
features.
|
|
148
|
+
This fork is based on [Qwen Code](https://github.com/QwenLM/qwen-code) and exists to keep a release-quality Termux track with minimal divergence from upstream.
|
|
247
149
|
|
|
248
150
|
## License
|
|
249
151
|
|
|
250
|
-
Apache-2.0
|
|
152
|
+
Apache-2.0
|
|
@@ -98,6 +98,7 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
98
98
|
| --------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
99
99
|
| `ui.theme` | string | The color theme for the UI. See [Themes](../configuration/themes) for available options. | `undefined` |
|
|
100
100
|
| `ui.customThemes` | object | Custom theme definitions. | `{}` |
|
|
101
|
+
| `ui.statusLine` | object | Custom status line configuration. A shell command whose output is shown in the footer's left section. See [Status Line](../features/status-line). | `undefined` |
|
|
101
102
|
| `ui.hideWindowTitle` | boolean | Hide the window title bar. | `false` |
|
|
102
103
|
| `ui.hideTips` | boolean | Hide helpful tips in the UI. | `false` |
|
|
103
104
|
| `ui.hideBanner` | boolean | Hide the application banner. | `false` |
|
|
@@ -105,10 +106,14 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
105
106
|
| `ui.showMemoryUsage` | boolean | Display memory usage information in the UI. | `false` |
|
|
106
107
|
| `ui.showLineNumbers` | boolean | Show line numbers in code blocks in the CLI output. | `true` |
|
|
107
108
|
| `ui.showCitations` | boolean | Show citations for generated text in the chat. | `true` |
|
|
109
|
+
| `ui.compactMode` | boolean | Hide tool output and thinking for a cleaner view. Toggle with `Ctrl+O` during a session. When enabled, a `compact` indicator appears in the footer. The setting persists across sessions. | `false` |
|
|
108
110
|
| `enableWelcomeBack` | boolean | Show welcome back dialog when returning to a project with conversation history. When enabled, Qwen Code will automatically detect if you're returning to a project with a previously generated project summary (`.qwen/PROJECT_SUMMARY.md`) and show a dialog allowing you to continue your previous conversation or start fresh. This feature integrates with the `/summary` command and quit confirmation dialog. | `true` |
|
|
109
111
|
| `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility). | `true` |
|
|
110
112
|
| `ui.accessibility.screenReader` | boolean | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | `false` |
|
|
111
113
|
| `ui.customWittyPhrases` | array of strings | A list of custom phrases to display during loading states. When provided, the CLI will cycle through these phrases instead of the default ones. | `[]` |
|
|
114
|
+
| `ui.enableFollowupSuggestions` | boolean | Enable [followup suggestions](../features/followup-suggestions) that predict what you want to type next after the model responds. Suggestions appear as ghost text and can be accepted with Tab, Enter, or Right Arrow. | `true` |
|
|
115
|
+
| `ui.enableCacheSharing` | boolean | Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental). | `true` |
|
|
116
|
+
| `ui.enableSpeculation` | boolean | Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental). | `false` |
|
|
112
117
|
|
|
113
118
|
#### ide
|
|
114
119
|
|
|
@@ -165,6 +170,18 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
165
170
|
}
|
|
166
171
|
```
|
|
167
172
|
|
|
173
|
+
**max_tokens (adaptive output tokens):**
|
|
174
|
+
|
|
175
|
+
When `samplingParams.max_tokens` is not set, Qwen Code uses an adaptive output token strategy to optimize GPU resource usage:
|
|
176
|
+
|
|
177
|
+
1. Requests start with a default limit of **8K** output tokens
|
|
178
|
+
2. If the response is truncated (the model hits the limit), Qwen Code automatically retries with **64K** tokens
|
|
179
|
+
3. The partial output is discarded and replaced with the full response from the retry
|
|
180
|
+
|
|
181
|
+
This is transparent to users — you may briefly see a retry indicator if escalation occurs. Since 99% of responses are under 5K tokens, the retry happens rarely (<1% of requests).
|
|
182
|
+
|
|
183
|
+
To override this behavior, either set `samplingParams.max_tokens` in your settings or use the `QWEN_CODE_MAX_OUTPUT_TOKENS` environment variable.
|
|
184
|
+
|
|
168
185
|
**contextWindowSize:**
|
|
169
186
|
|
|
170
187
|
Overrides the default context window size for the selected model. Qwen Code determines the context window using built-in defaults based on model name matching, with a constant fallback value. Use this setting when a provider's effective context limit differs from Qwen Code's default. This value defines the model's assumed maximum context capacity, not a per-request token limit.
|
|
@@ -185,6 +202,12 @@ The `extra_body` field allows you to add custom parameters to the request body s
|
|
|
185
202
|
- `"./custom-logs"` - Logs to `./custom-logs` relative to current directory
|
|
186
203
|
- `"/tmp/openai-logs"` - Logs to absolute path `/tmp/openai-logs`
|
|
187
204
|
|
|
205
|
+
#### fastModel
|
|
206
|
+
|
|
207
|
+
| Setting | Type | Description | Default |
|
|
208
|
+
| ----------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
209
|
+
| `fastModel` | string | Model used for generating [prompt suggestions](../features/followup-suggestions) and speculative execution. Leave empty to use the main model. A smaller/faster model (e.g., `qwen3-coder-flash`) reduces latency and cost. Can also be set via `/model --fast`. | `""` |
|
|
210
|
+
|
|
188
211
|
#### context
|
|
189
212
|
|
|
190
213
|
| Setting | Type | Description | Default |
|
|
@@ -197,6 +220,7 @@ The `extra_body` field allows you to add custom parameters to the request body s
|
|
|
197
220
|
| `context.fileFiltering.respectQwenIgnore` | boolean | Respect .qwenignore files when searching. | `true` |
|
|
198
221
|
| `context.fileFiltering.enableRecursiveFileSearch` | boolean | Whether to enable searching recursively for filenames under the current tree when completing `@` prefixes in the prompt. | `true` |
|
|
199
222
|
| `context.fileFiltering.enableFuzzySearch` | boolean | When `true`, enables fuzzy search capabilities when searching for files. Set to `false` to improve performance on projects with a large number of files. | `true` |
|
|
223
|
+
| `context.gapThresholdMinutes` | number | Minutes of inactivity after which retained thinking blocks are cleared to free context tokens. Aligns with typical provider prompt-cache TTL. Set higher if your provider has a longer cache TTL. | `5` |
|
|
200
224
|
|
|
201
225
|
#### Troubleshooting File Search Performance
|
|
202
226
|
|
|
@@ -481,22 +505,23 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
|
|
|
481
505
|
|
|
482
506
|
### Environment Variables Table
|
|
483
507
|
|
|
484
|
-
| Variable | Description
|
|
485
|
-
| ------------------------------ |
|
|
486
|
-
| `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it.
|
|
487
|
-
| `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`).
|
|
488
|
-
| `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry.
|
|
489
|
-
| `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`).
|
|
490
|
-
| `QWEN_TELEMETRY_LOG_PROMPTS` | Set to `true` or `1` to enable or disable logging of user prompts. Any other value is treated as disabling it.
|
|
491
|
-
| `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`.
|
|
492
|
-
| `QWEN_TELEMETRY_USE_COLLECTOR` | Set to `true` or `1` to enable or disable using an external OTLP collector. Any other value is treated as disabling it.
|
|
493
|
-
| `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`.
|
|
494
|
-
| `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS.
|
|
495
|
-
| `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting.
|
|
496
|
-
| `NO_COLOR` | Set to any value to disable all color output in the CLI.
|
|
497
|
-
| `CLI_TITLE` | Set to a string to customize the title of the CLI.
|
|
498
|
-
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server.
|
|
499
|
-
| `
|
|
508
|
+
| Variable | Description | Notes |
|
|
509
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
510
|
+
| `QWEN_TELEMETRY_ENABLED` | Set to `true` or `1` to enable telemetry. Any other value is treated as disabling it. | Overrides the `telemetry.enabled` setting. |
|
|
511
|
+
| `QWEN_TELEMETRY_TARGET` | Sets the telemetry target (`local` or `gcp`). | Overrides the `telemetry.target` setting. |
|
|
512
|
+
| `QWEN_TELEMETRY_OTLP_ENDPOINT` | Sets the OTLP endpoint for telemetry. | Overrides the `telemetry.otlpEndpoint` setting. |
|
|
513
|
+
| `QWEN_TELEMETRY_OTLP_PROTOCOL` | Sets the OTLP protocol (`grpc` or `http`). | Overrides the `telemetry.otlpProtocol` setting. |
|
|
514
|
+
| `QWEN_TELEMETRY_LOG_PROMPTS` | Set to `true` or `1` to enable or disable logging of user prompts. Any other value is treated as disabling it. | Overrides the `telemetry.logPrompts` setting. |
|
|
515
|
+
| `QWEN_TELEMETRY_OUTFILE` | Sets the file path to write telemetry to when the target is `local`. | Overrides the `telemetry.outfile` setting. |
|
|
516
|
+
| `QWEN_TELEMETRY_USE_COLLECTOR` | Set to `true` or `1` to enable or disable using an external OTLP collector. Any other value is treated as disabling it. | Overrides the `telemetry.useCollector` setting. |
|
|
517
|
+
| `QWEN_SANDBOX` | Alternative to the `sandbox` setting in `settings.json`. | Accepts `true`, `false`, `docker`, `podman`, or a custom command string. |
|
|
518
|
+
| `SEATBELT_PROFILE` | (macOS specific) Switches the Seatbelt (`sandbox-exec`) profile on macOS. | `permissive-open`: (Default) Restricts writes to the project folder (and a few other folders, see `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other operations. `strict`: Uses a strict profile that declines operations by default. `<profile_name>`: Uses a custom profile. To define a custom profile, create a file named `sandbox-macos-<profile_name>.sb` in your project's `.qwen/` directory (e.g., `my-project/.qwen/sandbox-macos-custom.sb`). |
|
|
519
|
+
| `DEBUG` or `DEBUG_MODE` | (often used by underlying libraries or the CLI itself) Set to `true` or `1` to enable verbose debug logging, which can be helpful for troubleshooting. | **Note:** These variables are automatically excluded from project `.env` files by default to prevent interference with the CLI behavior. Use `.qwen/.env` files if you need to set these for Qwen Code specifically. |
|
|
520
|
+
| `NO_COLOR` | Set to any value to disable all color output in the CLI. | |
|
|
521
|
+
| `CLI_TITLE` | Set to a string to customize the title of the CLI. | |
|
|
522
|
+
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
|
|
523
|
+
| `QWEN_CODE_MAX_OUTPUT_TOKENS` | Overrides the default maximum output tokens per response. When not set, Qwen Code uses an adaptive strategy: starts with 8K tokens and automatically retries with 64K if the response is truncated. Set this to a specific value (e.g., `16000`) to use a fixed limit instead. | Takes precedence over the capped default (8K) but is overridden by `samplingParams.max_tokens` in settings. Disables automatic escalation when set. Example: `export QWEN_CODE_MAX_OUTPUT_TOKENS=16000` |
|
|
524
|
+
| `TAVILY_API_KEY` | Your API key for the Tavily web search service. | Used to enable the `web_search` tool functionality. Example: `export TAVILY_API_KEY="tvly-your-api-key-here"` |
|
|
500
525
|
|
|
501
526
|
## Command-Line Arguments
|
|
502
527
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
commands: 'Commands',
|
|
3
|
+
'code-review': 'Code Review',
|
|
4
|
+
'followup-suggestions': 'Followup Suggestions',
|
|
3
5
|
'sub-agents': 'SubAgents',
|
|
4
6
|
arena: 'Agent Arena',
|
|
5
7
|
skills: 'Skills',
|
|
@@ -15,5 +17,6 @@ export default {
|
|
|
15
17
|
language: 'i18n',
|
|
16
18
|
channels: 'Channels',
|
|
17
19
|
hooks: 'Hooks',
|
|
20
|
+
'status-line': 'Status Line',
|
|
18
21
|
'scheduled-tasks': 'Scheduled Tasks',
|
|
19
22
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Approval Mode
|
|
2
2
|
|
|
3
|
-
Qwen Code offers
|
|
3
|
+
Qwen Code offers four distinct permission modes that allow you to flexibly control how AI interacts with your code and system based on task complexity and risk level.
|
|
4
4
|
|
|
5
5
|
## Permission Modes Comparison
|
|
6
6
|
|
|
@@ -40,6 +40,18 @@ You can switch into Plan Mode during a session using **Shift+Tab** (or **Tab** o
|
|
|
40
40
|
|
|
41
41
|
If you are in Normal Mode, **Shift+Tab** (or **Tab** on Windows) first switches into `auto-edits` Mode, indicated by `⏵⏵ accept edits on` at the bottom of the terminal. A subsequent **Shift+Tab** (or **Tab** on Windows) will switch into Plan Mode, indicated by `⏸ plan mode`.
|
|
42
42
|
|
|
43
|
+
**Use the `/plan` command**
|
|
44
|
+
|
|
45
|
+
The `/plan` command provides a quick shortcut for entering and exiting Plan Mode:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
/plan # Enter plan mode
|
|
49
|
+
/plan refactor the auth module # Enter plan mode and start planning
|
|
50
|
+
/plan exit # Exit plan mode, restore previous mode
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
When you exit Plan Mode with `/plan exit`, your previous approval mode is automatically restored (e.g., if you were in Auto-Edit before entering Plan Mode, you'll return to Auto-Edit).
|
|
54
|
+
|
|
43
55
|
**Start a new session in Plan Mode**
|
|
44
56
|
|
|
45
57
|
To start a new session in Plan Mode, use the `/approval-mode` then select `plan`
|
|
@@ -59,14 +71,10 @@ qwen --prompt "What is machine learning?"
|
|
|
59
71
|
### Example: Planning a complex refactor
|
|
60
72
|
|
|
61
73
|
```bash
|
|
62
|
-
/
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
|
|
74
|
+
/plan I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
Qwen Code analyzes the current implementation
|
|
77
|
+
Qwen Code enters Plan Mode and analyzes the current implementation to create a comprehensive plan. Refine with follow-ups:
|
|
70
78
|
|
|
71
79
|
```
|
|
72
80
|
What about backward compatibility?
|
|
@@ -235,7 +243,7 @@ qwen --prompt "Run the test suite, fix all failing tests, then commit changes"
|
|
|
235
243
|
|
|
236
244
|
### Keyboard Shortcut Switching
|
|
237
245
|
|
|
238
|
-
During a Qwen Code session, use **Shift+Tab** (or **Tab** on Windows) to quickly cycle through the
|
|
246
|
+
During a Qwen Code session, use **Shift+Tab** (or **Tab** on Windows) to quickly cycle through the four modes:
|
|
239
247
|
|
|
240
248
|
```
|
|
241
249
|
Default Mode → Auto-Edit Mode → YOLO Mode → Plan Mode → Default Mode
|