Prerequisites
Before installing Qwen Code, ensure you have the following:Node.js
Version 20 or later is required. Download from nodejs.org.
Terminal
A modern terminal that supports ANSI colors and UTF-8 encoding.
Check your Node.js version with
node --version. If you need to manage multiple Node.js versions, consider using nvm.Quick Install (Recommended)
The fastest way to get started is with our installation script. It automatically detects your platform and installs Qwen Code globally.After Installation
Restart your terminal to ensure environment variables take effect:Manual Installation
If you prefer manual installation or need more control, use one of these methods:NPM (All Platforms)
Install globally using npm:The global installation makes the
qwen command available system-wide.Homebrew (macOS, Linux)
If you use Homebrew package manager:Package Manager Comparison
| Method | Platforms | Auto-Updates | Advantages |
|---|---|---|---|
| Install Script | All | ✅ | Fastest, platform-specific |
| NPM | All | ✅ | Standard Node.js workflow |
| Homebrew | macOS, Linux | ✅ | Integrates with Homebrew updates |
Updating Qwen Code
Keep Qwen Code up to date to get the latest features and bug fixes.Installation Verification
After installation, verify everything is working correctly:Development Installation
If you want to contribute to Qwen Code or run from source:For development, use Node.js version ~20.19.0 with nvm for best compatibility.
Troubleshooting
Common Issues
Command not found: qwen
Command not found: qwen
Issue: The
qwen command is not recognized after installation.Solutions:- Restart your terminal to reload PATH variables
- Check if npm global bin is in your PATH:
The bin directory should be in your system PATH.
- For npm installations, try:
Permission denied (EACCES)
Permission denied (EACCES)
Issue: NPM installation fails with permission errors.Solutions:
- On macOS/Linux: Use a Node version manager like nvm (recommended)
- Alternative: Configure npm to use a different directory:
- Not recommended: Use sudo (can cause permission issues later)
Node.js version mismatch
Node.js version mismatch
Issue: Error about unsupported Node.js version.Solutions:
- Check your Node.js version:
- Update to Node.js 20 or later from nodejs.org
- Or use nvm to install the correct version:
Windows installation issues
Windows installation issues
Issue: Installation fails on Windows.Solutions:
- Run Command Prompt or PowerShell as Administrator
- Ensure Windows Build Tools are installed:
- Use the Windows install script instead of npm
- Consider using WSL2 (Windows Subsystem for Linux) for a Linux environment
Getting Help
If you continue to experience issues:GitHub Issues
Search existing issues or create a new one
Discord Community
Ask for help in our community Discord
Uninstallation
If you need to remove Qwen Code:Next Steps
Now that Qwen Code is installed, set up authentication to start using it:Configure Authentication
Set up Qwen OAuth or API key authentication →
