Use Token Plan with Qwen Code
Qwen Code is an AI programming assistant.
Edit or create the
Start Qwen Code in your project directory:
For more commands and usage details, see the official Qwen Code docs.
Enter
If a required model (such as
Qwen Code is available as an IDE plugin for VS Code and JetBrains IDEs, providing AI-powered programming capabilities directly within your editor.
See FAQ.
Install Qwen Code
- macOS/Linux
- Windows
Install Qwen Code:Verify installation:
Configure and use Qwen Code
Edit or create the settings.json file. Replace YOUR_API_KEY with your Token Plan API key. The file is located at one of the following paths:
- macOS/Linux:
~/.qwen/settings.json - Windows:
C:\Users\<Windows username>\.qwen\settings.json
Common commands
These commands are for Qwen Code CLI. IDE extensions support only a subset.
| Command | Description | Example |
|---|---|---|
/model | Switch the model used in the current session. | /model |
/auth | Change the authentication method. | /auth |
/init | Analyze the current directory and create a context file (QWEN.md) with project-level instructions. | /init |
/clear | Clear the screen and start a new chat session. | /clear |
/compress | Replace the chat history with a summary to save tokens. | /compress |
/settings | Open settings (language, theme, etc.). | /settings |
/summary | Generate a project summary from the chat history. | /summary |
/resume | Resume a previous chat session. | /resume |
/stats | Show session statistics. | /stats |
/help | Show available commands. | /help or /? |
/quit | Exit Qwen Code. | /quit |
Switch models (optional)
Enter /model to switch between models supported by Qwen Cloud Token Plan.
Text-based models, such as qwen3.6-plus and glm-5, work out of the box. Image generation models use a separate API and must be integrated through extension mechanisms. See Integrate multimodal generation models.
qwen3.6-plus, MiniMax-M2.5, or glm-5) is not listed, update Qwen Code:
-
Enter
/quitto exit Qwen Code. - Update Qwen Code:
- Restart Qwen Code:
- Use
/modelto select models.
Qwen Code IDE plugin (optional)
Qwen Code is available as an IDE plugin for VS Code and JetBrains IDEs, providing AI-powered programming capabilities directly within your editor.
- VS Code
- JetBrains
Requires VS Code 1.85.0 or later.
-
Search for
Qwen Code Companionin VS Code extensions and install it. -
Edit or create the
settings.jsonfile. ReplaceYOUR_API_KEYwith your Token Plan API key. The file is located at:- macOS/Linux:
~/.qwen/settings.json - Windows:
C:\Users\<Windows username>\.qwen\settings.json
Skip this if you already configured Qwen Code CLI -- the extension reads from the same settings.json file. - macOS/Linux:
- Click the icon in the upper-right to start Qwen Code. Switch models: enter
/and selectSwitch model.
Learn more
- For advanced features such as sub-agents, MCP, and Skills, see the official Qwen Code docs.
- For more Qwen Code examples, see Showcase.