@agconnect/agc-cli
v1.2.0
Published
- [Overview](#overview) - [Prerequisites](#prerequisites) - [Installation](#installation) - [Usage](#usage) - [Documentation](#documentation) - [Cloud Functions](#cloud-functions) - [Cloud Storage](#cloud-storage) - [License](#license)
Downloads
8
Readme
AM_AppGallery_AppGalleryConnectCliTool
Table Of Contents
Overview
AppGalleryConnectCliTool (AGCLI for short), is a command line tool which helps you to operate and manage your application services on AppGalleryConnect, The AGCLI provides;
- Development and maintenance services for developers through command lines.
- Basic capabilities such as developer login and logout, team switchover, and selecting project.
- Ease of use and accessibility to AGC App Services such as Cloud Function, Cloud Storage and more to reduce the operations that you would need to complete on AGC Web Portal.
Prerequisites
Ensure that:
You have registered an account on the HUAWEI Developer website and passed real-name authentication. For details, see HUAWEI ID Registration.
You have created a team on the AppGallery Connect console. For details, see Managing the Team Account.
You have created a project and app on the AppGallery Connect console. For details, see Creating Your Project and App.
You have installed Node.js and npm on your local PC.
Installation
Go to the compilation platform and run the following command to download and install AGCLI:
npm install -g @agconnect/agc-cli
If the installation fails, switch the repository to here or run the following command:
npm config set registry https://registry.npmjs.org/
Usage
Run the following command to log in to AGCLI:
agcli login
Run the following command to select a team: After entering the command, press arrow keys to select a team.
agcli team change
Run the following command to select a project: After entering agcli project change, press arrow keys to select a project.
agcli project change
Documentation
You can find the usage documentation in this section.
Cloud Functions
The commands for operating Cloud Functions is described in the following table. For more information please check the Service Introduction in the Huawei Developers Website.
| Resource | Command | Description | | -------------- | ------------------------|---------------------------------------------------------------------------------------------------------------------- | | Function | create-function | Creates cloud functions. | | Function | publish-function | Publishes cloud functions. | | Function | update-and-publish-function | Updates and publishes cloud functions. | | Function | update-function-code | Updates cloud function code. | | Function | update-function-config | Updates cloud function configurations. | | Function | list-functions | Queries all cloud functions. | | Function | list-function-versions. | Queries all versions of a function. |
| Resource | Command | Description | | -------------- | ------------------------|---------------------------------------------------------------------------------------------------------------------- | | Layer | query-function-version | Queries a function version. | | Layer | invoke | Calls cloud functions. | | Layer | create-layer | Creates a layer. | | Layer | create-layer-version | Creates a layer version. | | Layer | list-layers | Queries all layers. | | Layer | list-layer-versions | Queries all versions of a layer. | | Layer | query-layer-version | Queries a layer version. |
| Resource | Command | Description | | -------------- | ------------------------|---------------------------------------------------------------------------------------------------------------------- | | Trigger | create-http-trigger | Creates an HTTP trigger. | | Trigger | create-cron-trigger | Creates a CRON trigger. | | Trigger | update-cron-trigger | Updates a CRON trigger. | | Trigger | create-layer-version | Creates a layer version. | | Trigger | list-triggers | Queries all function triggers. | | Trigger | query-trigger | Queries a trigger of a function. |
| Resource | Command | Description | | -------------- | ------------------------|---------------------------------------------------------------------------------------------------------------------- | | Alias | create-alias | Creates an alias of a function. | | Alias | update-alias | Updates an alias of a function | | Alias | list-aliases | Queries all aliases of a function. | | Alias | query-alias | Queries an alias of a function. |
Cloud Storage
The commands for operating Cloud Storage is described in the following table. For more information please check the Service Introduction in the Huawei Developers Website.
| Command | Description | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | agcli storage enable | Enable Cloud Storage. | | agcli storage doc |Link to document. | | agcli storage upload-file --path --bucket | Upload a file | | agcli storage list-file --bucket --prefix | List all files. | | View details of a file | Delete files. | | agcli storage delete-file --path | Set the default account to use for this project | | agcli storage download-file --path | Download files. | | agcli storage add-cors --origin --method --header --exposed-header --cache-duration | List all cross-origin policies. | | agcli storage delete-cors --index | Delete a cross-orgin policy |
License
Huawei AppGalleryConnectCliTool is licensed under the "ISC".