$ npm install --global @createitv/agc-cli && agc version让每一次发布沿着 同一条红线前进。
用一套 Go 命令发现、预演并调用 AppGallery Connect API,为开发者、CI 和 Coding Agent 提供稳定 JSON。
$ agc auth check --pretty
{
"data": {
"name": "production",
"mode": "service-account",
"active": true
},
"affordances": {
"next": "agc publishing endpoints"
}
}已解析项目 Profile · 默认 dry-run
安装 agc CLI
用系统包管理器安装。
Windows、macOS 和 Linux CI 可通过同一条 NPM 命令无人值守安装。开发电脑仍可使用 Homebrew 或 Scoop 原生包。
$ 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
让 Coding Agent 真正理解 AppGallery Connect 工作流。
6 个可移植 Skills 参考 asc-cli 的任务分层方式设计。可以全部安装,也可以只选择一个工作流;每个 Skill 都支持查看源码、直接下载和通过 GitHub 参与完善。
提交一个 Skill$ agc skills install --agent codex --globalagc-cli-usage通用命令发现、dry-run 预演、授权执行和远程结果验证。
agc skills install --name agc-cli-usage --agent codex --globalagc-auth凭据 Profile、whoami、OAuth 团队查询和权限诊断。
agc skills install --name agc-auth --agent codex --globalagc-publishing应用资料、软件包、提交审核、分阶段发布和发布状态验证。
agc skills install --name agc-publishing --agent codex --globalagc-testing测试版本、群组、测试用户、邀请链接、反馈和版本转正。
agc skills install --name agc-testing --agent codex --globalagc-reports分发、安装、付费、留存和鸿蒙元服务报表导出。
agc skills install --name agc-reports --agent codex --globalagc-cicd跨平台固定版本安装、受保护凭据、dry-run 门禁和 CI 验证。
agc skills install --name agc-cicd --agent codex --global发布轨道
上下文向前流动,密钥留在本地。
每个阶段只完成一件事。凭据保存在本机,项目上下文可以安全共享,写入类 API 必须显式确认。
鉴权
PS256 / OAuth
PROFILE
项目自动绑定
软件包
上传与状态
发布
确认后调用
Profile 自动绑定
每个项目只选择一次,临时切换时再覆盖。
在 .agc/project.json 中绑定 production。命令会按固定优先级解析,也可以用 --profile staging 完成一次性切换。
- 1命令行显式覆盖
--profile staging - 2项目默认 Profile
.agc/project.json - 3全局激活账户
~/.agc/credentials.json
{
"appId": "123456789",
"projectId": "987654321",
"packageName": "com.example.app",
"profile": "production"
}接口注册表
先发现 API,再编写请求。
每个条目都包含 method、path、参数位置、CLI 命令、REST 路由和 dry-run 调用方式。
当前家族 / functions
云函数
创建、更新、发布、调用及版本查询,显式选择用户 OAuth 会话。
agc functions endpoints --output tableagc functions status --pretty/api/v1/functions全部接口 29
展开接口查看已登记参数与命令;完整协议、响应字段及权限以官方文档为准。
POSTcreate-functioncreate-functionnative:functions/create-function
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions create-function --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-function
调用预演(先填写所需参数)
agc functions create-function --invoke --dry-run=true查看接口参考文档 ↗
POSTupdate-function-codeupdate-function-codenative:functions/update-function-code
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions update-function-code --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/update-function-code
调用预演(先填写所需参数)
agc functions update-function-code --invoke --dry-run=true查看接口参考文档 ↗
POSTupdate-function-configupdate-function-confignative:functions/update-function-config
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions update-function-config --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/update-function-config
调用预演(先填写所需参数)
agc functions update-function-config --invoke --dry-run=true查看接口参考文档 ↗
POSTpublish-functionpublish-functionnative:functions/publish-function
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions publish-function --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/publish-function
调用预演(先填写所需参数)
agc functions publish-function --invoke --dry-run=true查看接口参考文档 ↗
POSTupdate-and-publish-functionupdate-and-publish-functionnative:functions/update-and-publish-function
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions update-and-publish-function --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/update-and-publish-function
调用预演(先填写所需参数)
agc functions update-and-publish-function --invoke --dry-run=true查看接口参考文档 ↗
POSTinvokeinvokenative:functions/invoke
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions invoke --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/invoke
调用预演(先填写所需参数)
agc functions invoke --invoke --dry-run=true查看接口参考文档 ↗
POSTlist-functionslist-functionsnative:functions/list-functions
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions list-functions --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-functions
调用预演(先填写所需参数)
agc functions list-functions --invoke --dry-run=true查看接口参考文档 ↗
POSTquery-function-versionquery-function-versionnative:functions/query-function-version
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions query-function-version --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/query-function-version
调用预演(先填写所需参数)
agc functions query-function-version --invoke --dry-run=true查看接口参考文档 ↗
POSTlist-function-versionslist-function-versionsnative:functions/list-function-versions
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|
注册表未列出参数,请查看接口参考。
查看接口定义
agc functions list-function-versions --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-function-versions
调用预演(先填写所需参数)
agc functions list-function-versions --invoke --dry-run=true查看接口参考文档 ↗
GETget-aliasget-alias/api/wisefunction/serverless/v1/functions/{functionName}/aliases/{aliasName}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
aliasName | path | 是 | string | — |
查看接口定义
agc functions get-alias --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/get-alias
调用预演(先填写所需参数)
agc functions get-alias --invoke --dry-run=true查看接口参考文档 ↗
DELETEdelete-aliasdelete-alias/api/wisefunction/serverless/v1/functions/{functionName}/aliases/{aliasName}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
aliasName | path | 是 | string | — |
查看接口定义
agc functions delete-alias --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/delete-alias
调用预演(先填写所需参数)
agc functions delete-alias --invoke --dry-run=true查看接口参考文档 ↗
GETlist-aliaseslist-aliases/api/wisefunction/serverless/v1/functions/{functionName}/aliases
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
functionVersion | query | 否 | string | — |
pageSize | query | 否 | integer | — |
pageIndex | query | 否 | integer | — |
查看接口定义
agc functions list-aliases --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-aliases
调用预演(先填写所需参数)
agc functions list-aliases --invoke --dry-run=true查看接口参考文档 ↗
POSTcreate-aliascreate-alias/api/wisefunction/serverless/v1/functions/{functionName}/aliases
Reviewed native management transport; explicit user session required. Provide one or two explicit version weights totaling 100; no implicit selection of latest published version.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
name | body | 是 | string | — |
functionVersion | body | 是 | string | — |
description | body | 否 | string | — |
routingConfig | body | 是 | object | One or two version weights totaling 100; explicit complete routing required by this CLI. |
请求体: name,functionVersion,description,routingConfig
查看接口定义
agc functions create-alias --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-alias
调用预演(先填写所需参数)
agc functions create-alias --invoke --dry-run=true --body body.json查看接口参考文档 ↗
PUTupdate-aliasupdate-alias/api/wisefunction/serverless/v1/functions/{functionName}/aliases/{aliasName}
Reviewed native management transport; explicit user session required. Read get-alias first and provide revisionId plus the full intended routing configuration.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
aliasName | path | 是 | string | — |
functionVersion | body | 是 | string | — |
revisionId | body | 是 | string | — |
description | body | 否 | string | — |
routingConfig | body | 是 | object | One or two version weights totaling 100; explicit complete routing required by this CLI. |
请求体: functionVersion,revisionId,description,routingConfig
查看接口定义
agc functions update-alias --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/update-alias
调用预演(先填写所需参数)
agc functions update-alias --invoke --dry-run=true --body body.json查看接口参考文档 ↗
POSTcreate-http-triggercreate-http-trigger/api/wisefunction/serverless/v1/trigger
Reviewed native management transport; explicit user session required. funcId is obtained from query-function-version and must include the intended qualifier; create policy separately if required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
funcId | body | 是 | string | — |
mode | body | 是 | string | — |
authFlag | body | 是 | boolean | — |
authAlgor | body | 是 | string | — |
authType | body | 是 | string | — |
enableUrlDecode | body | 是 | boolean | — |
请求体: funcId,mode,authFlag,authAlgor,authType,enableUrlDecode
查看接口定义
agc functions create-http-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-http-trigger
调用预演(先填写所需参数)
agc functions create-http-trigger --invoke --dry-run=true --body body.json查看接口参考文档 ↗
POSTcreate-cron-triggercreate-cron-trigger/api/wisefunction/serverless/v1/triggers
Reviewed native management transport; explicit user session required. Default AGCLI create switch is false; an explicit triggerSwitch is required. Current guide says switch cannot be changed later, unlike AGCLI update; cloud support is unverified.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
funcId | body | 是 | string | — |
triggerType | body | 是 | string | — |
triggerMode | body | 是 | string | — |
triggerSwitch | body | 是 | boolean | — |
spec | body | 是 | object | — |
请求体: funcId,triggerType,triggerMode,triggerSwitch,spec
查看接口定义
agc functions create-cron-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-cron-trigger
调用预演(先填写所需参数)
agc functions create-cron-trigger --invoke --dry-run=true --body body.json查看接口参考文档 ↗
GETget-http-triggerget-http-trigger/api/wisefunction/serverless/v1/trigger/{triggerId}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
triggerId | path | 是 | string | — |
查看接口定义
agc functions get-http-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/get-http-trigger
调用预演(先填写所需参数)
agc functions get-http-trigger --invoke --dry-run=true查看接口参考文档 ↗
DELETEdelete-http-triggerdelete-http-trigger/api/wisefunction/serverless/v1/trigger/{triggerId}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
triggerId | path | 是 | string | — |
查看接口定义
agc functions delete-http-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/delete-http-trigger
调用预演(先填写所需参数)
agc functions delete-http-trigger --invoke --dry-run=true查看接口参考文档 ↗
GETlist-http-triggerslist-http-triggers/api/wisefunction/serverless/v1/trigger/list/{funcId}
Reviewed native management transport; explicit user session required. Listing path is also reviewed in boundary/triggerService.js. Endpoint list uses exact funcId, no automatic qualifier discovery.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
funcId | path | 是 | string | — |
pageSize | query | 否 | integer | — |
pageIndex | query | 否 | integer | — |
查看接口定义
agc functions list-http-triggers --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-http-triggers
调用预演(先填写所需参数)
agc functions list-http-triggers --invoke --dry-run=true查看接口参考文档 ↗
GETget-triggerget-trigger/api/wisefunction/serverless/v1/triggers/{triggerId}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
triggerId | path | 是 | string | — |
查看接口定义
agc functions get-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/get-trigger
调用预演(先填写所需参数)
agc functions get-trigger --invoke --dry-run=true查看接口参考文档 ↗
DELETEdelete-triggerdelete-trigger/api/wisefunction/serverless/v1/triggers/{triggerId}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
triggerId | path | 是 | string | — |
查看接口定义
agc functions delete-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/delete-trigger
调用预演(先填写所需参数)
agc functions delete-trigger --invoke --dry-run=true查看接口参考文档 ↗
GETlist-triggerslist-triggers/api/wisefunction/serverless/v1/triggers/list/{funcId}
Reviewed native management transport; explicit user session required. Listing path is also reviewed in boundary/triggerService.js. Endpoint list uses exact funcId, no automatic qualifier discovery.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
funcId | path | 是 | string | — |
pageSize | query | 否 | integer | — |
pageIndex | query | 否 | integer | — |
查看接口定义
agc functions list-triggers --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-triggers
调用预演(先填写所需参数)
agc functions list-triggers --invoke --dry-run=true查看接口参考文档 ↗
PUTupdate-cron-triggerupdate-cron-trigger/api/wisefunction/serverless/v1/triggers/{triggerId}
Reviewed native management transport; explicit user session required. Read get-trigger first; preserve funcId, spec, triggerMode and revisionId.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
triggerId | path | 是 | string | — |
funcId | body | 是 | string | — |
triggerMode | body | 是 | string | — |
triggerSwitch | body | 是 | boolean | — |
spec | body | 是 | object | — |
revisionId | body | 是 | string | — |
请求体: funcId,triggerMode,triggerSwitch,spec,revisionId
查看接口定义
agc functions update-cron-trigger --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/update-cron-trigger
调用预演(先填写所需参数)
agc functions update-cron-trigger --invoke --dry-run=true --body body.json查看接口参考文档 ↗
GETget-function-policyget-function-policy/api/wisefunction/serverless/v1/functions/{functionName}/policy
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
qualifier | query | 是 | string | — |
查看接口定义
agc functions get-function-policy --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/get-function-policy
调用预演(先填写所需参数)
agc functions get-function-policy --invoke --dry-run=true查看接口参考文档 ↗
POSTcreate-function-policycreate-function-policy/api/wisefunction/serverless/v1/functions/{functionName}/policy
Reviewed native management transport; explicit user session required. Read policy first; no automatic grants or silent retries.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
functionName | path | 是 | string | — |
qualifier | query | 是 | string | — |
effect | body | 是 | string | — |
action | body | 是 | string | — |
sourceProvider | body | 是 | string | — |
sourceId | body | 是 | string | — |
revisionId | body | 否 | string | — |
请求体: effect,action,sourceProvider,sourceId,revisionId
查看接口定义
agc functions create-function-policy --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-function-policy
调用预演(先填写所需参数)
agc functions create-function-policy --invoke --dry-run=true --body body.json查看接口参考文档 ↗
GETlist-layerslist-layers/api/wisefunction/serverless/v1/layers
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
layerName | query | 否 | string | — |
ownerFlag | query | 否 | string | — |
compatibleRuntime | query | 否 | string | — |
pageSize | query | 否 | integer | — |
pageIndex | query | 否 | integer | — |
查看接口定义
agc functions list-layers --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-layers
调用预演(先填写所需参数)
agc functions list-layers --invoke --dry-run=true查看接口参考文档 ↗
GETlist-layer-versionslist-layer-versions/api/wisefunction/serverless/v1/layers/{layerName}/versions
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
layerName | path | 是 | string | — |
compatibleRuntime | query | 否 | string | — |
pageSize | query | 否 | integer | — |
pageIndex | query | 否 | integer | — |
查看接口定义
agc functions list-layer-versions --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/list-layer-versions
调用预演(先填写所需参数)
agc functions list-layer-versions --invoke --dry-run=true查看接口参考文档 ↗
GETget-layer-versionget-layer-version/api/wisefunction/serverless/v1/layers/{layerName}/versions/{layerVersion}
Reviewed native management transport; explicit user session required.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
layerName | path | 是 | string | — |
layerVersion | path | 是 | string | — |
查看接口定义
agc functions get-layer-version --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/get-layer-version
调用预演(先填写所需参数)
agc functions get-layer-version --invoke --dry-run=true查看接口参考文档 ↗
POSTcreate-layer-versioncreate-layer-version/api/wisefunction/serverless/v1/layers/{layerName}/versions
Reviewed native management transport; explicit user session required. zipFile contains Base64 ZIP bytes; validate compressed/decompressed limits and entry count before authorization. Layer name creates the initial version or appends a version. AGCLI 1.12.0 local ZIP validation caps files below 50MiB; this direct API adapter uses the current browser-reviewed guide limits of 150MiB compressed, 300MiB expanded and 30000 entries. This difference and modern runtime wire values still require cloud verification.
开发者调用华为 API
| 参数 | 位置 | 必填 | 类型 | 说明 |
|---|---|---|---|---|
layerName | path | 是 | string | — |
compatibleRuntimes | body | 是 | array | — |
sharedScope | body | 是 | integer | — |
zipFile | body | 是 | string | — |
description | body | 否 | string | — |
licenseInfo | body | 否 | string | — |
请求体: compatibleRuntimes,sharedScope,zipFile,description,licenseInfo
查看接口定义
agc functions create-layer-version --pretty
本地 REST 定义地址
/api/v1/functions/endpoints/create-layer-version
调用预演(先填写所需参数)
agc functions create-layer-version --invoke --dry-run=true --body body.json查看接口参考文档 ↗
agc-cli 是什么,适合谁使用?
agc-cli 是 Createitv 开源的华为 AppGallery Connect 命令行工具,安装后的命令名是 agc。它面向鸿蒙和华为应用开发者,将接口发现、凭据 Profile、请求预演与 API 调用组织成可复用命令,适合需要维护应用资料、测试用户、商品和报表的个人开发者与团队。
项目与使用指南: GitHub · 使用指南 · Issues
GEO · AEO · LLMO
面向 AI Agent 的可读取文档
这些公开文件提供项目事实、任务选择、安全边界、Skills 和完整接口契约。Coding Agent 可以直接读取,无需执行 JavaScript、登录或猜测页面结构。
常见问题
agc-cli 是华为官方工具吗?
不是。agc-cli 是 Createitv 维护的独立开源项目,使用 MIT 许可证。它基于华为 AppGallery Connect API 参考文档组织接口,不代表华为官方产品或官方支持服务。
如何在 macOS、Windows 和 Linux 安装 agc-cli?
已安装 Node.js 18+ 时,三个系统都可运行 npm install --global @createitv/agc-cli。macOS 也可使用 Homebrew,Windows 也可使用 Scoop。安装后运行 agc version 检查版本。
agc-cli 免费吗,需要付费账号吗?
agc-cli 使用 MIT 许可证,可免费使用和修改。调用华为 API 需要自己的 AppGallery Connect 账号、凭据和相应权限;华为平台服务的费用和限制以华为说明为准。浏览官网接口和使用 CLI 查看接口定义无需登录。
如何开始第一次应用信息查询?
先用 agc auth login --service-account-file ~/.agc/service-account.json --name production 保存凭据,再用 agc init --app-id YOUR_APP_ID --default-profile production 绑定项目。运行 agc publishing app-info-query --invoke --query appId=YOUR_APP_ID --query lang=zh-CN 预演请求,确认后增加 --dry-run=false 发送请求。接口要求 client_id 时显式补上请求头。
156 个接口是否都完成了生产验证?
156 表示注册表中的接口条目数量,分属 13 个 API 家族,不代表每个接口都已完成生产验证。注册表展示已登记参数和调用入口;完整请求、响应、权限与业务前置条件以每个接口链接的参考文档为准。
默认 dry-run 会修改我的应用吗?
不会。带 --invoke 的接口命令默认构建并预览请求,不发送远程请求。真实调用需显式设置 --dry-run=false;调用前应检查目标应用、所选凭据和参数。
可以把 agc-cli 用在脚本或 AI Agent 中吗?
可以。默认 JSON 输出适合脚本处理,agc capabilities 和 agc endpoints 提供能力发现;agc web-server 提供本地 REST 接口,agc openapi 导出接口契约。命令模板帮助导航,但不能替代业务状态检查或审核判断。
如何安装 agc-cli 的 Codex 或 Claude Agent Skills?
先安装 agc-cli,再运行 agc skills list 查看 6 个任务型 Skills。使用 agc skills install --agent codex --global 安装全部 Skills,或增加 --name agc-publishing 只安装发布 Skill。也可以从官网直接下载对应的 SKILL.md。
项目 Profile 会自动填入所有接口参数吗?
项目配置可以绑定默认凭据 Profile,临时切换时使用 --profile。应用 ID、语言、请求头和请求体等接口参数仍需按接口要求显式提供。不要将 Service Account 私钥或凭据文件提交到 Git。
按 API 家族浏览完整参考
内容更新:
快速开始
三条命令,建立可检查的项目工作区。
请将占位符替换为 AppGallery Connect 的真实值。第二条命令会让该项目自动选择对应 Profile。
保存凭据 Profile
推荐使用 Service Account。密钥会以受限权限保存在 ~/.agc/credentials.json。
$ agc auth login --service-account-file ~/.agc/service-account.json --name production绑定当前项目
保存项目资料与默认凭据 Profile;调用接口时仍按要求填写应用 ID 等参数。
$ agc init --app-id <app-id> --project-id <project-id> --package-name com.example.app --default-profile production调用前先检查
接口命令默认 dry-run。确认 method 与 URL 后,再明确执行真实请求。
$ agc publishing app-info-query --invoke --query appId=<app-id> --dry-run=false本地命令中心
浏览器看到的,就是 CLI 使用的同一份注册表。
需要实时能力数据时启动本地 REST 服务;未启动时,官网仍会作为完整参考界面工作。
agc web-server --addr :8421/api/v1/capabilities家族与下一步操作/api/v1/endpoints全部接口条目/api/v1/openapi.json机器可读契约/api/v1/:family/endpoints/:id/invoke默认 dry-run