$ 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 / templates
Serverless Templates
Developer-hosted user authentication callbacks; no AGC bearer forwarding.
agc templates endpoints --output tableagc templates status --pretty/api/v1/templatesAll endpoints 8
Expand an endpoint for registered parameters and commands. Consult its reference for full schemas, responses, and permissions.
POST获取用户IDuser-id{callbackUrl}
通过accessToken获取抽奖用户ID,即userId。
Inbound callback to your service
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
callbackUrl | path | Yes | string | Developer HTTPS authentication callback URL |
accessToken | body | Yes | string | 认证凭据。 |
Request body: accessToken
Inspect definition
agc templates user-id --pretty
Local REST definition
/api/v1/templates/endpoints/user-idRead endpoint reference ↗
POST获取玩家IDplayer-id{callbackUrl}
通过accessToken获取游戏排行榜的用户ID。
Inbound callback to your service
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
callbackUrl | path | Yes | string | Developer HTTPS authentication callback URL |
appId | body | Yes | string | 应用ID,获取方法参考查看应用基本信息。 |
accessToken | body | Yes | string | 玩家ID的认证凭据,来自于您调用函数接口时带的参数值。 |
Request body: appId,accessToken
Inspect definition
agc templates player-id --pretty
Local REST definition
/api/v1/templates/endpoints/player-idRead endpoint reference ↗
GETsearch-applicationssearch-applications/api/adm/v1/applications/search
Reviewed native management transport; explicit user session required. SAM CloudFunctions application transport, not deployment of the console gallery templates. codeUri is a pre-uploaded bucket/object key. Creation/application acceptance does not prove ready state; search/get-plan must be read back.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
appName | query | Yes | string | — |
Inspect definition
agc templates search-applications --pretty
Local REST definition
/api/v1/templates/endpoints/search-applications
Dry run (supply required parameters first)
agc templates search-applications --invoke --dry-run=trueRead endpoint reference ↗
POSTcreate-applicationcreate-application/api/adm/v1/applications
Reviewed native management transport; explicit user session required. SAM CloudFunctions application transport, not deployment of the console gallery templates. codeUri is a pre-uploaded bucket/object key. Creation/application acceptance does not prove ready state; search/get-plan must be read back.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
name | body | Yes | string | — |
components | body | Yes | array | — |
Request body: name,components
Inspect definition
agc templates create-application --pretty
Local REST definition
/api/v1/templates/endpoints/create-application
Dry run (supply required parameters first)
agc templates create-application --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POSTcreate-plancreate-plan/api/adm/v1/applications/{applicationId}/plans
Reviewed native management transport; explicit user session required. SAM CloudFunctions application transport, not deployment of the console gallery templates. codeUri is a pre-uploaded bucket/object key. Creation/application acceptance does not prove ready state; search/get-plan must be read back.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
applicationId | path | Yes | string | — |
name | body | Yes | string | — |
components | body | Yes | array | — |
Request body: name,components
Inspect definition
agc templates create-plan --pretty
Local REST definition
/api/v1/templates/endpoints/create-plan
Dry run (supply required parameters first)
agc templates create-plan --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
GETget-planget-plan/api/adm/v1/applications/plans/{planId}
Reviewed native management transport; explicit user session required. SAM CloudFunctions application transport, not deployment of the console gallery templates. codeUri is a pre-uploaded bucket/object key. Creation/application acceptance does not prove ready state; search/get-plan must be read back.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
planId | path | Yes | string | — |
Inspect definition
agc templates get-plan --pretty
Local REST definition
/api/v1/templates/endpoints/get-plan
Dry run (supply required parameters first)
agc templates get-plan --invoke --dry-run=trueRead endpoint reference ↗
PUTapply-planapply-plan/api/adm/v1/applications/{applicationId}/plans/{planId}
Reviewed native management transport; explicit user session required. SAM CloudFunctions application transport, not deployment of the console gallery templates. codeUri is a pre-uploaded bucket/object key. Creation/application acceptance does not prove ready state; search/get-plan must be read back.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
applicationId | path | Yes | string | — |
planId | path | Yes | string | — |
Request body: json
Inspect definition
agc templates apply-plan --pretty
Local REST definition
/api/v1/templates/endpoints/apply-plan
Dry run (supply required parameters first)
agc templates apply-plan --invoke --dry-run=true --body body.jsonRead endpoint reference ↗
POSTdeploydeploynative:templates/deploy
Reviewed native management transport; explicit user session required. Create-only SAM deployment: validate every local codeUri ZIP, search exact application name, upload code, create application, then independently query readiness. Existing applications are refused; use explicit create-plan/get-plan/apply-plan for updates. Local-only storageInstance and waitForReady are not sent to ADM. Uploaded artifacts may be retained after failure. Not a console gallery deployment.
Developer-to-Huawei API
| Parameter | Location | Required | Type | Description |
|---|---|---|---|---|
name | body | Yes | string | — |
components | body | Yes | array | — |
storageInstance | body | Yes | string | — |
waitForReady | body | No | boolean | — |
Request body: name,components,storageInstance,waitForReady
Inspect definition
agc templates deploy --pretty
Local REST definition
/api/v1/templates/endpoints/deploy
Dry run (supply required parameters first)
agc templates deploy --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