CodeArts Agent CLI
Procedure
| Step | Description |
|---|---|
| |
| Step 1: Install CodeArts Agent CLI and Complete the Authorization | Download the CodeArts Agent CLI installation package from the official website of CodeArts Agent. After the installation is successful, complete authorization using a browser. Otherwise, you cannot obtain the model or use its functions. NOTE: This section uses Windows 11 (x64) as an example. |
| After the authorization is complete, you can directly execute the prompt in the CLI. CodeArts Agent CLI will understand your prompt and generate complete, well-structured, and project-level code. |
Purchasing a Package
- Before purchasing CodeArts Agent CLI, sign up for a HUAWEI ID.
- Visit the Huawei Cloud official website, and click Sign Up in the upper right corner.
- Sign up for a HUAWEI ID and enable Huawei Cloud services.
- (Optional) To purchase a basic or professional edition package, complete real-name authentication first.
- Go to the CodeArts Agent purchase page and subscribe to a package as required.
- After purchasing the package, go to the Seats page and check whether the seats of the account that purchases the package are enabled.
Step 1: Install CodeArts Agent CLI and Complete the Authorization
The following uses Windows 11 (x64) as an example to describe how to install and log in to CodeArts Agent CLI.
- Download the CodeArts Agent CLI installation package from the official website of CodeArts Agent.
- Double-click the installation program and complete the installation as prompted.
- Right-click the project directory where you want to compile code and choose Open in Terminal to open the PowerShell window. Enter codearts and press Enter.
- Complete the authorization.
- If you have not logged in to CodeArts Agent, the system will redirect you to the external browser to open the Huawei Cloud login page. You can enter your information to complete the authorization and log in to CodeArts Agent CLI. Browser authorization works only in the current window.
If the browser is not automatically opened, disable the pop-up blocker or manually copy the login link.
- If you have logged in to CodeArts Agent, the TUI development environment page will be displayed.
- If you have not logged in to CodeArts Agent, the system will redirect you to the external browser to open the Huawei Cloud login page. You can enter your information to complete the authorization and log in to CodeArts Agent CLI. Browser authorization works only in the current window.
Step 2: Compile a Snake Game
In the TUI development environment, the autonomous development agent directly responds to prompts in the chat box. It can generate complex project-level code based on requirements, programming language comments, or natural language descriptions.
- Enter the prompt "Please compile a snake game in HTML." Figure 1 Entering a prompt
- Select the file directory access permission for the TUI development environment. In this example, Allow always is selected.
Select Allow always and click Confirm.
Figure 2 Access permissions to the file
- Wait until the task is complete, and go to the file address as prompted.
- Use a browser to open the snake.html file for preview. The following figure shows an example. Figure 3 First attempt
- Continue the conversation. The tool will modify the code based on your requirements. Enter "Please change the color of the snake to yellow" and press Enter.
Select Allow always and click Confirm.
Figure 4 Continuing the conversation
- Wait until the execution is complete and check the latest generation result. Figure 5 Second attempt
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot