AppGallery Connect, mapped for the terminal

Move every release through one red line.

A Go command center for discovering, dry-running, and invoking AppGallery Connect APIs—with stable JSON for people, CI, and coding agents.

21 API families286 registered interfaces3 output formats
agc / productionreference mode
agcTerminalJSONAgentScript
One command surface. Your workflow.
AUTHPS256 / OAuth
PROFILEproject-bound
PACKAGEupload + status
RELEASEinvoke by choice

$ agc auth check --pretty

{
  "data": {
    "name": "production",
    "mode": "service-account",
    "active": true
  },
  "affordances": {
    "next": "agc publishing endpoints"
  }
}

project profile resolved · dry-run on

Dry-run firstNothing is sent until you opt in.
Agent-readableJSON envelopes include next actions.
One surfaceCLI, local REST, and web share a registry.

Install agc CLI

Use the package manager for your system.

Use NPM for one unattended command across Windows, macOS, and Linux CI. Native Homebrew and Scoop packages remain available for developer workstations.

Windows · macOS · Linux CI
$ npm install --global @createitv/agc-cli && agc version
macOS Homebrew command
$ brew tap createitv/tap && brew install agc-cli && agc version
Windows Scoop command
PS> if (!(Get-Command scoop -ErrorAction SilentlyContinue)) { Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force; irm get.scoop.sh | iex }; scoop bucket add createitv https://github.com/Createitv/scoop-bucket; scoop install agc-cli; agc version
NPM: Node.js 18+ No postinstall download Five checksum-verified platform binaries

Agent Skills

Give your coding agent a map of AppGallery Connect.

Six portable Skills follow the task-oriented asc-cli pattern. Install all of them, choose one workflow, inspect the source, or contribute improvements through GitHub.

Contribute a Skill
Install all six for Codex$ agc skills install --agent codex --global
agc-cli-usage

General command discovery, dry-run review, authorized execution, and remote verification.

agc skills install --name agc-cli-usage --agent codex --global
agc-auth

Credential profiles, whoami, OAuth team lookup, and authorization diagnosis.

agc skills install --name agc-auth --agent codex --global
agc-publishing

Metadata, packages, review submission, staged rollout, and release-state verification.

agc skills install --name agc-publishing --agent codex --global
agc-testing

Test versions, groups, testers, invitation links, feedback, and promotion.

agc skills install --name agc-testing --agent codex --global
agc-reports

Distribution, install, revenue, retention, and HarmonyOS service report exports.

agc skills install --name agc-reports --agent codex --global
agc-cicd

Pinned cross-platform installation, protected credentials, dry-run gates, and CI verification.

agc skills install --name agc-cicd --agent codex --global

The release rail

Context flows forward. Secrets do not.

Each stage owns one job. Credentials remain local, project context remains portable, and destructive API calls require an explicit switch.

01

AUTH

PS256 / OAuth

02

PROFILE

project-bound

03

PACKAGE

upload + status

04

RELEASE

invoke by choice

Automatic profile binding

Choose once per project. Override only when you mean it.

Bind production in .agc/project.json. Commands resolve the profile in a predictable order, while --profile staging remains available for one-off work.

  1. 1CLI override--profile staging
  2. 2Project default.agc/project.json
  3. 3Active account~/.agc/credentials.json
.agc/project.json project safe
{
  "appId": "123456789",
  "projectId": "987654321",
  "packageName": "com.example.app",
  "profile": "production"
}
No client keys or private keys are stored here.

Interface registry

Discover the API before writing the request.

Every entry carries its method, path, parameter locations, CLI command, REST route, and dry-run path.

Selected family / clouddb

Cloud DB for Object

registered

Object data queries, writes and deletion using existing zones and schemas.

DISCOVERagc clouddb endpoints --output table
STATUSagc clouddb status --pretty
LOCAL REST/api/v1/clouddb
16 typed interface entries

All endpoints 16

