@ohos/hpm-cli
Version:
CLI for HarmonyOS package manager
201 lines (164 loc) • 5.18 kB
Markdown
[简体中文](./README_ZH.md) | English
hpm-cli
The HarmonyOS Package Manager command line interface.
# How to install it?
Install this globally and you'll have access to the hpm command anywhere on your system. The hpm-cli only support versions >=14.x of nodejs.
```sh
npm install -g @ohos/hpm-cli
```
# How to use it?
List all available commands using:
```sh
hpm help
```
# Update to the latest version
```sh
npm update -g @ohos/hpm-cli
```
# How to uninstall it?
```sh
npm rm -g @ohos/hpm-cli
```
# Configuration
The config file is located at ~/.hpm/hpmrc, List default configurations using:
```sh
hpm config
```
Set the configuration using:
```sh
hpm config set key value
```
The config file is as follows:
```properties
registry = https://repo.harmonyos.com
## login Settings
loginUser = invitation_code
### Path Settings
shellPath = C:\WINDOWS\System32\cmd.exe
globalRepo = C:\Users\username\.hpm\global
### Network Settings
no_proxy = *.server.com
http_proxy = http://user:pwd@proxy_server:port
https_proxy = http://user:pwd@proxy_server:port
strictSsl = true
### Other Settings
privateSupport = true|false
ignoreBundles = @ohos/llvm,@ohos/gn,
OSPlatform = Auto|linux|darwin|win32
restoreCodeSegment = true|false
```
# What's new
1.6.23
## Features
* New support for bundle name contents contain (-)
1.6.21
## Features
* Added independent compilation logic pruning for components
## FIXED
* Optimized component decompression logic using symbolic links for installation directories
* Replaced decompression logs with progress display
1.6.19
## Features
* Added detailed logging for component decompression and installation
* Added retry mechanism for component resource requests
## FIXED
* Improved existing component caching strategy
* Enhanced packaging functionality
1.6.17
## Features
* Added time consumption statistics for component resolution, download and installation steps in independent compilation
* Added failure status preservation and reporting for component resource requests
1.6.15
## FEATURES
* New support for build params compute by -i(src)/-t(test)
1.6.13
## FEATURES
* New support for binary unit build
## FIXED
* Optimize existing component caching strategies
* Optimize packaging functionality
1.6.12
## FEATURES
* New support for compilation and dot function to count command execution times
* New support for binary package os field ohos type
1.6.11
## FIXED
* Optimize Resolve bundle download efficiency,and support batch query and parsing
* Optimize build logs
1.6.10
## FEATURES
* New support for test build name
## FIXED
* Optimize hb build process log
1.6.6
## FIXED
* Resolve the issue of download blocking that current bundle dependencies the same of build bundle
1.6.5
## FIXED
* Optimize and solve infinite recursion download
* init source bundle name,Unified '-' replace with '_'.
1.6.4
## FEATURES
* New support for multiple repo build
* New support for test build
## FIXED
* Part dependencies's dependencies analyzing
1.6.0
## FEATURES
* New support for adding input to the hb command set, such as hb build, hb install, hb publish, etc
* New support added independent compilation of components
* New support added binary component release
* add `addon`、`plugin` template
* add command `hpm download` progress show
* add command `hpm docker` for support run Docker images
## FIXED
* stream pipeline API nodejs version compatibility
* command `hpm config list` output log optimized
1.5.0
## FIXED
* stored the http_proxy and https_proxy configuations in ciphertext when exec the command hpm config set http_proxy|https_proxy
* add some options for hpm search
- -b,--board: Search by the type of board, such as 'hispark_pegasus', 'v200zr', 'gr5515_sk'
- -k,--kernel: Search by the type of kernel, such as 'liteos-m', 'linux'
- -os,--osVersion: Search by the os version, such as '3.0', '3.1'
1.4.5
## FEATURES
* add pulishType `chip-defintion`
## FIXED
* remove tempdir when install bundle
* add action for hpm config
- hpm config list: list all configurations in the .hpmrc
- hpm config get <key>: get value for the Specify key
1.4.1
## FEATURES
* supports snapshot bundle.
## FIXED
* update dependencies
1.4.0
## FEATURES
* add hpm ui plugin support :desginer
* add hpm ui plugin support :search
* add hpm ui plugin support :explore
1.3.0
## FEATURES
* update hpm ui plugin: configurator
## FIXED
* impoved performance
1.2.6
## FEATURES
* add command 'fetch' for download tools
* add command 'download' for download a bundle by name
* add command 'code' for code-segment restore|clean
* add configuration item 'ignoreBundles'
* add configuration item 'OSPlatform'
* add configuration item 'batchDownloadLimit'
* add plugins store (UI)
## FIXED
* improved command 'install'
1.2.0
## FEATURES
* add hpm ui plugin support :configurator
* add private package support
1.1.0
## FEATURES
* support hpm ui