@bluevs/vhcli-google-ads
v0.0.3
Published
Google Ads CLI — designed for AI agents and developers
Downloads
247
Readme
@bluevs/vhcli-google-ads
English
Google Ads API CLI — designed for AI agents and developers.
Installation
npm install -g @bluevs/vhcli-google-adsAuthentication
Tokens are issued by vhcli (Vision Hub CLI). You do not need to handle access tokens directly.
# Fetch a token via vhcli and pass it to gcli
TOKEN=$(vhcli project account-token \
--customer-project-id=<PROJECT_ID> \
--account-id=<CUSTOMER_ID> \
--format=json | jq -r .access_token)
gcli --token="$TOKEN" --customer-id=<CUSTOMER_ID> auth showOr persist credentials for repeated use:
gcli auth set --token="$TOKEN" --customer-id=<CUSTOMER_ID>Usage
gcli [command] [flags]
Flags:
--customer-id string Google Ads customer ID (overrides env / config)
--token string Access token (overrides env / config)
--human Human-readable output (default is JSON)Output is JSON by default, suitable for piping and AI agent use. Pass --human for readable text.
gcli --help
gcli <command> --help
# Dump full command tree for AI agents
gcli schema | jq '.subcommands[] | {path, short}'中文
Google Ads API 命令行工具,专为 AI Agent 和开发者设计。
安装
npm install -g @bluevs/vhcli-google-ads鉴权
Token 由 vhcli(Vision Hub CLI)发证,无需手动处理 access_token。
# 通过 vhcli 获取 token 并传给 gcli
TOKEN=$(vhcli project account-token \
--customer-project-id=<项目ID> \
--account-id=<客户ID> \
--format=json | jq -r .access_token)
gcli --token="$TOKEN" --customer-id=<客户ID> auth show或持久化凭据,后续无需每次传入:
gcli auth set --token="$TOKEN" --customer-id=<客户ID>使用方式
gcli [命令] [参数]
全局参数:
--customer-id string Google Ads 客户 ID(覆盖环境变量 / 配置文件)
--token string 访问令牌(覆盖环境变量 / 配置文件)
--human 人类可读输出(默认为 JSON)默认输出 JSON,适合管道传递和 AI Agent 调用。加 --human 切换为易读文本。
gcli --help
gcli <命令> --help
# 输出完整命令树(供 AI Agent 使用)
gcli schema | jq '.subcommands[] | {path, short}'License
MIT
