Qwen Code Leverages Qwen3 as a CLI Agentic Programming Device


Qwen Code Leverages Qwen3 as a CLI Agentic Programming ToolPicture by Editor

 

Introduction

 
With the latest surge of code-centric giant language fashions, many builders and programmers have began to depend on them to enhance productiveness. Capabilities corresponding to code ideas, debugging, and even scaling a whole challenge at the moment are potential with these instruments.

With technological developments, the thought of agentic AI has been launched to assist our work. As an agentic strategy can cause about duties and resolve on one of the best subsequent step to achieve a objective, it has grow to be a significant device builders can undertake at the moment. By integrating code-focused fashions with an agentic framework, we will create a customized coding assistant that understands our wants from a easy immediate.

Some of the distinguished open-source code-centric fashions is the Qwen3-Coder, which boasts sturdy capabilities in agentic coding duties. With a powerful mannequin like this, the workforce then launched a CLI agentic programming device referred to as Qwen Code to help our coding work.

On this article, we’ll discover tips on how to use Qwen Code in follow.

 

Qwen Code

 
Qwen Code is an agentic command-line (CLI) workflow device based mostly 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 surroundings and act based mostly in your immediate. Moreover, the device supplies methods to automate operational duties and parsing enhancements particular to the Qwen-Coder fashions.

The CLI device is free to make use of and provides two authentication choices: Qwen OAuth and an OpenAI-compatible API. The really useful technique is Qwen OAuth, which we’ll discover on this article. Qwen OAuth supplies free choices, together with 2000 requests per day and a fee restrict of 60 requests per minute, with no token restrict, which we’ll benefit from.

To begin utilizing Qwen Code, you want Node.js version 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 surroundings with the code beneath.

npm set up -g @qwen-code/qwen-code@newest

 

Should you want 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 strive it out. On this article, we’ll consider a coding challenge—particularly the Local RAG recipe project I developed. You should use your individual challenge and code repository.

Let’s begin by activating Qwen Code utilizing the next command in your most popular listing.

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

The very first thing Qwen Code will ask you to do is authenticate. For this text, we’ll choose Qwen OAuth, and you’ll be redirected to the browser.

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool

 
Choose your most popular approach to log in—there are lots of choices to authenticate your profile. Upon getting logged in, return to your CLI, and you might be 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 Leverages Qwen3 as a CLI Agentic Programming Tool


 

Qwen Code will carry out an agentic course of and look at all the challenge repository.

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

Then Qwen Code will present a whole rationalization based mostly on the immediate. On this instance, it explains the code within the listing and its objective.

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

Utilizing Qwen Code, you possibly can ask it to execute actions in your behalf. For instance, you might ask to enhance the code repository utilizing the immediate: “what components of this module could be optimized?”

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

Qwen Code will current potential optimizations and steered modifications to implement.

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

You possibly can then settle for or reject the modifications, sustaining a human-in-the-loop workflow. If you want, you possibly can allow computerized modifications so you don’t want to just accept them repeatedly.

Qwen Code may create required recordsdata by itself, such because the necessities.txt proven beneath.

 


 

Lastly, you possibly can 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 beneath:

 
Qwen Code Leverages Qwen3 as a CLI Agentic Programming Tool


 

The outcome exhibits the aim of every file within the listing and the way it’s used.

If you wish to enhance your Qwen Code expertise, you possibly can create a file .qwen/settings.json and fill it with the settings you need. For instance, you possibly can set the token restrict utilizing the next:

{
  "sessionTokenLimit": 32000
}

 

Moreover, you should use numerous instructions, corresponding to /assist to show all obtainable Qwen Code instructions or /stats to point out the present Qwen Code session info.

That’s the fundamental utilization of Qwen Code; strive numerous prompts in your tasks to see the way it will help your work.

 

Wrapping Up

 
Qwen Code is an agentic CLI device that makes use of Qwen3-Coder, a robust 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 an information science assistant supervisor and information author. Whereas working full-time at Allianz Indonesia, he likes to share Python and information ideas by way of social media and writing media. Cornellius writes on a wide range of AI and machine studying matters.

Leave a Reply

Your email address will not be published. Required fields are marked *