Qwen Code CLI reference - Slash commands
Qwen Code slash commands
Qwen Code documents 85 slash commands, including /init, /summary and /compress. You type these inside an interactive Qwen Code session. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 3 official pagesFull Qwen Code reference
| Command | Description | Example |
|---|---|---|
/init | Analyze current directory and create initial context file. Docs: /init | -no example |
/summary | Generate project summary based on conversation history. optional [path]; default .qwen/PROJECT_SUMMARY.md Docs: /summary | `/summary` or `/summary docs/my-summary.md` |
/compress | Replace chat history with summary to save tokens (alias /summarize). Docs: /compress | `/compress` or `/summarize` |
/compress-fast | Fast compression without AI; strips old tool outputs and thinking parts. Docs: /compress-fast | -no example |
/resume | Resume a previous conversation session. Docs: /resume | `/resume` or `/continue` |
/recap | Generate a one-line session recap now. Docs: /recap | -no example |
/restore | Revert project files to the checkpoint before a tool call ran. Docs: /restore | `/restore` (list) or `/restore <ID>` |
/delete | Delete a previous session. Docs: /delete | -no example |
/branch | Fork the current conversation into a new session. Docs: /branch | -no example |
/fork | Spawn a background agent that inherits the full conversation. Docs: /fork | `/fork <directive>` |
/rewind | Rewind conversation to a previous turn. Docs: /rewind | `/rewind` or `/rollback` |
/export | Export session history to file. html, md, json, jsonl Docs: /export | `/export html`, `/export md`, `/export json`, `/export jsonl` |
/rename | Rename or tag the current session. Docs: /rename | `/rename My Feature` or `/tag` |
/commit | Create a git commit with an AI-drafted message. Docs: /commit | `/commit` or `/commit only stage the parser changes` |
/clear | Clear conversation history and free up context. Docs: /clear | `/clear`, `/reset`, `/new` |
/context | Show context window usage breakdown; | `/context detail` |
/history | Control history display preferences and visibility. Docs: /history | `/history collapse-on-resume`, `/history expand-on-resume`, `/history expand-now` |
/diff | Open an interactive diff viewer showing uncommitted changes and per-turn diffs. Docs: /diff | -no example |
/log | Open a commit history viewer for the workspace (Web Shell only). Docs: /log | -no example |
/theme | Change Qwen Code visual theme. Docs: /theme | -no example |
/vim | Turn input area Vim editing mode on/off. Docs: /vim | -no example |
/voice | Toggle voice dictation input. hold, tap, off, status Docs: /voice | `/voice`, `/voice hold`, `/voice tap`, `/voice off`, `/voice status` |
/directory | Manage multi-directory support workspace (alias /dir). Docs: /directory | `/dir add ./src,./tests`, `/dir show` |
/cd | Move this session to a new working directory. Docs: /cd | `/cd ../other-project` |
/editor | Open dialog to select supported editor. Docs: /editor | -no example |
/statusline | Open interactive status line preset dialog; with text, generate a command-mode status line via agent. Docs: /statusline | `/statusline show model and git branch` |
/terminal-setup | Configure terminal keybindings for multiline input. Docs: /terminal-setup | -no example |
/language | View or change language settings; ui [language], output [language] Docs: /language | `/language ui zh-CN` |
/mcp | List configured MCP servers and tools. Docs: /mcp | `/mcp`, `/mcp desc`, `/mcp nodesc`, `/mcp schema` |
/import-config | Import MCP servers from Claude configs. Docs: /import-config | `/import-config all`, `/import-config claude-code` |
/tools | Display currently available tool list. Docs: /tools | `/tools`, `/tools desc` |
/skills | Open the Skills panel to browse, search, toggle, and launch skills. Docs: /skills | `/skills`, `/<skill-name>` |
/learn | Create a reusable project skill from a file, directory, URL, video, or text. Docs: /learn | `/learn https://docs.example.com/api` |
/curator | Inspect, pin, archive, or restore inactive project auto-skills. Docs: /curator | `/curator`, `/curator run --dry-run` |
/plan | Switch to plan mode or exit plan mode. Docs: /plan | `/plan`, `/plan <task>`, `/plan exit` |
/approval-mode | Change the tool-approval mode (current session only). plan, default, auto-edit, auto, yolo Docs: /approval-mode | `/approval-mode`, `/approval-mode auto-edit` |
/peers | Review held peer messages; manage trusted controllers. Docs: /peers | `/peers`, `/peers accept <id>`, `/peers deny all` |
/model | Switch model used in current session. Docs: /model | `/model`, `/model <model-id>` (switch immediately) |
/model --fast | Set a lighter model for prompt suggestions. Docs: /model --fast | `/model --fast qwen3-coder-flash` |
/model --voice | Set the model used for voice transcription. Docs: /model --voice | `/model --voice <model-id>` |
/model --vision | Set the vision-bridge model used to transcribe images for a text-only main model. Docs: /model --vision | `/model --vision <model-id>` |
/model --compaction | Set the model used for chat compression. Docs: /model --compaction | `/model --compaction <model-id>`, `/model --compaction clear` |
/model --image | Set an image-generation-capable model for the built-in image generation tool. Docs: /model --image | `/model --image <model-id>` |
/effort | Set reasoning effort for thinking-capable models (mapped and clamped per provider). low, medium, high, xhigh, max Docs: /effort | `/effort high` |
/output-style | Choose the output style that shapes how responses are written. Docs: /output-style | `/output-style Concise` |
/extensions | Manage extensions (list, manage, explore, install); changes hot-reload. list, manage, explore, install Docs: /extensions | `/extensions list`, `/extensions manage` |
/memory | Open the Memory Manager dialog. Docs: /memory | -no example |
/remember | Save a durable memory. Docs: /remember | `/remember Prefer terse responses` |
/forget | Remove matching entries from auto-memory. Docs: /forget | `/forget <query>` |
/dream | Manually run auto-memory consolidation. Docs: /dream | -no example |
/hooks | Manage Qwen Code hooks. Docs: /hooks | `/hooks`, `/hooks list` |
/reload-plugins | Reload extension changes (commands, skills, agents, workflows, hooks, MCP/LSP servers) from disk. Docs: /reload-plugins | -no example |
/permissions | Manage permission rules. Docs: /permissions | -no example |
/agents | Manage subagents. Docs: /agents | `/agents manage`, `/agents create` |
/arena | Manage Arena sessions. start, stop, status, select (alias choose) Docs: /arena | `/arena start`, `/arena stop`, `/arena status` |
/tasks | List background tasks. Docs: /tasks | -no example |
/workflows | Inspect workflow runs; cooperatively pause/resume a background run. Docs: /workflows | `/workflows`, `/workflows <runId>`, `/workflows p <runId>` |
/lsp | Show LSP server status (registered only with --experimental-lsp). Docs: /lsp | -no example |
/trust | Manage folder trust settings. Docs: /trust | -no example |
/review | Multi-agent code review (12 parallel agents at high effort). --comment, --fix, --resume, --effort low|medium|high Docs: /review | `/review`, `/review 123`, `/review 123 --comment`, `/review --effort low` |
/coordinate | Coordinate read-only workers and one optional worktree writer. Docs: /coordinate | `/coordinate investigate and fix the authentication regression` |
/loop | Run a prompt on a recurring schedule. Docs: /loop | `/loop 5m check the build` |
/goal-draft | Turn a fuzzy intention into a verifiable /goal objective. Docs: /goal-draft | `/goal-draft make the auth tests pass` |
/simplify | Review recent changes and apply safe cleanup edits directly. Docs: /simplify | `/simplify`, `/simplify focus on duplication` |
/qc-helper | Answer questions about Qwen Code usage and configuration. Docs: /qc-helper | `/qc-helper how do I configure MCP?` |
/btw <your question> | Ask a quick side question without interrupting the main conversation. Docs: /btw <your question> | -no example |
/advisor | Get a second-opinion review of the conversation above, optionally with a focus. optional <focus> Docs: /advisor | -no example |
/help | Display help information for available commands. Docs: /help | `/help` or `/?` |
/status | Display version information; | `/status` or `/about` |
/stats | Open the interactive usage statistics dashboard (Session, Activity, and Efficiency tabs). model, tools, skills, daily, monthly, export Docs: /stats | `/stats` or `/usage` |
/stats model | Show per-model token breakdown and estimated cost. Docs: /stats model | -no example |
/stats export | Export usage statistics to CSV or JSON. Docs: /stats export | `/stats export <daily|monthly> [date|month] [--format csv|json] [--output path]` |
/settings | Open settings editor. Docs: /settings | -no example |
/config | Get or set any setting by dot-path key (writes to user settings). Docs: /config | `/config` (list all), `/config <key>`, `/config <key>=<value>` |
/auth | Change authentication method. Docs: /auth | `/auth`, `/connect`, `/login` |
/doctor | Run installation and environment diagnostics. memory, cpu-profile, rollback Docs: /doctor | `/doctor`, `/doctor memory` |
/docs | Open full Qwen Code documentation in browser. Docs: /docs | -no example |
/ide | Manage IDE integration. Docs: /ide | `/ide status`, `/ide install`, `/ide enable`, `/ide disable` |
/insight | Generate programming insights from chat history. Docs: /insight | -no example |
/setup-github | Set up GitHub Actions. Docs: /setup-github | -no example |
/bug | Submit issue about Qwen Code. Docs: /bug | `/bug Button click unresponsive` |
/copy | Copy to clipboard: reply (Nth-last), code (by lang), LaTeX, or Mermaid. Docs: /copy | `/copy`, `/copy 2`, `/copy python`, `/copy latex`, `/copy mermaid` |
/quit | Exit Qwen Code immediately. Docs: /quit | `/quit` or `/exit` |
/batch-api | Ask the agent to plan and submit a Batch API job; it previews the plan before anything is billed. Docs: /batch-api | -no example |
/update | Update a standalone install from inside a session; honors QWEN_UPDATE_BASE_URL. Docs: /update | -no example |
The rest of the Qwen Code reference
FAQ
How many slash commands does Qwen Code have?
The official Qwen Code docs list 85 slash commands, including /init, /summary and /compress. All of them are in the table above, in the docs' order.
What does /init do in Qwen Code?
Analyze current directory and create initial context file.
Where are Qwen Code slash commands documented?
On 3 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 3 official pages below, and every row above links the exact section it came from.
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.