Expand an endpoint for registered parameters and commands. Consult its reference for full schemas, responses, and permissions.

POST获取Tokenclient-token/agc/apigw/oauth2/v1/token

在使用客户端REST API调用业务接口前,需要通过华为开放平台进行鉴权,并获取认证通过后的Token。

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
useJwtbodyYesinteger使用账号凭据JWT(Json Web Token),固定传入“1”。
grant_typebodyYesstring固定传入“client_credentials”。
client_idbodyYesstring客户端ID,即获取客户端API授权中的“Client ID”。
client_secretbodyYesstring客户端密钥,即获取客户端API授权中的“Client Secret”。

Request body: useJwt,grant_type,client_id,client_secret

Inspect definition

agc clouddb client-token --pretty

Local REST definition

/api/v1/clouddb/endpoints/client-token

Dry run (supply required parameters first)

agc clouddb client-token --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POST用户登录sign-in/agc/apigw/oauth2/third/v1/user-signin

该接口用于用户使用账号密码登录。

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
client_idheaderNostring客户端ID,获取方法参考获取客户端API授权。
AuthorizationheaderNostring认证信息。格式为“Authorization: Bearer ${access_token}”。 access_token为获取Token中获取的access_token。
productIdqueryYesstring项目ID,查询方法可参见查询项目ID。
providerbodyYesinteger账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。
tokenbodyYesstring手机号码或者邮箱账号。
extraDatabodyNostring扩展字段,此处用于密码登录时填写密码,填写样例如 {\"password\":\"xxxxxxxxx\"}。
autoCreateUserbodyNointeger是否自动创建用户,仅用于非托管账号。 0:不自动创建用户。 1:默认值,自动创建用户。
useJwtbodyYesinteger使用账号凭据JWT(Json Web Token),固定传入“1”。
channelIdbodyNostring渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。
aaIdbodyNostring应用实例唯一编号。

Request body: provider,token,extraData,autoCreateUser,useJwt,channelId,aaId

Inspect definition

agc clouddb sign-in --pretty

Local REST definition

/api/v1/clouddb/endpoints/sign-in

Dry run (supply required parameters first)

agc clouddb sign-in --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POST查询数据query-data/agc/apigw/clouddb/clouddbservice/sync/query

该接口用于用户查询数据,云数据库提供了丰富的谓词查询,比如equalTo、notEqualTo、in等,通过单个或者多个链式过滤条件,您可以从云侧数据库查询到满足特定条件的对象,也可以通过限定查询返回数量谓词限定查询结果返回的数量,还可以支持聚合查询,例如查询平均值、最大值、最小值等。

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
client_idheaderNostring客户端ID,获取方法参考获取客户端API授权。
AuthorizationheaderNostring认证信息。格式为“Authorization: Bearer ${client_token}”。 client_token为获取Token中获取的access_token。
productIdheaderYesstring项目ID,查询方法可参见查询项目ID。
access_tokenheaderNostring认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。
_vqueryYesinteger数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。
msgInfobodyYesobject消息的基本信息,具体请参见MsgInfo。
clientInfobodyYesobject客户端的基本信息,具体请参见ClientInfo。
queryReqMsgbodyYesobject查询请求的基本信息,具体请参见QueryRequestMessage。

Request body: msgInfo,clientInfo,queryReqMsg

Inspect definition

agc clouddb query-data --pretty

Local REST definition

/api/v1/clouddb/endpoints/query-data

Dry run (supply required parameters first)

agc clouddb query-data --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POST更新数据update-data/agc/apigw/clouddb/clouddbservice/sync/upsert

该接口用于用户更新数据,支持数据的新增和更新。更新数据时,如果在CloudDBZone已经存在主键值相同的对象,则更新已有的对象;如果不存在,则写入一个新的对象。更新操作需要设置naturalbase_deleted字段为false,具体请参见SchemaField字段设置。

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
client_idheaderNostring客户端ID,即获取客户端API授权中的“Client ID”。
AuthorizationheaderNostring认证信息,格式为“Authorization: Bearer ${authorization_token}”。 authorization_token为获取Token中获取的access_token。
productIdheaderYesstring项目ID,查询方法可参见查询项目ID。
access_tokenheaderNostring认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。
_vqueryYesinteger数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。
msgInfobodyYesobject消息的基本信息,具体请参见MsgInfo。
clientInfobodyYesobject客户端的基本信息,具体请参见ClientInfo。
schemasbodyYesarray表对象信息,具体请参见Schema。
opDatabodyYesarray更新数据对象信息,具体请参见OperatorData。

Request body: msgInfo,clientInfo,schemas,opData

Inspect definition

agc clouddb update-data --pretty

Local REST definition

/api/v1/clouddb/endpoints/update-data

Dry run (supply required parameters first)

agc clouddb update-data --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POST删除数据delete-data/agc/apigw/clouddb/clouddbservice/sync/upsert

该接口用于用户删除数据,根据您传入对象主键删除相应的数据,不会比对该对象其他属性与存储的数据是否一致,删除操作需要设置naturalbase_deleted字段为true,具体请参见SchemaField字段设置。

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
client_idheaderNostring客户端ID,即获取客户端API授权中的“Client ID”。
AuthorizationheaderNostring认证信息,格式为“Authorization: Bearer ${authorization_token}”。 authorization_token为获取Token中获取的access_token。
productIdheaderYesstring项目ID,查询方法可参见查询项目ID。
access_tokenheaderNostring认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。
_vqueryYesinteger数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。
msgInfobodyYesobject消息的基本信息,具体请参见MsgInfo。
clientInfobodyYesobject客户端的基本信息,具体请参见ClientInfo。
schemasbodyYesarray对象类型信息。
opDatabodyYesarray更新数据的对象信息。

Request body: msgInfo,clientInfo,schemas,opData

Inspect definition

agc clouddb delete-data --pretty

Local REST definition

/api/v1/clouddb/endpoints/delete-data

Dry run (supply required parameters first)

agc clouddb delete-data --invoke --dry-run=true --body body.json
Read endpoint reference ↗
GETschema-versionsschema-versions/agc/edge/clouddb/clouddbservice/v1/schemaVersion

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription

Parameters are not listed in the registry. See the reference.

Inspect definition

agc clouddb schema-versions --pretty

Local REST definition

/api/v1/clouddb/endpoints/schema-versions

Dry run (supply required parameters first)

agc clouddb schema-versions --invoke --dry-run=true
Read endpoint reference ↗
GETget-object-typeget-object-type/agc/edge/clouddb/clouddbservice/v1/objectType

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
schemaVersionqueryYesinteger—
objectTypeNamequeryYesstring—

Inspect definition

agc clouddb get-object-type --pretty

Local REST definition

/api/v1/clouddb/endpoints/get-object-type

Dry run (supply required parameters first)

agc clouddb get-object-type --invoke --dry-run=true
Read endpoint reference ↗
POSTcreate-object-typecreate-object-type/agc/edge/clouddb/clouddbservice/v1/objectType

Reviewed native management transport; explicit user session required. Creation is asynchronous; query process-status and independently read back schema before reporting completion.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
objectTypebodyYesobject—

Request body: objectType

Inspect definition

agc clouddb create-object-type --pretty

Local REST definition

/api/v1/clouddb/endpoints/create-object-type

Dry run (supply required parameters first)

agc clouddb create-object-type --invoke --dry-run=true --body body.json
Read endpoint reference ↗
PUTupdate-object-typeupdate-object-type/agc/edge/clouddb/clouddbservice/v1/objectType

Reviewed native management transport; explicit user session required. originObjectType must be the exact prior definition; this is not a patch or a migration of existing data.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
objectTypebodyYesobject—
originObjectTypebodyYesobject—

Request body: objectType,originObjectType

Inspect definition

agc clouddb update-object-type --pretty

Local REST definition

/api/v1/clouddb/endpoints/update-object-type

Dry run (supply required parameters first)

agc clouddb update-object-type --invoke --dry-run=true --body body.json
Read endpoint reference ↗
DELETEdelete-object-typedelete-object-type/agc/edge/clouddb/clouddbservice/v1/objectType

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
objectTypeNamebodyYesstring—

Request body: objectTypeName

Inspect definition

agc clouddb delete-object-type --pretty

Local REST definition

/api/v1/clouddb/endpoints/delete-object-type

Dry run (supply required parameters first)

agc clouddb delete-object-type --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POSTimport-object-typesimport-object-types/agc/edge/clouddb/clouddbservice/v1/importObjectType

Reviewed native management transport; explicit user session required. Raw JSON document, not a JSON string wrapper; only new object types may be imported; local size limit 20MB.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
schemaVersionbodyYesinteger—
objectTypesbodyYesarray—
permissionsbodyNoarray—

Request body: schemaVersion,objectTypes,permissions

Inspect definition

agc clouddb import-object-types --pretty

Local REST definition

/api/v1/clouddb/endpoints/import-object-types

Dry run (supply required parameters first)

agc clouddb import-object-types --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POSTexport-object-typesexport-object-types/agc/edge/clouddb/clouddbservice/v1/exportObjectType

Reviewed native management transport; explicit user session required. Non-JSON formats return source-encoded Base64; no local extraction or execution.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
schemaVersionbodyYesinteger—
typebodyYesstring—
jsFileTypebodyNostring—
javaFileTypebodyNostring—
packageNamebodyNostring—

Request body: schemaVersion,type,jsFileType,javaFileType,packageName

Inspect definition

agc clouddb export-object-types --pretty

Local REST definition

/api/v1/clouddb/endpoints/export-object-types

Dry run (supply required parameters first)

agc clouddb export-object-types --invoke --dry-run=true --body body.json
Read endpoint reference ↗
GETlist-zoneslist-zones/agc/edge/clouddb/clouddbservice/v1/naturalStore

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription

Parameters are not listed in the registry. See the reference.

Inspect definition

agc clouddb list-zones --pretty

Local REST definition

/api/v1/clouddb/endpoints/list-zones

Dry run (supply required parameters first)

agc clouddb list-zones --invoke --dry-run=true
Read endpoint reference ↗
POSTcreate-zonecreate-zone/agc/edge/clouddb/clouddbservice/v1/naturalStore

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
cloudDBZoneNamebodyYesstring—

Request body: cloudDBZoneName

Inspect definition

agc clouddb create-zone --pretty

Local REST definition

/api/v1/clouddb/endpoints/create-zone

Dry run (supply required parameters first)

agc clouddb create-zone --invoke --dry-run=true --body body.json
Read endpoint reference ↗
DELETEdelete-zonedelete-zone/agc/edge/clouddb/clouddbservice/v1/naturalStore

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
cloudDBZoneNamebodyYesstring—

Request body: cloudDBZoneName

Inspect definition

agc clouddb delete-zone --pretty

Local REST definition

/api/v1/clouddb/endpoints/delete-zone

Dry run (supply required parameters first)

agc clouddb delete-zone --invoke --dry-run=true --body body.json
Read endpoint reference ↗
POSTprocess-statusprocess-status/agc/edge/clouddb/clouddbservice/v1/processPercentage

Reviewed native management transport; explicit user session required.

Developer-to-Huawei API

Registered parameters
ParameterLocationRequiredTypeDescription
processIdbodyYesstring—

Request body: processId

Inspect definition

agc clouddb process-status --pretty

Local REST definition

/api/v1/clouddb/endpoints/process-status

Dry run (supply required parameters first)

agc clouddb process-status --invoke --dry-run=true --body body.json
Read endpoint reference ↗

What is agc-cli, and who is it for?

agc-cli is an open-source Go command-line tool for Huawei AppGallery Connect, maintained by Createitv. Its installed command is agc. It organizes API discovery, credential profiles, request previews, and API invocation into reusable commands for HarmonyOS and Huawei app developers who manage app metadata, testers, products, and reports.

Project and guides: GitHub · Usage guide · Issues

Frequently asked questions

Is agc-cli an official Huawei tool?

No. agc-cli is an independent open-source project maintained by Createitv under the MIT license. It organizes endpoints using Huawei AppGallery Connect API references and is not an official Huawei product or support service.

How do I install agc-cli on macOS, Windows, or Linux?

With Node.js 18+, all three systems can run npm install --global @createitv/agc-cli. Homebrew remains available on macOS and Scoop on Windows. Run agc version to verify installation.

Is agc-cli free, and do I need an account?

agc-cli is free to use and modify under the MIT license. Calling Huawei APIs requires your own AppGallery Connect account, credentials, and permissions. Huawei service pricing and limits remain subject to Huawei terms. Browsing the endpoint reference or inspecting CLI definitions does not require login.

How do I query app information for the first time?

Save credentials with agc auth login --service-account-file ~/.agc/service-account.json --name production, then bind the project with agc init --app-id YOUR_APP_ID --default-profile production. Preview with agc publishing app-info-query --invoke --query appId=YOUR_APP_ID --query lang=en-US. Add --dry-run=false after checking the request. Supply a client_id header explicitly when required.

Are all 156 endpoints production-verified?

No. The registry contains 156 entries across 13 API families; this is registry coverage, not production verification of every endpoint. Registered parameters and command surfaces are shown here. Consult each endpoint reference for full request and response schemas, permissions, and business prerequisites.

Does the default dry run change my app?

No. Endpoint commands with --invoke preview the request without sending it by default. Real invocation requires --dry-run=false. Check the target app, credential profile, and parameters before executing.

Can I use agc-cli with scripts or AI agents?

Yes. JSON output supports script processing. agc capabilities and agc endpoints expose discovery; agc web-server provides local REST routes, and agc openapi exports the contract. Command templates support navigation but do not replace business-state checks or review decisions.

How do I install the agc-cli Skills for Codex or Claude?

Install agc-cli, then run agc skills list to browse the six task-oriented Skills. Run agc skills install --agent codex --global for all Skills, or add --name agc-publishing for only the publishing Skill. Individual SKILL.md files are also downloadable from the website.

Does a project profile fill all endpoint parameters automatically?

A project configuration can select its default credential profile, with --profile for explicit overrides. App IDs, languages, headers, and request bodies still need to be supplied according to each endpoint. Keep Service Account private keys and credential files out of Git.

Browse the complete API reference by family

Content updated:

Quick start

Three commands to a bound, inspectable workspace.

Use placeholders for your AppGallery Connect values. The second command is what makes the profile automatic for this project.

01

Save a credential profile

Service Account is the preferred route. Secrets stay in ~/.agc/credentials.json with restricted permissions.

$ agc auth login --service-account-file ~/.agc/service-account.json --name production
02

Bind it to the project

Save project metadata and choose a default credential profile. Supply endpoint parameters explicitly when invoking APIs.

$ agc init --app-id <app-id> --project-id <project-id> --package-name com.example.app --default-profile production
03

Inspect before invoking

Endpoint commands are dry-run first. Review the exact method and URL, then opt into the real request.

$ agc publishing app-info-query --invoke --query appId=<app-id> --dry-run=false

Local command center

The browser is a window into the same registry.

Start the local REST server when you want live capability data. Without it, this site stays useful as a complete reference surface.

agc web-server --addr :8421
GET/api/v1/capabilitiesfamilies + affordances
GET/api/v1/endpointsall interface entries
GET/api/v1/openapi.jsonmachine-readable contract
POST/api/v1/:family/endpoints/:id/invokedry-run by default