Qwen Code CLI reference - Subcommands
Qwen Code commands and subcommands
Qwen Code documents 46 subcommands, including qwen sessions list, qwen sessions ps and qwen sessions controllers. These run as qwen <command> from your shell. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 13 official pagesFull Qwen Code reference
| Command | Description | Example |
|---|---|---|
qwen sessions list | List recent conversation sessions with metadata. --json (default false), --limit Docs: qwen sessions list | qwen sessions list --json --limit 50 |
qwen sessions ps | List interactive sessions running right now. --json Docs: qwen sessions ps | qwen sessions ps --json |
qwen sessions controllers | Manage trusted controller tokens. Docs: qwen sessions controllers | qwen sessions controllers add --label <name> |
qwen mcp add | Add an MCP server configuration (stdio, sse or http). qwen mcp add [options] <name> <commandOrUrl> [args...] Docs: qwen mcp add | -no example |
qwen mcp remove | Remove an MCP server configuration by name. Docs: qwen mcp remove | qwen mcp remove <name> |
qwen mcp list | List configured MCP servers. Docs: qwen mcp list | -no example |
qwen extensions install | Install an extension from a marketplace, git repo, npm package, local path or archive URL. --scope project|workspace, --registry Docs: qwen extensions install | qwen extensions install <marketplace-name>:<plugin-name> |
qwen extensions uninstall | Uninstall an installed extension. Docs: qwen extensions uninstall | qwen extensions uninstall qwen-cli-security |
qwen extensions disable | Disable an extension at the user level, or for one workspace with --scope=workspace. Docs: qwen extensions disable | qwen extensions disable extension-name --scope=workspace |
qwen extensions enable | Enable an extension, optionally for a specific workspace with --scope=workspace. Docs: qwen extensions enable | qwen extensions enable extension-name |
qwen extensions update | Update an installed extension, or all of them with --all. Docs: qwen extensions update | qwen extensions update --all |
qwen extensions link | Link a local extension directory, for example an Agent Plugin under development. Docs: qwen extensions link | qwen extensions link ./my-agent-plugin |
qwen extensions new | Create a new extension scaffold. Docs: qwen extensions new | -no example |
qwen extensions sources add | Add a marketplace source (owner/repo, git URL, https URL to marketplace.json, or local path). Docs: qwen extensions sources add | qwen extensions sources add <source> |
qwen extensions sources list | List configured marketplace sources. Docs: qwen extensions sources list | qwen extensions sources list |
qwen extensions sources update | Re-fetch a marketplace's plugin listing. Docs: qwen extensions sources update | qwen extensions sources update <name> |
qwen extensions sources remove | Remove a marketplace source. Docs: qwen extensions sources remove | qwen extensions sources remove <name> |
qwen extensions settings set | Set an extension setting value. [--scope user|workspace] Docs: qwen extensions settings set | -no example |
qwen extensions settings list | List an extension's settings. Docs: qwen extensions settings list | qwen extensions settings list <extension-name> |
qwen channel start | Start all configured channels in a shared agent process, or a single named channel. Docs: qwen channel start | qwen channel start my-channel |
qwen channel stop | Gracefully stop the running channel service (or the daemon selection with --daemon-url). --daemon-url, --token Docs: qwen channel stop | qwen channel stop |
qwen channel status | Show whether the channel service is running, its uptime and session counts per channel. --daemon-url, --token Docs: qwen channel status | qwen channel status |
qwen channel set | Select channels on a token-protected qwen serve daemon at runtime. Docs: qwen channel set | qwen channel set my-channel --token secret |
qwen channel pairing list | List pending pairing requests for a channel. Docs: qwen channel pairing list | qwen channel pairing list my-channel |
qwen channel pairing approve | Approve a pairing request by its code. Docs: qwen channel pairing approve | qwen channel pairing approve my-channel <CODE> |
qwen channel configure-weixin | Configure the WeChat (Weixin) channel. Docs: qwen channel configure-weixin | -no example |
qwen serve | Start the experimental HTTP daemon serving the API and the built-in Web Shell (default http://127.0.0.1:4170/). Docs: qwen serve | qwen serve --open |
qwen update | Update a standalone installation; honors QWEN_UPDATE_BASE_URL. Docs: qwen update | qwen update |
qwen sandbox | Report the active Linux tool execution sandbox boundary, verify it with --verify, or run a command inside it. --verify Docs: qwen sandbox | qwen sandbox --verify |
qwen review run | Headless wrapper that runs /review non-interactively; exit 0 completed, 1 no verdict, 3 blocking. [target] [--json] [--fail-on request-changes] [--comment] [--resume] [--quiet] Docs: qwen review run | -no example |
qwen batch check | Verify Batch API setup; nothing is billed. Docs: qwen batch check | qwen batch check |
qwen batch run | Submit a batch plan; --dry-run previews it, --expect <snapshot> submits exactly that snapshot. --dry-run, --expect Docs: qwen batch run | qwen batch run .qwen/batch/plans/<slug>.json --dry-run |
qwen batch collect | Validate results and write target files, optionally waiting for the batch to finish. Docs: qwen batch collect | qwen batch collect <task-id> [--wait [--timeout <s>]] |
qwen batch retry | Resubmit only the failed items; truncated items need a larger --max-output-tokens. Docs: qwen batch retry | qwen batch retry <task-id> --max-output-tokens 8192 |
qwen batch list | List every recorded batch task with its project. Docs: qwen batch list | qwen batch list |
qwen batch cancel | Cancel a batch task; partial results are still billed. Docs: qwen batch cancel | qwen batch cancel <task-id> |
qwen batch clean | Delete the local record of a batch task (cancels nothing); --force overrides the safety refusal. Docs: qwen batch clean | qwen batch clean <task-id> |
qwen board task | Create a task on an Agent Board and print its id (experimental). --board, --as Docs: qwen board task | qwen board task "check the API response" --board orders --as api |
qwen board show | Show a board's tasks and asks; --as filters to that actor, --json emits JSON. Docs: qwen board show | qwen board show --board orders |
qwen board claim | Claim a board task. Docs: qwen board claim | qwen board claim <task-id> --board orders --as web |
qwen board done | Complete a claimed board task, optionally with --note. Docs: qwen board done | -no example |
qwen board ask | Ask another actor a question; with --wait exit 0 answered, 2 declined, 3 TTL expired, 4 wait ended. --wait, --timeout, --ttl Docs: qwen board ask | -no example |
qwen board answer | Answer an ask on the board. Docs: qwen board answer | qwen board answer <ask-id> "yes" --board orders --as web |
qwen board decline | Decline an ask on the board. Docs: qwen board decline | qwen board decline <ask-id> "not my area" --board orders --as web |
qwen board prune | Remove settled records older than a cutoff in days. --older-than <days> Docs: qwen board prune | qwen board prune --board orders --as human --older-than 7 |
qwen auth | Removed. Legacy invocations print a removal notice with migration guidance; use /auth instead. Docs: qwen auth | -no example |
The rest of the Qwen Code reference
FAQ
How many subcommands does Qwen Code have?
The official Qwen Code docs list 46 subcommands, including qwen sessions list, qwen sessions ps and qwen sessions controllers. All of them are in the table above, in the docs' order.
What does qwen sessions list do in Qwen Code?
List recent conversation sessions with metadata. Values: --json (default false), --limit. Example: qwen sessions list --json --limit 50
Where are Qwen Code subcommands documented?
On 13 official docs pages at qwenlm.github.io, last read on October 17, 2026. Every row in the table links the exact section it came from.
Sources
Last verified . Names and examples are copied verbatim from the 13 official pages below, and every row above links the exact section it came from.
- qwenlm.github.io/qwen-code-docs/en/users/features/commands/3 items
- qwenlm.github.io/qwen-code-docs/en/users/features/mcp/3 items
- qwenlm.github.io/qwen-code-docs/en/users/extension/introduction/12 items
- qwenlm.github.io/qwen-code-docs/en/users/extension/getting-started-extensions/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/channels/overview/6 items
- qwenlm.github.io/qwen-code-docs/en/users/features/channels/weixin/1 item
- qwenlm.github.io/qwen-code-docs/en/users/qwen-serve/1 item
- qwenlm.github.io/qwen-code-docs/en/users/configuration/settings/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/sandbox/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/code-review/1 item
- qwenlm.github.io/qwen-code-docs/en/users/features/batch/7 items
- qwenlm.github.io/qwen-code-docs/en/users/features/agent-board/8 items
- qwenlm.github.io/qwen-code-docs/en/users/configuration/auth/1 item
Newsletter
Know when your tools change
One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.