Intelligent Assistant
Chat with our virtual assistant to get answers promptly.
The Command Line Tools package includes codelinter (code check tool), hstack (stack parsing tool), hvigorw (command line build tool), ohpm (third-party dependency management tool), and a series of tools contained in the SDK. This topic describes how to use the codelinter, hstack, hvigorw, and other tools. For details about how to use the tools contained in the SDK, see About This Kit.
Go to Download Center to download the Command Line Tools, and verify the integrity by following the instructions in Tool Integrity.
Since the HarmonyOS SDK is embedded in DevEco Studio, there is no need for separate downloads or configurations.
Decompress the Command Line Tools package. Tools such as codelinter and ohpm are located in the bin directory under command-line-tools. You must add this directory to the PATH environment variable.
After decompressing the Command Line Tools package, add the ${Command Line Tools decompression path}\command-line-tools\bin directory to the system or user PATH environment variable. Then, open the CLI again.
The figure below shows an example path when the Command Line Tools package is decompressed to the root directory of drive D.

echo $SHELL
vi ~/.bash_profile
vi ~/.zshrc
export PATH=${Command Line Tools decompression path}/command-line-tools/bin:$PATH To verify whether the configuration is successful, run the related commands. For example, run the codelinter -v command to check whether the codelinter tool version can be obtained correctly.