Qwen Code is a command-line AI workflow tool adapted from Gemini CLI (Please refer to this document for more details), optimized for Qwen3-Coder models with enhanced parser support & tool support.
[!WARNING]
Qwen Code may issue multiple API calls per cycle, resulting in higher token usage, similar to Claude Code. We’re actively working to enhance API efficiency and improve the overall developer experience.
Key Features
Code Understanding & Editing - Query and edit large codebases beyond traditional context window limits
Workflow Automation - Automate operational tasks like handling pull requests and complex rebases
Enhanced Parser - Adapted parser specifically optimized for Qwen-Coder models
Set your Qwen API key (In Qwen Code project, you can also set your API key in .env file). the .env file should be placed in the root directory of your current project.
# If you are in mainland China, use the following URL:
# https://dashscope.aliyuncs.com/compatible-mode/v1
# If you are not in mainland China, use the following URL:
# https://dashscope-intl.aliyuncs.com/compatible-mode/v1
export OPENAI_API_KEY="your_api_key_here"
export OPENAI_BASE_URL="your_api_base_url_here"
export OPENAI_MODEL="your_api_model_here"
Usage Examples
Explore Codebases
cd your-project/
qwen
> Describe the main pieces of this system's architecture
Code Development
> Refactor this function to improve readability and performance
Automate Workflows
> Analyze git commits from the last 7 days, grouped by feature and team member
> Convert all images in this directory to PNG format
Popular Tasks
Understand New Codebases
> What are the core business logic components?
> What security mechanisms are in place?
> How does the data flow work?
Code Refactoring & Optimization
> What parts of this module can be optimized?
> Help me refactor this class to follow better design patterns
> Add proper error handling and logging
Documentation & Testing
> Generate comprehensive JSDoc comments for this function
> Write unit tests for this component
> Create API documentation
Benchmark Results
Terminal-Bench
Agent
Model
Accuracy
Qwen Code
Qwen3-Coder-480A35
37.5
Project Structure
qwen-code/
├── packages/ # Core packages
├── docs/ # Documentation
├── examples/ # Example code
└── tests/ # Test files
Development & Contributing
See CONTRIBUTING.md to learn how to contribute to the project.
This project is based on Google Gemini CLI. We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.
Qwen Code
Qwen Code is a command-line AI workflow tool adapted from Gemini CLI (Please refer to this document for more details), optimized for Qwen3-Coder models with enhanced parser support & tool support.
Key Features
Quick Start
Prerequisites
Ensure you have Node.js version 20 or higher installed.
Installation
Then run from anywhere:
Or you can install it from source:
API Configuration
Set your Qwen API key (In Qwen Code project, you can also set your API key in
.env
file). the.env
file should be placed in the root directory of your current project.Usage Examples
Explore Codebases
Code Development
Automate Workflows
Popular Tasks
Understand New Codebases
Code Refactoring & Optimization
Documentation & Testing
Benchmark Results
Terminal-Bench
Project Structure
Development & Contributing
See CONTRIBUTING.md to learn how to contribute to the project.
Troubleshooting
If you encounter issues, check the troubleshooting guide.
Acknowledgments
This project is based on Google Gemini CLI. We acknowledge and appreciate the excellent work of the Gemini CLI team. Our main contribution focuses on parser-level adaptations to better support Qwen-Coder models.
License
LICENSE