$ npm install --global @createitv/agc-cli && agc versionMove 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.
$ agc auth check --pretty
{
"data": {
"name": "production",
"mode": "service-account",
"active": true
},
"affordances": {
"next": "agc publishing endpoints"
}
}project profile resolved · dry-run on
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.
$ brew tap createitv/tap && brew install agc-cli && agc versionPS> 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 versionAgent 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$ agc skills install --agent codex --globalagc-cli-usageGeneral command discovery, dry-run review, authorized execution, and remote verification.
agc skills install --name agc-cli-usage --agent codex --globalagc-authCredential profiles, whoami, OAuth team lookup, and authorization diagnosis.
agc skills install --name agc-auth --agent codex --globalagc-publishingMetadata, packages, review submission, staged rollout, and release-state verification.
agc skills install --name agc-publishing --agent codex --globalagc-testingTest versions, groups, testers, invitation links, feedback, and promotion.
agc skills install --name agc-testing --agent codex --globalagc-reportsDistribution, install, revenue, retention, and HarmonyOS service report exports.
agc skills install --name agc-reports --agent codex --globalagc-cicdPinned cross-platform installation, protected credentials, dry-run gates, and CI verification.
agc skills install --name agc-cicd --agent codex --globalThe 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.
AUTH
PS256 / OAuth
PROFILE
project-bound
PACKAGE
upload + status
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.
- 1CLI override
--profile staging - 2Project default
.agc/project.json - 3Active account
~/.agc/credentials.json
{
"appId": "123456789",
"projectId": "987654321",
"packageName": "com.example.app",
"profile": "production"
}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
Object data queries, writes and deletion using existing zones and schemas.
agc clouddb endpoints --output tableagc clouddb status --pretty/api/v1/clouddbAll 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
useJwt | body | Yes | integer | 使用账号凭据JWT(Json Web Token),固定传入“1”。 |
grant_type | body | Yes | string | 固定传入“client_credentials”。 |
client_id | body | Yes | string | 客户端ID,即获取客户端API授权中的“Client ID”。 |
client_secret | body | Yes | string | 客户端密钥,即获取客户端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.jsonRead endpoint reference ↗
POST用户登录sign-in/agc/apigw/oauth2/third/v1/user-signin
该接口用于用户使用账号密码登录。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息。格式为“Authorization: Bearer ${access_token}”。 access_token为获取Token中获取的access_token。 |
productId | query | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
provider | body | Yes | integer | 账号授权提供方,取值及对应认证方式如下: 0:匿名账号 1:华为账号 2:Facebook* 3:Twitter* 4:微信 5:华为游戏 6:QQ 7:微博 8:Google* 9:Google Play Game* 10:自建账号 11:手机 12:邮箱 13:苹果账号 说明 *星号标记的账号类型仅在海外站点支持,当您选择数据处理位置为德国、新加坡或俄罗斯时可以使用这些认证方式。 |
token | body | Yes | string | 手机号码或者邮箱账号。 |
extraData | body | No | string | 扩展字段,此处用于密码登录时填写密码,填写样例如 {\"password\":\"xxxxxxxxx\"}。 |
autoCreateUser | body | No | integer | 是否自动创建用户,仅用于非托管账号。 0:不自动创建用户。 1:默认值,自动创建用户。 |
useJwt | body | Yes | integer | 使用账号凭据JWT(Json Web Token),固定传入“1”。 |
channelId | body | No | string | 渠道标识,当前渠道划分为华为渠道、AppStore渠道以及GooglePlay渠道。当从这些渠道SDK登录时,该参数有值。 |
aaId | body | No | string | 应用实例唯一编号。 |
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.jsonRead endpoint reference ↗
POST查询数据query-data/agc/apigw/clouddb/clouddbservice/sync/query
该接口用于用户查询数据,云数据库提供了丰富的谓词查询,比如equalTo、notEqualTo、in等,通过单个或者多个链式过滤条件,您可以从云侧数据库查询到满足特定条件的对象,也可以通过限定查询返回数量谓词限定查询结果返回的数量,还可以支持聚合查询,例如查询平均值、最大值、最小值等。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,获取方法参考获取客户端API授权。 |
Authorization | header | No | string | 认证信息。格式为“Authorization: Bearer ${client_token}”。 client_token为获取Token中获取的access_token。 |
productId | header | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
access_token | header | No | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。 |
_v | query | Yes | integer | 数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。 |
msgInfo | body | Yes | object | 消息的基本信息,具体请参见MsgInfo。 |
clientInfo | body | Yes | object | 客户端的基本信息,具体请参见ClientInfo。 |
queryReqMsg | body | Yes | object | 查询请求的基本信息,具体请参见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.jsonRead endpoint reference ↗
POST更新数据update-data/agc/apigw/clouddb/clouddbservice/sync/upsert
该接口用于用户更新数据,支持数据的新增和更新。更新数据时,如果在CloudDBZone已经存在主键值相同的对象,则更新已有的对象;如果不存在,则写入一个新的对象。更新操作需要设置naturalbase_deleted字段为false,具体请参见SchemaField字段设置。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,即获取客户端API授权中的“Client ID”。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${authorization_token}”。 authorization_token为获取Token中获取的access_token。 |
productId | header | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
access_token | header | No | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。 |
_v | query | Yes | integer | 数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。 |
msgInfo | body | Yes | object | 消息的基本信息,具体请参见MsgInfo。 |
clientInfo | body | Yes | object | 客户端的基本信息,具体请参见ClientInfo。 |
schemas | body | Yes | array | 表对象信息,具体请参见Schema。 |
opData | body | Yes | array | 更新数据对象信息,具体请参见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.jsonRead endpoint reference ↗
POST删除数据delete-data/agc/apigw/clouddb/clouddbservice/sync/upsert
该接口用于用户删除数据,根据您传入对象主键删除相应的数据,不会比对该对象其他属性与存储的数据是否一致,删除操作需要设置naturalbase_deleted字段为true,具体请参见SchemaField字段设置。
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
client_id | header | No | string | 客户端ID,即获取客户端API授权中的“Client ID”。 |
Authorization | header | No | string | 认证信息,格式为“Authorization: Bearer ${authorization_token}”。 authorization_token为获取Token中获取的access_token。 |
productId | header | Yes | string | 项目ID,查询方法可参见查询项目ID。 |
access_token | header | No | string | 认证凭据。用户登录成功后,在登录接口的响应参数“accessToken”中获取。该值为空时,则表示匿名账号登录。 |
_v | query | Yes | integer | 数据版本类型,入参需为“4”表示protobuf v2 版本类型的json字符串。 |
msgInfo | body | Yes | object | 消息的基本信息,具体请参见MsgInfo。 |
clientInfo | body | Yes | object | 客户端的基本信息,具体请参见ClientInfo。 |
schemas | body | Yes | array | 对象类型信息。 |
opData | body | Yes | array | 更新数据的对象信息。 |
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.jsonRead endpoint reference ↗
GETschema-versionsschema-versions/agc/edge/clouddb/clouddbservice/v1/schemaVersion
Reviewed native management transport; explicit user session required.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|
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=trueRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
schemaVersion | query | Yes | integer | — |
objectTypeName | query | Yes | string | — |
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=trueRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
objectType | body | Yes | object | — |
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.jsonRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
objectType | body | Yes | object | — |
originObjectType | body | Yes | object | — |
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.jsonRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
objectTypeName | body | Yes | string | — |
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.jsonRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
schemaVersion | body | Yes | integer | — |
objectTypes | body | Yes | array | — |
permissions | body | No | array | — |
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.jsonRead 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
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
schemaVersion | body | Yes | integer | — |
type | body | Yes | string | — |
jsFileType | body | No | string | — |
javaFileType | body | No | string | — |
packageName | body | No | string | — |
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.jsonRead endpoint reference ↗
GETlist-zoneslist-zones/agc/edge/clouddb/clouddbservice/v1/naturalStore
Reviewed native management transport; explicit user session required.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|
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=trueRead endpoint reference ↗
POSTcreate-zonecreate-zone/agc/edge/clouddb/clouddbservice/v1/naturalStore
Reviewed native management transport; explicit user session required.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
cloudDBZoneName | body | Yes | string | — |
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.jsonRead endpoint reference ↗
DELETEdelete-zonedelete-zone/agc/edge/clouddb/clouddbservice/v1/naturalStore
Reviewed native management transport; explicit user session required.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
cloudDBZoneName | body | Yes | string | — |
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.jsonRead endpoint reference ↗
POSTprocess-statusprocess-status/agc/edge/clouddb/clouddbservice/v1/processPercentage
Reviewed native management transport; explicit user session required.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
processId | body | Yes | string | — |
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.jsonRead 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
GEO · AEO · LLMO
Agent-readable documentation
These public files expose project facts, task selection, safety boundaries, Skills, and endpoint contracts without requiring JavaScript, authentication, or page-structure guessing.
A complete path from task selection and auth checks to dry runs and result verification.
/agent-guide.en.mdSkills indexSix task-oriented Skills with use cases, install commands, and source links.
/skills.mdFull AI contextA single-file project briefing, command boundaries, and resource index for LLMs.
/llms-full.txtAPI contract JSONMethods, paths, parameters, and official references for all 156 registered endpoints.
/api-reference.jsonFrequently 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.
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 productionBind 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 productionInspect 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=falseLocal 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/api/v1/capabilitiesfamilies + affordances/api/v1/endpointsall interface entries/api/v1/openapi.jsonmachine-readable contract/api/v1/:family/endpoints/:id/invokedry-run by default