1.2.0 • Published 1 year ago

@agconnect/agc-cli v1.2.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

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:

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.

ResourceCommandDescription
Functioncreate-functionCreates cloud functions.
Functionpublish-functionPublishes cloud functions.
Functionupdate-and-publish-functionUpdates and publishes cloud functions.
Functionupdate-function-codeUpdates cloud function code.
Functionupdate-function-configUpdates cloud function configurations.
Functionlist-functionsQueries all cloud functions.
Functionlist-function-versions.Queries all versions of a function.
ResourceCommandDescription
Layerquery-function-versionQueries a function version.
LayerinvokeCalls cloud functions.
Layercreate-layerCreates a layer.
Layercreate-layer-versionCreates a layer version.
Layerlist-layersQueries all layers.
Layerlist-layer-versionsQueries all versions of a layer.
Layerquery-layer-versionQueries a layer version.
ResourceCommandDescription
Triggercreate-http-triggerCreates an HTTP trigger.
Triggercreate-cron-triggerCreates a CRON trigger.
Triggerupdate-cron-triggerUpdates a CRON trigger.
Triggercreate-layer-versionCreates a layer version.
Triggerlist-triggersQueries all function triggers.
Triggerquery-triggerQueries a trigger of a function.
ResourceCommandDescription
Aliascreate-aliasCreates an alias of a function.
Aliasupdate-aliasUpdates an alias of a function
Aliaslist-aliasesQueries all aliases of a function.
Aliasquery-aliasQueries 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.

CommandDescription
agcli storage enableEnable Cloud Storage.
agcli storage docLink to document.
agcli storage upload-file --path --bucket Upload a file
agcli storage list-file --bucket --prefix List all files.
View details of a fileDelete 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".