What is Qwen Code?
Qwen Code is an open-source AI agent for the terminal that helps you understand large codebases, automate tedious work, and ship faster. Built and optimized for Qwen3-Coder, it brings powerful AI capabilities directly to your command line.Quick Install
Get started in seconds with npm, Homebrew, or our install script
Quick Start
Launch your first AI-assisted coding session
Why Choose Qwen Code?
Qwen Code stands out from other AI coding assistants with these key advantages:Multi-Protocol with Free Tier
Use OpenAI, Anthropic, or Gemini-compatible APIs—or sign in with Qwen OAuth for 1,000 free requests per day. No credit card required.
Open-Source & Co-Evolving
Both the framework and the Qwen3-Coder model are open-source. They’re developed together, ensuring seamless integration and continuous improvement.
Agentic & Feature-Rich
Rich built-in tools including Skills, SubAgents, and Plan Mode provide a full agentic workflow for complex coding tasks.
Terminal-First, IDE-Friendly
Built for developers who live in the command line, with optional integration for VS Code, Zed, and JetBrains IDEs.
How It Works
Qwen Code operates in multiple modes to fit your workflow:Interactive Mode
Launch an intuitive terminal UI where you can chat with AI, reference files, and see changes in real-time:@ to reference local files:
Headless Mode
Run AI commands without the interactive UI—perfect for scripts, automation, and CI/CD:IDE Integration
Use Qwen Code inside your favorite editor:- VS Code: Full extension with inline assistance
- Zed: Native integration for AI-powered editing
- JetBrains: Plugin support for IntelliJ, PyCharm, and more
Learn more in the IDE Integration section.
Key Features
Intelligent Code Understanding
- Codebase Analysis: Ask questions about your entire project structure
- File References: Use
@filenameto include specific files in context - Multi-File Refactoring: Make changes across multiple files safely
Powerful Tools & Agents
- SubAgents: Delegate complex tasks to specialized AI agents
- Skills System: Reusable skill modules for common workflows
- MCP Support: Connect to Model Context Protocol servers
- LSP Integration: Leverage Language Server Protocol for code intelligence
Flexible Authentication
Choose the authentication method that works best for you:Qwen OAuth
Recommended: Sign in with your qwen.ai account. Get 1,000 free requests daily.
API Key
Use your own API keys from OpenAI, Anthropic, Google GenAI, or Alibaba Cloud.
Advanced Capabilities
- Sandbox Execution: Run commands safely in isolated Docker/Podman containers
- Token Caching: Reduce costs with intelligent prompt caching
- Memory System: Maintain context across sessions
- Approval Modes: Control AI actions with
--yoloor step-by-step approval
Use Cases
Qwen Code excels at a wide range of development tasks:Code Understanding
Code Understanding
- “What does this codebase do?”
- “Explain the architecture of this project”
- “Find all the places where user authentication is handled”
- “How does the payment flow work?”
Code Generation
Code Generation
- “Generate unit tests for this module”
- “Create a REST API endpoint for user management”
- “Add error handling to this function”
- “Implement a caching layer for database queries”
Refactoring & Optimization
Refactoring & Optimization
- “Refactor this function to be more readable”
- “Convert this code from JavaScript to TypeScript”
- “Optimize this database query for performance”
- “Split this large component into smaller, reusable pieces”
Debugging & Troubleshooting
Debugging & Troubleshooting
- “Why is this test failing?”
- “Find and fix the memory leak in this code”
- “Debug the race condition in this async function”
- “Identify security vulnerabilities in this authentication flow”
Documentation & Review
Documentation & Review
- “Add JSDoc comments to all exported functions”
- “Review this PR for code quality issues”
- “Generate a README for this project”
- “Create API documentation from these endpoints”
Technology Stack
Qwen Code is built with modern, production-ready technologies:- Runtime: Node.js 20+
- Language: TypeScript 5.3+ with strict mode
- UI Framework: Ink (React for CLI)
- Build Tool: esbuild for fast compilation
- Testing: Vitest with comprehensive test coverage
Project Background
Qwen Code is based on Google Gemini CLI, with significant adaptations to better support Qwen-Coder models. The project is actively maintained by the Qwen team and welcomes community contributions.GitHub Repository
Star the repo and contribute to the project
Join Discord
Get help and connect with the community
Performance
Qwen Code delivers strong performance on terminal-based coding benchmarks:| Agent | Model | Terminal-Bench Accuracy |
|---|---|---|
| Qwen Code | Qwen3-Coder-480A35 | 37.5% |
| Qwen Code | Qwen3-Coder-30BA3B | 31.3% |
Terminal-Bench measures an AI agent’s ability to complete real-world terminal-based coding tasks.
Next Steps
Ready to get started? Follow these guides:Install Qwen Code
Choose your preferred installation method: npm, Homebrew, or install script.Go to Installation →
Set Up Authentication
Configure Qwen OAuth for free tier access or connect your API keys.Go to Authentication →
Run Your First Session
Launch Qwen Code and complete your first AI-assisted coding task.Go to Quick Start →
