Help Center/ CodeArts Agent/ FAQs/ CodeArts Agent CLI/ What Should I Do If an Error Message Is Displayed Indicating That the codearts Item Cannot Be Recognized as the Name of a cmdlet, Function, Script File, or Executable Program After I Run the codearts Command?
Updated on 2026-07-29 GMT+08:00

What Should I Do If an Error Message Is Displayed Indicating That the codearts Item Cannot Be Recognized as the Name of a cmdlet, Function, Script File, or Executable Program After I Run the codearts Command?

Symptom

After installation, typing codearts and pressing Enter returns an error, indicating that the codearts item cannot be recognized as the name of a cmdlet, function, script file, or executable program.

When environment variables are modified in Windows, running processes (including Windows Explorer explorer.exe) do not automatically refresh existing environment variables. The CMD or PowerShell opened from the running processes will not contain the newly added path. As a result, an error is reported, indicating that the codearts item cannot be recognized as the name of a cmdlet, function, script file, or executable program.

Cause Analysis

When environment variables are modified in Windows, running processes (including Windows Explorer explorer.exe) do not automatically refresh existing environment variables. The CMD or PowerShell opened from the running processes will not contain the newly added path.

Solution

After installation, right-click the project folder and choose Open Windows Terminal here from the shortcut menu. In the displayed CMD or PowerShell window, run the codearts command. Alternatively, you can restart the computer.