{"slug": "bringing-huawei-app-management-to-the-terminal-introducing-agc-cli", "title": "Bringing Huawei App Management to the Terminal: Introducing agc-cli", "summary": "A developer built agc-cli, an open-source Go command-line tool that brings Huawei AppGallery Connect operations into the terminal, covering app metadata, testing, provisioning, reviews, and reports. The tool ships a registry of 13 API families and 156 entries with endpoint discovery, generic request construction, and invocation, and defaults to dry-run so requests can be inspected before execution. It is installable via Homebrew, Scoop, or release archives, and credentials are stored as named service-account profiles bound per project.", "body_md": "After using an App Store Connect CLI, I wanted the same command-line experience for managing Huawei apps.\n\n[asc-cli](https://github.com/tddworks/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.\n\nWhen 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.\n\nThat led me to build **agc-cli**, an open-source Go CLI for Huawei AppGallery Connect.\n\n**Its goal is practical: reduce repeated setup and turn common app management operations into commands you can save, reuse, and compose.**\n\nMaintaining a HarmonyOS app does not end with a successful build.\n\nThere 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.\n\nThese 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.\n\nA 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.\n\nThe installed command is `agc`. Operations are grouped by capability:\n\n| Area | Command | \n|---|---|\n| App metadata, localizations, and publishing requests | `agc publishing` | \n| Test versions, testers, and groups | `agc testing` | \n| Products, subscriptions, pricing, and promotions | `agc pms` | \n| HarmonyOS certificates, profiles, devices, and fingerprints | `agc provisioning` | \n| Reviews, ratings, and reports | `agc comments` /`agc reports` | \n| Projects, SDK configuration, and domains | `agc projects` /`agc domains` | \n\nThe registry contains **13 API families and 156 entries**, with endpoint discovery, generic request construction, and invocation. Entries link to their official references.\n\nThose numbers describe registry coverage, not production verification of every endpoint. Fields, permissions, and business prerequisites still follow Huawei's documentation.\n\nOn macOS, install with Homebrew:\n\n```\nbrew tap createitv/tap\nbrew install agc-cli\nagc version\n```\n\nWindows users can use Scoop; Linux users can download release archives. Release binaries do not require Go. See the [English guide](https://github.com/Createitv/agc-cli/blob/main/docs/CLI_USAGE.en.md) for platform instructions.\n\nPrepare your AppGallery Connect app ID and Service Account JSON, then save credentials:\n\n```\nagc auth login \\\n  --service-account-file ~/.agc/service-account.json \\\n  --name production\n```\n\nBind the default credential profile from your app's project directory:\n\n```\nagc init --app-id YOUR_APP_ID --default-profile production\n```\n\nThis writes `.agc/project.json`. Subsequent commands select that project's profile; endpoint requests currently still require explicit app IDs and other parameters.\n\nPreview an app information query:\n\n```\nagc publishing app-info-query \\\n  --invoke \\\n  --query appId=YOUR_APP_ID \\\n  --query lang=en-US \\\n  --pretty\n```\n\nDry-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.\n\nIf the endpoint requires a `client_id` header, add `--header client_id=YOUR_CLIENT_ID`.\n\n*Conceptual workflow: configure credentials and commands, then reuse query results in scripts.*\n\nSuppose you maintain a HarmonyOS app with Chinese and English metadata and regularly need to retrieve both versions of its app information.\n\nPut the operation in a script. Replace the app ID and supply a `client_id` header if required:\n\n```\nmkdir -p agc-results\n\nfor lang in zh-CN en-US; do\n  agc publishing app-info-query \\\n    --invoke \\\n    --query appId=YOUR_APP_ID \\\n    --query lang=\"$lang\" \\\n    --dry-run=false \\\n    --out \"agc-results/app-info.$lang.json\"\ndone\n```\n\n`--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.\n\nThe 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.\n\nFor multiple accounts, select a profile explicitly:\n\n```\nagc --profile staging publishing endpoints --output table\n```\n\n*Conceptual interfaces: shared endpoint definitions support discovery, configuration, request preview, and invocation.*\n\nJSON is the default output, with table and markdown formats available for people. Scripts can pass results to `jq` or another program.\n\nAI agents can inspect endpoint definitions, follow official references, and use next-command templates from `affordances`:\n\n```\nagc capabilities --output table\nagc publishing endpoints --output table\nagc publishing app-info-query --pretty\n```\n\nDiscovery 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.\n\nFor 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.\n\nagc-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.\n\nIf you maintain HarmonyOS apps and want common queries and management operations in your project scripts, start with your first app information query.\n\nSource: [github.com/Createitv/agc-cli](https://github.com/Createitv/agc-cli)\n\nInstallation and documentation: [agccli.app](https://agccli.app/)\n\nReport issues and suggest improvements through [GitHub Issues](https://github.com/Createitv/agc-cli/issues).", "url": "https://wpnews.pro/news/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli", "canonical_source": "https://dev.to/createitv/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli-2ihb", "published_at": "2026-10-07 00:59:48+00:00", "updated_at": "2026-10-07 01:17:35.939701+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Huawei", "AppGallery Connect", "agc-cli", "HarmonyOS", "App Store Connect", "asc-cli", "Go", "Homebrew"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli", "markdown": "https://wpnews.pro/news/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli.md", "text": "https://wpnews.pro/news/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli.txt", "jsonld": "https://wpnews.pro/news/bringing-huawei-app-management-to-the-terminal-introducing-agc-cli.jsonld"}}