After using an App Store Connect CLI, I wanted the same command-line experience for managing Huawei apps.
asc-cli brings App Store Connect operations into the terminal. Developers can organize commands into scripts and give AI coding assistants a clear interface to work with. What appealed to me was how naturally app management became part of the development workflow.
When I applied that approach to HarmonyOS development, I still had to find individual AppGallery Connect endpoints, handle authentication, assemble parameters, and construct requests. Source code lives in version control and builds run through scripts. App management deserves an equally clear interface.
That led me to build agc-cli, an open-source Go CLI for Huawei AppGallery Connect.
Its goal is practical: reduce repeated setup and turn common app management operations into commands you can save, reuse, and compose.
Maintaining a HarmonyOS app does not end with a successful build.
There is app information to inspect, localized metadata to check, testers to manage, reviews to handle, and reports to request. Multiple projects add another layer: confirming which account and app each operation should use.
These tasks are manageable individually, but they recur with every release. For a solo developer, they interrupt coding. For a team, they often become procedures passed along through informal instructions.
A CLI gives those procedures a concrete form. Commands describe the operation, parameters identify the target, and output supplies data for the next step. Once organized into project scripts, common tasks become easier to repeat.
The installed command is agc. Operations are grouped by capability:
| Area | Command |
|---|---|
| App metadata, localizations, and publishing requests | agc publishing |
| Test versions, testers, and groups | agc testing |
| Products, subscriptions, pricing, and promotions | agc pms |
| HarmonyOS certificates, profiles, devices, and fingerprints | agc provisioning |
| Reviews, ratings, and reports | agc comments /agc reports |
| Projects, SDK configuration, and domains | agc projects /agc domains |
The registry contains 13 API families and 156 entries, with endpoint discovery, generic request construction, and invocation. Entries link to their official references.
Those numbers describe registry coverage, not production verification of every endpoint. Fields, permissions, and business prerequisites still follow Huawei's documentation.
On macOS, install with Homebrew:
brew tap createitv/tap
brew install agc-cli
agc version
Windows users can use Scoop; Linux users can download release archives. Release binaries do not require Go. See the English guide for platform instructions.
Prepare your AppGallery Connect app ID and Service Account JSON, then save credentials:
agc auth login \
--service-account-file ~/.agc/service-account.json \
--name production
Bind the default credential profile from your app's project directory:
agc init --app-id YOUR_APP_ID --default-profile production
This writes .agc/project.json. Subsequent commands select that project's profile; endpoint requests currently still require explicit app IDs and other parameters.
Preview an app information query:
agc publishing app-info-query \
--invoke \
--query appId=YOUR_APP_ID \
--query lang=en-US \
--pretty
Dry-run is the default. It constructs the request and shows the HTTP method and target URL without sending it. Add --dry-run=false to execute the query after inspection.
If the endpoint requires a client_id header, add --header client_id=YOUR_CLIENT_ID.
Conceptual workflow: configure credentials and commands, then reuse query results in scripts.
Suppose you maintain a HarmonyOS app with Chinese and English metadata and regularly need to retrieve both versions of its app information.
Put the operation in a script. Replace the app ID and supply a client_id header if required:
mkdir -p agc-results
for lang in zh-CN en-US; do
agc publishing app-info-query \
--invoke \
--query appId=YOUR_APP_ID \
--query lang="$lang" \
--dry-run=false \
--out "agc-results/app-info.$lang.json"
done
--out saves the raw response body. Inspect the responses, extract the fields you need, or use them as input for your own metadata comparison scripts.
The benefit is straightforward: configure a common query once, reuse it with parameters, and keep processing the results programmatically instead of repeatedly copying information by hand.
For multiple accounts, select a profile explicitly:
agc --profile staging publishing endpoints --output table
Conceptual interfaces: shared endpoint definitions support discovery, configuration, request preview, and invocation.
JSON is the default output, with table and markdown formats available for people. Scripts can pass results to jq or another program.
AI agents can inspect endpoint definitions, follow official references, and use next-command templates from affordances:
agc capabilities --output table
agc publishing endpoints --output table
agc publishing app-info-query --pretty
Discovery works without login. Agents can inspect an endpoint, fill in parameters, and construct a request. Templates provide navigation; they do not replace business-state checks or review decisions.
For further integration, agc web-server exposes a local REST API, while agc openapi exports its contract. Terminal commands, scripts, and local tools share the same endpoint registry.
agc-cli is MIT-licensed, with Chinese and English documentation, tests, and CI checks. Its current focus is a consistent interface to app management APIs. Complete binary/multipart upload orchestration and local Hvigor execution are not yet implemented.
If you maintain HarmonyOS apps and want common queries and management operations in your project scripts, start with your first app information query.
Source: github.com/Createitv/agc-cli
Installation and documentation: agccli.app
Report issues and suggest improvements through GitHub Issues.