
# Introduction
With the current surge of code-centric giant language fashions, many builders and programmers have began to depend on them to enhance productiveness. Capabilities reminiscent of code ideas, debugging, and even scaling a complete mission at the moment are attainable with these instruments.
With technological developments, the concept of agentic AI has been launched to assist our work. As an agentic strategy can motive about duties and determine on one of the best subsequent step to achieve a purpose, it has develop into a significant device builders can undertake in the present day. By integrating code-focused fashions with an agentic framework, we are able to create a personalised coding assistant that understands our wants from a easy immediate.
One of the outstanding open-source code-centric fashions is the Qwen3-Coder, which boasts robust capabilities in agentic coding duties. With a powerful mannequin like this, the group then launched a CLI agentic programming device known as Qwen Code to help our coding work.
On this article, we are going to discover easy methods to use Qwen Code in apply.
# Qwen Code
Qwen Code is an agentic command-line (CLI) workflow device primarily based on the Gemini CLI that has been tailored for the Qwen3-Coder fashions. This CLI device goals to enhance improvement workflows with an clever assistant that may perceive your atmosphere and act primarily based in your immediate. Moreover, the device gives methods to automate operational duties and parsing enhancements particular to the Qwen-Coder fashions.
The CLI device is free to make use of and gives two authentication choices: Qwen OAuth and an OpenAI-compatible API. The really useful methodology is Qwen OAuth, which we are going to discover on this article. Qwen OAuth gives free choices, together with 2000 requests per day and a fee restrict of 60 requests per minute, with no token restrict, which we are going to reap the benefits of.
To begin utilizing Qwen Code, you want Node.js model 20 or increased put in. You possibly can obtain it from the supply or use the next code.
curl -qL https://www.npmjs.com/set up.sh | sh
After set up, use npm to obtain the device into your atmosphere with the code under.
npm set up -g @qwen-code/qwen-code@newest
In case you favor to put in Qwen Code from supply, you should use the next instructions:
git clone https://github.com/QwenLM/qwen-code.git
cd qwen-code
npm set up
npm set up -g .
With Qwen Code put in, let’s attempt it out. On this article, we are going to consider a coding mission—particularly the Native RAG recipe mission I developed. You should use your individual mission and code repository.
Let’s begin by activating Qwen Code utilizing the next command in your most well-liked listing.
The very first thing Qwen Code will ask you to do is authenticate. For this text, we are going to choose Qwen OAuth, and you can be redirected to the browser.
Choose your most well-liked approach to log in—there are a lot of choices to authenticate your profile. After getting logged in, return to your CLI, and you’re able to work with Qwen Code.
Begin utilizing Qwen Code by passing a immediate into the CLI. For instance, I used the immediate: “describe the code right here”
Qwen Code will carry out an agentic course of and study your entire mission repository.
Then Qwen Code will present a whole clarification primarily based on the immediate. On this instance, it explains the code within the listing and its goal.
Utilizing Qwen Code, you’ll be able to ask it to execute actions in your behalf. For instance, you possibly can ask to enhance the code repository utilizing the immediate: “what components of this module might be optimized?”
Qwen Code will current attainable optimizations and advised modifications to implement.
You possibly can then settle for or reject the modifications, sustaining a human-in-the-loop workflow. If you want, you’ll be able to allow computerized modifications so you don’t want to just accept them repeatedly.
Qwen Code may also create required recordsdata by itself, such because the necessities.txt
proven under.
Lastly, you’ll be able to specify a folder or recordsdata you need Qwen Code to course of. For instance, I used the immediate "@chroma_db, please clarify to me what this folder is all about"
. The result’s proven under:
The consequence reveals the aim of every file within the listing and the way it’s used.
If you wish to enhance your Qwen Code expertise, you’ll be able to create a file .qwen/settings.json
and fill it with the settings you need. For instance, you’ll be able to set the token restrict utilizing the next:
{
"sessionTokenLimit": 32000
}
Moreover, you should use numerous instructions, reminiscent of /assist
to show all out there Qwen Code instructions or /stats
to indicate the present Qwen Code session data.
That’s the fundamental utilization of Qwen Code; attempt numerous prompts in your tasks to see the way it may also help your work.
# Wrapping Up
Qwen Code is an agentic CLI device that makes use of Qwen3-Coder, a strong code-focused mannequin. By adapting the device from Gemini CLI, Qwen Code can perceive your code and automate many elementary duties with a easy immediate.
I hope this has helped!
Cornellius Yudha Wijaya is a knowledge science assistant supervisor and information author. Whereas working full-time at Allianz Indonesia, he likes to share Python and information suggestions by way of social media and writing media. Cornellius writes on quite a lot of AI and machine studying matters.