@qwen-code/qwen-code 0.14.5 → 0.15.0-preview.1
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 +83 -19
- package/bundled/batch/SKILL.md +303 -0
- package/bundled/qc-helper/docs/configuration/settings.md +110 -66
- package/bundled/qc-helper/docs/features/_meta.ts +2 -0
- package/bundled/qc-helper/docs/features/commands.md +66 -11
- package/bundled/qc-helper/docs/features/dual-output.md +593 -0
- package/bundled/qc-helper/docs/features/hooks.md +297 -122
- package/bundled/qc-helper/docs/features/mcp.md +100 -14
- package/bundled/qc-helper/docs/features/memory.md +168 -0
- package/bundled/qc-helper/docs/features/status-line.md +36 -10
- package/bundled/qc-helper/docs/overview.md +4 -4
- package/bundled/qc-helper/docs/quickstart.md +14 -9
- package/bundled/qc-helper/docs/support/troubleshooting.md +9 -3
- package/cli.js +99009 -81404
- package/locales/de.js +49 -0
- package/locales/en.js +52 -0
- package/locales/ja.js +49 -0
- package/locales/pt.js +50 -0
- package/locales/ru.js +48 -0
- package/locales/zh.js +51 -0
- package/package.json +2 -2
- package/bundled/qc-helper/docs/configuration/memory.md +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> [!tip]
|
|
4
4
|
>
|
|
5
|
-
> **Authentication / API keys:** Authentication (
|
|
5
|
+
> **Authentication / API keys:** Authentication (API Key, Alibaba Cloud Coding Plan) and auth-related environment variables (like `OPENAI_API_KEY`) are documented in **[Authentication](../configuration/auth)**.
|
|
6
6
|
|
|
7
7
|
> [!note]
|
|
8
8
|
>
|
|
@@ -77,14 +77,15 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
77
77
|
|
|
78
78
|
#### general
|
|
79
79
|
|
|
80
|
-
| Setting | Type | Description
|
|
81
|
-
| ------------------------------- | ------- |
|
|
82
|
-
| `general.preferredEditor` | string | The preferred editor to open files in.
|
|
83
|
-
| `general.vimMode` | boolean | Enable Vim keybindings.
|
|
84
|
-
| `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup.
|
|
85
|
-
| `general.
|
|
86
|
-
| `general.
|
|
87
|
-
| `general.
|
|
80
|
+
| Setting | Type | Description | Default |
|
|
81
|
+
| ------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
82
|
+
| `general.preferredEditor` | string | The preferred editor to open files in. | `undefined` |
|
|
83
|
+
| `general.vimMode` | boolean | Enable Vim keybindings. | `false` |
|
|
84
|
+
| `general.enableAutoUpdate` | boolean | Enable automatic update checks and installations on startup. | `true` |
|
|
85
|
+
| `general.showSessionRecap` | boolean | Auto-show a one-line "where you left off" recap when returning to the terminal after being away for 5+ minutes. Off by default. Use `/recap` to trigger manually regardless of this setting. | `false` |
|
|
86
|
+
| `general.gitCoAuthor` | boolean | Automatically add a Co-authored-by trailer to git commit messages when commits are made through Qwen Code. | `true` |
|
|
87
|
+
| `general.checkpointing.enabled` | boolean | Enable session checkpointing for recovery. | `false` |
|
|
88
|
+
| `general.defaultFileEncoding` | string | Default encoding for new files. Use `"utf-8"` (default) for UTF-8 without BOM, or `"utf-8-bom"` for UTF-8 with BOM. Only change this if your project specifically requires BOM. | `"utf-8"` |
|
|
88
89
|
|
|
89
90
|
#### output
|
|
90
91
|
|
|
@@ -94,26 +95,26 @@ Settings are organized into categories. All settings should be placed within the
|
|
|
94
95
|
|
|
95
96
|
#### ui
|
|
96
97
|
|
|
97
|
-
| Setting | Type | Description
|
|
98
|
-
| --------------------------------------- | ---------------- |
|
|
99
|
-
| `ui.theme` | string | The color theme for the UI. See [Themes](../configuration/themes) for available options.
|
|
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).
|
|
102
|
-
| `ui.hideWindowTitle` | boolean | Hide the window title bar.
|
|
103
|
-
| `ui.hideTips` | boolean | Hide all tips (startup and post-response) in the UI. See [Contextual Tips](../features/tips).
|
|
104
|
-
| `ui.hideBanner` | boolean | Hide the application banner.
|
|
105
|
-
| `ui.hideFooter` | boolean | Hide the footer from the UI.
|
|
106
|
-
| `ui.showMemoryUsage` | boolean | Display memory usage information in the UI.
|
|
107
|
-
| `ui.showLineNumbers` | boolean | Show line numbers in code blocks in the CLI output.
|
|
108
|
-
| `ui.showCitations` | boolean | Show citations for generated text in the chat.
|
|
109
|
-
| `ui.compactMode` | boolean | Hide tool output and thinking for a cleaner view. Toggle with `Ctrl+O` during a session.
|
|
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` |
|
|
111
|
-
| `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility).
|
|
112
|
-
| `ui.accessibility.screenReader` | boolean | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers.
|
|
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.
|
|
115
|
-
| `ui.enableCacheSharing` | boolean | Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental).
|
|
116
|
-
| `ui.enableSpeculation` | boolean | Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental).
|
|
98
|
+
| Setting | Type | Description | Default |
|
|
99
|
+
| --------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
100
|
+
| `ui.theme` | string | The color theme for the UI. See [Themes](../configuration/themes) for available options. | `undefined` |
|
|
101
|
+
| `ui.customThemes` | object | Custom theme definitions. | `{}` |
|
|
102
|
+
| `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` |
|
|
103
|
+
| `ui.hideWindowTitle` | boolean | Hide the window title bar. | `false` |
|
|
104
|
+
| `ui.hideTips` | boolean | Hide all tips (startup and post-response) in the UI. See [Contextual Tips](../features/tips). | `false` |
|
|
105
|
+
| `ui.hideBanner` | boolean | Hide the application banner. | `false` |
|
|
106
|
+
| `ui.hideFooter` | boolean | Hide the footer from the UI. | `false` |
|
|
107
|
+
| `ui.showMemoryUsage` | boolean | Display memory usage information in the UI. | `false` |
|
|
108
|
+
| `ui.showLineNumbers` | boolean | Show line numbers in code blocks in the CLI output. | `true` |
|
|
109
|
+
| `ui.showCitations` | boolean | Show citations for generated text in the chat. | `true` |
|
|
110
|
+
| `ui.compactMode` | boolean | Hide tool output and thinking for a cleaner view. Toggle with `Ctrl+O` during a session or via the Settings dialog. Tool approval prompts are never hidden, even in compact mode. The setting persists across sessions. | `false` |
|
|
111
|
+
| `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. If you choose **Start new chat session**, that choice is remembered for the current project until the project summary changes. This feature integrates with the `/summary` command and quit confirmation dialog. | `true` |
|
|
112
|
+
| `ui.accessibility.enableLoadingPhrases` | boolean | Enable loading phrases (disable for accessibility). | `true` |
|
|
113
|
+
| `ui.accessibility.screenReader` | boolean | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | `false` |
|
|
114
|
+
| `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. | `[]` |
|
|
115
|
+
| `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` |
|
|
116
|
+
| `ui.enableCacheSharing` | boolean | Use cache-aware forked queries for suggestion generation. Reduces cost on providers that support prefix caching (experimental). | `true` |
|
|
117
|
+
| `ui.enableSpeculation` | boolean | Speculatively execute accepted suggestions before submission. Results appear instantly when you accept (experimental). | `false` |
|
|
117
118
|
|
|
118
119
|
#### ide
|
|
119
120
|
|
|
@@ -254,6 +255,15 @@ If you are experiencing performance issues with file searching (e.g., with `@` c
|
|
|
254
255
|
>
|
|
255
256
|
> **Migrating from `tools.core` / `tools.exclude` / `tools.allowed`:** These legacy settings are **deprecated** and automatically migrated to the new `permissions` format on first load. Prefer configuring `permissions.allow` / `permissions.deny` directly. Use `/permissions` to manage rules interactively.
|
|
256
257
|
|
|
258
|
+
#### memory
|
|
259
|
+
|
|
260
|
+
| Setting | Type | Description | Default |
|
|
261
|
+
| -------------------------------- | ------- | --------------------------------------------------------------------------------- | ------- |
|
|
262
|
+
| `memory.enableManagedAutoMemory` | boolean | Enable background extraction of memories from conversations. | `true` |
|
|
263
|
+
| `memory.enableManagedAutoDream` | boolean | Enable automatic consolidation (deduplication and cleanup) of collected memories. | `false` |
|
|
264
|
+
|
|
265
|
+
See [Memory](../features/memory) for details on how auto-memory works and how to use the `/memory`, `/remember`, and `/dream` commands.
|
|
266
|
+
|
|
257
267
|
#### permissions
|
|
258
268
|
|
|
259
269
|
The permissions system provides fine-grained control over which tools can run, which require confirmation, and which are blocked.
|
|
@@ -347,6 +357,39 @@ Permission rules for `Read`, `Edit`, and `WebFetch` are also enforced when the a
|
|
|
347
357
|
> [!tip]
|
|
348
358
|
> Use `/permissions` in the interactive CLI to view, add, and remove rules without editing `settings.json` directly.
|
|
349
359
|
|
|
360
|
+
#### slashCommands
|
|
361
|
+
|
|
362
|
+
Controls which slash commands are available in the CLI. Useful for locking down
|
|
363
|
+
the command surface in multi-tenant or enterprise deployments.
|
|
364
|
+
|
|
365
|
+
| Setting | Type | Description | Default |
|
|
366
|
+
| ------------------------ | ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
|
|
367
|
+
| `slashCommands.disabled` | array of strings | Slash command names to hide and refuse to execute. Matched case-insensitively against the final command name (for extension commands this is the disambiguated form, e.g. `myext.deploy`). **Merged as a union across scopes**, so workspace settings can add to but not remove entries defined in user or system settings. | `undefined` |
|
|
368
|
+
|
|
369
|
+
The same denylist can also be provided via the `--disabled-slash-commands` CLI
|
|
370
|
+
flag (comma-separated or repeated) and the `QWEN_DISABLED_SLASH_COMMANDS`
|
|
371
|
+
environment variable; values from all three sources are unioned together.
|
|
372
|
+
|
|
373
|
+
**Example — lock down built-ins for a sandboxed deployment:**
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"slashCommands": {
|
|
378
|
+
"disabled": ["auth", "mcp", "extensions", "ide", "quit"]
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
With these values in a system-level `settings.json` (`/etc/qwen-code/settings.json`
|
|
384
|
+
or `QWEN_CODE_SYSTEM_SETTINGS_PATH`), users cannot shrink the denylist from
|
|
385
|
+
their own scope, and the disabled commands will not appear in autocomplete or
|
|
386
|
+
execute when typed.
|
|
387
|
+
|
|
388
|
+
> [!note]
|
|
389
|
+
> This setting only gates slash commands (e.g. `/auth`, `/mcp`). It does not
|
|
390
|
+
> affect tool permissions — see `permissions.deny` for that. It also does not
|
|
391
|
+
> intercept keyboard shortcuts such as `Ctrl+C` or `Esc`.
|
|
392
|
+
|
|
350
393
|
#### mcp
|
|
351
394
|
|
|
352
395
|
| Setting | Type | Description | Default |
|
|
@@ -527,7 +570,7 @@ For authentication-related variables (like `OPENAI_*`) and the recommended `.qwe
|
|
|
527
570
|
| `CODE_ASSIST_ENDPOINT` | Specifies the endpoint for the code assist server. | This is useful for development and testing. |
|
|
528
571
|
| `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` |
|
|
529
572
|
| `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"` |
|
|
530
|
-
| `QWEN_CODE_PROFILE_STARTUP`
|
|
573
|
+
| `QWEN_CODE_PROFILE_STARTUP` | Set to `1` to enable startup performance profiling. Writes a JSON timing report to `~/.qwen/startup-perf/` with per-phase durations. | Only active inside the sandbox child process. Zero overhead when not set. Example: `export QWEN_CODE_PROFILE_STARTUP=1` |
|
|
531
574
|
|
|
532
575
|
## Command-Line Arguments
|
|
533
576
|
|
|
@@ -538,42 +581,43 @@ For sandbox image selection, precedence is:
|
|
|
538
581
|
|
|
539
582
|
### Command-Line Arguments Table
|
|
540
583
|
|
|
541
|
-
| Argument | Alias | Description
|
|
542
|
-
| ---------------------------- | ----- |
|
|
543
|
-
| `--model` | `-m` | Specifies the Qwen model to use for this session.
|
|
544
|
-
| `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode.
|
|
545
|
-
| `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input.
|
|
546
|
-
| `--system-prompt` | | Overrides the built-in main session system prompt for this run.
|
|
547
|
-
| `--append-system-prompt` | | Appends extra instructions to the main session system prompt for this run.
|
|
548
|
-
| `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode.
|
|
549
|
-
| `--input-format` | | Specifies the format consumed from standard input.
|
|
550
|
-
| `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming.
|
|
551
|
-
| `--sandbox` | `-s` | Enables sandbox mode for this session.
|
|
552
|
-
| `--sandbox-image` | | Sets the sandbox image URI.
|
|
553
|
-
| `--debug` | `-d` | Enables debug mode for this session, providing more verbose output.
|
|
554
|
-
| `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt.
|
|
555
|
-
| `--help` | `-h` | Displays help information about command-line arguments.
|
|
556
|
-
| `--show-memory-usage` | | Displays the current memory usage.
|
|
557
|
-
| `--yolo` | | Enables YOLO mode, which automatically approves all tool calls.
|
|
558
|
-
| `--approval-mode` | | Sets the approval mode for tool calls.
|
|
559
|
-
| `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog.
|
|
560
|
-
| `--
|
|
561
|
-
| `--telemetry
|
|
562
|
-
| `--telemetry-
|
|
563
|
-
| `--telemetry-otlp-
|
|
564
|
-
| `--telemetry-
|
|
565
|
-
| `--
|
|
566
|
-
| `--
|
|
567
|
-
| `--
|
|
568
|
-
| `--
|
|
569
|
-
| `--
|
|
570
|
-
| `--
|
|
571
|
-
| `--
|
|
572
|
-
| `--
|
|
573
|
-
| `--
|
|
574
|
-
| `--
|
|
575
|
-
| `--openai-logging
|
|
576
|
-
| `--
|
|
584
|
+
| Argument | Alias | Description | Possible Values | Notes |
|
|
585
|
+
| ---------------------------- | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
586
|
+
| `--model` | `-m` | Specifies the Qwen model to use for this session. | Model name | Example: `npm start -- --model qwen3-coder-plus` |
|
|
587
|
+
| `--prompt` | `-p` | Used to pass a prompt directly to the command. This invokes Qwen Code in a non-interactive mode. | Your prompt text | For scripting examples, use the `--output-format json` flag to get structured output. |
|
|
588
|
+
| `--prompt-interactive` | `-i` | Starts an interactive session with the provided prompt as the initial input. | Your prompt text | The prompt is processed within the interactive session, not before it. Cannot be used when piping input from stdin. Example: `qwen -i "explain this code"` |
|
|
589
|
+
| `--system-prompt` | | Overrides the built-in main session system prompt for this run. | Your prompt text | Loaded context files such as `QWEN.md` are still appended after this override. Can be combined with `--append-system-prompt`. |
|
|
590
|
+
| `--append-system-prompt` | | Appends extra instructions to the main session system prompt for this run. | Your prompt text | Applied after the built-in prompt and loaded context files. Can be combined with `--system-prompt`. See [Headless Mode](../features/headless) for examples. |
|
|
591
|
+
| `--output-format` | `-o` | Specifies the format of the CLI output for non-interactive mode. | `text`, `json`, `stream-json` | `text`: (Default) The standard human-readable output. `json`: A machine-readable JSON output emitted at the end of execution. `stream-json`: Streaming JSON messages emitted as they occur during execution. For structured output and scripting, use the `--output-format json` or `--output-format stream-json` flag. See [Headless Mode](../features/headless) for detailed information. |
|
|
592
|
+
| `--input-format` | | Specifies the format consumed from standard input. | `text`, `stream-json` | `text`: (Default) Standard text input from stdin or command-line arguments. `stream-json`: JSON message protocol via stdin for bidirectional communication. Requirement: `--input-format stream-json` requires `--output-format stream-json` to be set. When using `stream-json`, stdin is reserved for protocol messages. See [Headless Mode](../features/headless) for detailed information. |
|
|
593
|
+
| `--include-partial-messages` | | Include partial assistant messages when using `stream-json` output format. When enabled, emits stream events (message_start, content_block_delta, etc.) as they occur during streaming. | | Default: `false`. Requirement: Requires `--output-format stream-json` to be set. See [Headless Mode](../features/headless) for detailed information about stream events. |
|
|
594
|
+
| `--sandbox` | `-s` | Enables sandbox mode for this session. | | |
|
|
595
|
+
| `--sandbox-image` | | Sets the sandbox image URI. | | |
|
|
596
|
+
| `--debug` | `-d` | Enables debug mode for this session, providing more verbose output. | | |
|
|
597
|
+
| `--all-files` | `-a` | If set, recursively includes all files within the current directory as context for the prompt. | | |
|
|
598
|
+
| `--help` | `-h` | Displays help information about command-line arguments. | | |
|
|
599
|
+
| `--show-memory-usage` | | Displays the current memory usage. | | |
|
|
600
|
+
| `--yolo` | | Enables YOLO mode, which automatically approves all tool calls. | | |
|
|
601
|
+
| `--approval-mode` | | Sets the approval mode for tool calls. | `plan`, `default`, `auto-edit`, `yolo` | Supported modes: `plan`: Analyze only—do not modify files or execute commands. `default`: Require approval for file edits or shell commands (default behavior). `auto-edit`: Automatically approve edit tools (edit, write_file) while prompting for others. `yolo`: Automatically approve all tool calls (equivalent to `--yolo`). Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of `--yolo` for the new unified approach. Example: `qwen --approval-mode auto-edit`<br>See more about [Approval Mode](../features/approval-mode). |
|
|
602
|
+
| `--allowed-tools` | | A comma-separated list of tool names that will bypass the confirmation dialog. | Tool names | Example: `qwen --allowed-tools "Shell(git status)"` |
|
|
603
|
+
| `--disabled-slash-commands` | | Slash command names to hide/disable (comma-separated or repeated). Unioned with the `slashCommands.disabled` setting and the `QWEN_DISABLED_SLASH_COMMANDS` environment variable. Matched case-insensitively against the final command name. | Command names | Example: `qwen --disabled-slash-commands "auth,mcp,extensions"` |
|
|
604
|
+
| `--telemetry` | | Enables [telemetry](/developers/development/telemetry). | | |
|
|
605
|
+
| `--telemetry-target` | | Sets the telemetry target. | | See [telemetry](/developers/development/telemetry) for more information. |
|
|
606
|
+
| `--telemetry-otlp-endpoint` | | Sets the OTLP endpoint for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
|
|
607
|
+
| `--telemetry-otlp-protocol` | | Sets the OTLP protocol for telemetry (`grpc` or `http`). | | Defaults to `grpc`. See [telemetry](../../developers/development/telemetry) for more information. |
|
|
608
|
+
| `--telemetry-log-prompts` | | Enables logging of prompts for telemetry. | | See [telemetry](../../developers/development/telemetry) for more information. |
|
|
609
|
+
| `--checkpointing` | | Enables [checkpointing](../features/checkpointing). | | |
|
|
610
|
+
| `--acp` | | Enables ACP mode (Agent Client Protocol). Useful for IDE/editor integrations like [Zed](../integration-zed). | | Stable. Replaces the deprecated `--experimental-acp` flag. |
|
|
611
|
+
| `--experimental-lsp` | | Enables experimental [LSP (Language Server Protocol)](../features/lsp) feature for code intelligence (go-to-definition, find references, diagnostics, etc.). | | Experimental. Requires language servers to be installed. |
|
|
612
|
+
| `--extensions` | `-e` | Specifies a list of extensions to use for the session. | Extension names | If not provided, all available extensions are used. Use the special term `qwen -e none` to disable all extensions. Example: `qwen -e my-extension -e my-other-extension` |
|
|
613
|
+
| `--list-extensions` | `-l` | Lists all available extensions and exits. | | |
|
|
614
|
+
| `--proxy` | | Sets the proxy for the CLI. | Proxy URL | Example: `--proxy http://localhost:7890`. |
|
|
615
|
+
| `--include-directories` | | Includes additional directories in the workspace for multi-directory support. | Directory paths | Can be specified multiple times or as comma-separated values. 5 directories can be added at maximum. Example: `--include-directories /path/to/project1,/path/to/project2` or `--include-directories /path/to/project1 --include-directories /path/to/project2` |
|
|
616
|
+
| `--screen-reader` | | Enables screen reader mode, which adjusts the TUI for better compatibility with screen readers. | | |
|
|
617
|
+
| `--version` | | Displays the version of the CLI. | | |
|
|
618
|
+
| `--openai-logging` | | Enables logging of OpenAI API calls for debugging and analysis. | | This flag overrides the `enableOpenAILogging` setting in `settings.json`. |
|
|
619
|
+
| `--openai-logging-dir` | | Sets a custom directory path for OpenAI API logs. | Directory path | This flag overrides the `openAILoggingDir` setting in `settings.json`. Supports absolute paths, relative paths, and `~` expansion. Example: `qwen --openai-logging-dir "~/qwen-logs" --openai-logging` |
|
|
620
|
+
| `--tavily-api-key` | | Sets the Tavily API key for web search functionality for this session. | API key | Example: `qwen --tavily-api-key tvly-your-api-key-here` |
|
|
577
621
|
|
|
578
622
|
## Context Files (Hierarchical Instructional Context)
|
|
579
623
|
|
|
@@ -24,6 +24,7 @@ These commands help you save, restore, and summarize work progress.
|
|
|
24
24
|
| `/summary` | Generate project summary based on conversation history | `/summary` |
|
|
25
25
|
| `/compress` | Replace chat history with summary to save Tokens | `/compress` |
|
|
26
26
|
| `/resume` | Resume a previous conversation session | `/resume` |
|
|
27
|
+
| `/recap` | Generate a one-line session recap now | `/recap` |
|
|
27
28
|
| `/restore` | Restore files to state before tool execution | `/restore` (list) or `/restore <ID>` |
|
|
28
29
|
|
|
29
30
|
### 1.2 Interface and Workspace Control
|
|
@@ -71,7 +72,10 @@ Commands for managing AI tools and models.
|
|
|
71
72
|
| `/model` | Switch model used in current session | `/model` |
|
|
72
73
|
| `/model --fast` | Set a lighter model for prompt suggestions | `/model --fast qwen3-coder-flash` |
|
|
73
74
|
| `/extensions` | List all active extensions in current session | `/extensions` |
|
|
74
|
-
| `/memory` |
|
|
75
|
+
| `/memory` | Open the Memory Manager dialog | `/memory` |
|
|
76
|
+
| `/remember` | Save a durable memory | `/remember Prefer terse responses` |
|
|
77
|
+
| `/forget` | Remove matching entries from auto-memory | `/forget <query>` |
|
|
78
|
+
| `/dream` | Manually run auto-memory consolidation | `/dream` |
|
|
75
79
|
|
|
76
80
|
### 1.5 Built-in Skills
|
|
77
81
|
|
|
@@ -153,7 +157,58 @@ The `/btw` command allows you to ask quick side questions without interrupting o
|
|
|
153
157
|
>
|
|
154
158
|
> Use `/btw` when you need a quick answer without derailing your main task. It's especially useful for clarifying concepts, checking facts, or getting quick explanations while staying focused on your primary workflow.
|
|
155
159
|
|
|
156
|
-
### 1.7
|
|
160
|
+
### 1.7 Session Recap (`/recap`)
|
|
161
|
+
|
|
162
|
+
The `/recap` command generates a short "where you left off" summary of the
|
|
163
|
+
current session, so you can resume an old conversation without scrolling
|
|
164
|
+
back through pages of history.
|
|
165
|
+
|
|
166
|
+
| Command | Description |
|
|
167
|
+
| -------- | ------------------------------------------ |
|
|
168
|
+
| `/recap` | Generate and show a one-line session recap |
|
|
169
|
+
|
|
170
|
+
**How it works:**
|
|
171
|
+
|
|
172
|
+
- Uses the configured fast model (`fastModel` setting) when available, falling
|
|
173
|
+
back to the main session model. A small, cheap model is enough for a recap.
|
|
174
|
+
- The recent conversation (up to 30 messages, text only — tool calls and tool
|
|
175
|
+
responses are filtered out) is sent to the model with a tight system prompt.
|
|
176
|
+
- The recap is rendered in dim color with a `❯` prefix so it stands apart
|
|
177
|
+
from real assistant replies.
|
|
178
|
+
- Refuses with an inline error if a model turn is in flight or another command
|
|
179
|
+
is processing. If there is no usable conversation, or the underlying
|
|
180
|
+
generation fails, `/recap` shows a short info message instead of a recap —
|
|
181
|
+
the manual command always responds with something.
|
|
182
|
+
|
|
183
|
+
**Auto-trigger when returning from being away:**
|
|
184
|
+
|
|
185
|
+
If the terminal is blurred for **5+ minutes** and gets focused again, a recap
|
|
186
|
+
is generated and shown automatically (only when no model response is in
|
|
187
|
+
progress; otherwise it waits for the current turn to finish and then fires).
|
|
188
|
+
Unlike the manual command, the auto-trigger is fully silent on failure: if
|
|
189
|
+
generation errors or there is nothing to summarize, no message is added to
|
|
190
|
+
the history. Controlled by the `general.showSessionRecap` setting
|
|
191
|
+
(default: `true`); the manual `/recap` command always works regardless of
|
|
192
|
+
this setting.
|
|
193
|
+
|
|
194
|
+
**Example:**
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
> /recap
|
|
198
|
+
|
|
199
|
+
❯ Refactoring loopDetectionService.ts to address long-session OOM caused by
|
|
200
|
+
unbounded streamContentHistory and contentStats. The next step is to
|
|
201
|
+
implement option B (LRU sliding window with FNV-1a) pending confirmation.
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
> [!tip]
|
|
205
|
+
>
|
|
206
|
+
> Configure a fast model via `/model --fast <model>` (e.g.
|
|
207
|
+
> `qwen3-coder-flash`) to make `/recap` fast and cheap. Set
|
|
208
|
+
> `general.showSessionRecap` to `false` to opt out of the auto-trigger
|
|
209
|
+
> while keeping the manual command available.
|
|
210
|
+
|
|
211
|
+
### 1.8 Information, Settings, and Help
|
|
157
212
|
|
|
158
213
|
Commands for obtaining information and performing system settings.
|
|
159
214
|
|
|
@@ -168,7 +223,7 @@ Commands for obtaining information and performing system settings.
|
|
|
168
223
|
| `/copy` | Copy last output content to clipboard | `/copy` |
|
|
169
224
|
| `/quit` | Exit Qwen Code immediately | `/quit` or `/exit` |
|
|
170
225
|
|
|
171
|
-
### 1.
|
|
226
|
+
### 1.9 Common Shortcuts
|
|
172
227
|
|
|
173
228
|
| Shortcut | Function | Note |
|
|
174
229
|
| ------------------ | ----------------------- | ---------------------- |
|
|
@@ -178,17 +233,17 @@ Commands for obtaining information and performing system settings.
|
|
|
178
233
|
| `Ctrl/cmd+Z` | Undo input | Text editing |
|
|
179
234
|
| `Ctrl/cmd+Shift+Z` | Redo input | Text editing |
|
|
180
235
|
|
|
181
|
-
### 1.
|
|
236
|
+
### 1.10 CLI Auth Subcommands
|
|
182
237
|
|
|
183
238
|
In addition to the in-session `/auth` slash command, Qwen Code provides standalone CLI subcommands for managing authentication directly from the terminal:
|
|
184
239
|
|
|
185
|
-
| Command | Description
|
|
186
|
-
| ---------------------------------------------------- |
|
|
187
|
-
| `qwen auth` | Interactive authentication setup
|
|
188
|
-
| `qwen auth qwen-oauth` | Authenticate with Qwen OAuth
|
|
189
|
-
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan
|
|
190
|
-
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting)
|
|
191
|
-
| `qwen auth status` | Show current authentication status
|
|
240
|
+
| Command | Description |
|
|
241
|
+
| ---------------------------------------------------- | ------------------------------------------------------------- |
|
|
242
|
+
| `qwen auth` | Interactive authentication setup |
|
|
243
|
+
| `qwen auth qwen-oauth` | ~~Authenticate with Qwen OAuth~~ (discontinued on 2026-04-15) |
|
|
244
|
+
| `qwen auth coding-plan` | Authenticate with Alibaba Cloud Coding Plan |
|
|
245
|
+
| `qwen auth coding-plan --region china --key sk-sp-…` | Non-interactive Coding Plan setup (for scripting) |
|
|
246
|
+
| `qwen auth status` | Show current authentication status |
|
|
192
247
|
|
|
193
248
|
> [!tip]
|
|
194
249
|
>
|