关于 pp-google-ads
通过 Printing Press CLI 操作 Google Ads 的技能,面向使用该 CLI 的 Agent,涵盖账户、广告系列、受众、关键词、素材和转化操作。
主要功能
- 01受众与关键词洞察
- 02广告系列和广告变更
- 03素材生成
- 04上传转化数据
适用场景
- 01探索受众与关键词机会
- 02管理广告系列和素材
- 03上传转化数据
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ mvanhorn/ printing-press-library --skill pp-google-ads安装后在 Claude Code 中输入/pp-google-ads确认已加载。
详细介绍
Google Ads — Printing Press CLI
前提条件:安装 CLI
此技能通过 google-ads-pp-cli 二进制文件运行。**调用此技能中的任何命令前,必须确认 CLI 已安装。**如果尚未安装,请先安装:
- 使用 Printing Press 安装程序安装。在 macOS/Linux 上,二进制文件默认安装到
$HOME/.local/bin;在 Windows 上,默认安装到%LOCALAPPDATA%\Programs\PrintingPress\bin:npx -y @mvanhorn/printing-press-library install google-ads --cli-only - 验证:
google-ads-pp-cli --version - 确保报告的安装目录位于将调用此技能的 Agent/运行时的
$PATH中。
如果 npx 安装失败(未安装 Node、处于离线状态等),请改用直接通过 Go 安装的方式(需要 Go 1.26.6 或更高版本):
go install github.com/mvanhorn/printing-press-library/library/marketing/google-ads/cmd/google-ads-pp-cli@latest
如果安装后 --version 报告“command not found”,则运行时无法在 $PATH 中找到二进制文件目录。验证成功前,不要继续执行技能命令。
命令参考
audience_insights — Google Ads 受众洞察操作
google-ads-pp-cli audience-insights— 列出可请求受众洞察数据的日期范围。
customers — Google Ads 客户操作
google-ads-pp-cli customers create-customer-client— 在经理账户下创建新的客户。返回新客户。google-ads-pp-cli customers generate-ad-group-themes— 根据给定的关键字,返回建议的广告组列表以及建议的修改(文本、匹配类型)。google-ads-pp-cli customers generate-audience-composition-insights— 返回感兴趣的受众中所包含的一组属性,并提供用于比较各项属性的指标……google-ads-pp-cli customers generate-audience-overlap-insights— 返回一组受众属性,以及这些属性的潜在 YouTube 受众之间重叠情况的估算……google-ads-pp-cli customers generate-creator-insights— 返回一组 YouTube 创作者和频道的洞察。google-ads-pp-cli customers generate-insights-finder-report— 创建一份可在 Insights Finder 工具中查看的已保存报告。google-ads-pp-cli customers generate-keyword-forecast-metrics— 返回给定广告系列的关键字预测指标(如展示次数、点击次数和总费用)。google-ads-pp-cli customers generate-keyword-historical-metrics— 返回关键字历史指标列表。google-ads-pp-cli customers generate-keyword-ideas— 返回关键字创意列表。google-ads-pp-cli customers generate-reach-forecast— 根据给定的定位 / 产品组合生成覆盖面预测。google-ads-pp-cli customers generate-shareable-previews— 返回请求的可分享预览。google-ads-pp-cli customers generate-suggested-targeting-insights— 返回与请求的受众相关的一组定位洞察(例如,可定位的受众)。google-ads-pp-cli customers generate-targeting-suggestion-metrics— 返回可定位受众的潜在覆盖面指标。此方法有助于回答“多少名年龄为……的男性”之类的问题……google-ads-pp-cli customers generate-trending-insights— 返回 YouTube 趋势内容的洞察。google-ads-pp-cli customers get-identity-verification— 返回身份验证信息。google-ads-pp-cli customers list-accessible-customers— 返回对调用进行身份验证的用户可直接访问的客户资源名称。google-ads-pp-cli customers mutate— 更新客户。返回操作状态。google-ads-pp-cli customers remove-campaign-automatically-created-asset— 从广告系列中移除自动创建的素材资源。google-ads-pp-cli customers search-audience-insights-attributes— 搜索可用于生成洞察的受众属性。google-ads-pp-cli customers start-identity-verification— 针对给定的验证计划类型启动身份验证。返回状态。google-ads-pp-cli customers suggest-brands— RPC:根据前缀返回此客户的匹配品牌列表。google-ads-pp-cli customers suggest-keyword-themes— 建议可用于广告投放的关键字主题。google-ads-pp-cli customers suggest-smart-campaign-ad— 根据定位等数据点,建议与广告资源系列兼容的智能广告系列广告……google-ads-pp-cli customers suggest-smart-campaign-budget-options— 返回预算选项建议。google-ads-pp-cli customers suggest-travel-assets— 返回旅游素材资源建议。素材资源建议尽力提供,但不作任何保证……google-ads-pp-cli customers upload-call-conversions— 处理给定的通话转化。google-ads-pp-cli customers upload-click-conversions— 处理给定的点击转化。google-ads-pp-cli customers upload-conversion-adjustments— 处理给定的转化调整。google-ads-pp-cli customers upload-user-data— 上传给定的用户数据。
customers_account_budget_proposals — Google Ads 客户账户预算提案操作
google-ads-pp-cli customers-account-budget-proposals <customerId>— 创建、更新或移除账户预算提案。返回操作状态。
customers_account_links — Google Ads 客户账户关联操作
google-ads-pp-cli customers-account-links create— 创建账户关联。google-ads-pp-cli customers-account-links mutate— 创建或移除账户关联。从 V5 开始,不支持通过 AccountLinkService.MutateAccountLink... 创建。
customers_ad_group_ad_labels — Google Ads 客户广告组广告标签操作
google-ads-pp-cli customers-ad-group-ad-labels <customerId>— 创建和移除广告组广告标签。返回操作状态。
customers_ad_group_ads — Google Ads 客户广告组广告操作
google-ads-pp-cli customers-ad-group-ads mutate— 创建、更新或移除广告。返回操作状态。google-ads-pp-cli customers-ad-group-ads remove-automatically-created-assets— 从广告中移除自动创建的素材资源。
customers_ad_group_asset_sets — Google Ads 客户广告组素材资源集操作
google-ads-pp-cli customers-ad-group-asset-sets <customerId>— 创建或移除广告组素材资源集。返回操作状态。
customers_ad_group_assets — Google Ads 客户广告组素材资源操作
google-ads-pp-cli customers-ad-group-assets <customerId>— 创建、更新或移除广告组素材资源。返回操作状态。
customers_ad_group_bid_modifiers — Google Ads 客户广告组出价调整系数操作
google-ads-pp-cli customers-ad-group-bid-modifiers <customerId>— 创建、更新或移除广告组出价调整系数。返回操作状态。
customers_ad_group_criteria — Google Ads 客户广告组条件操作
google-ads-pp-cli customers-ad-group-criteria <customerId>— 创建、更新或移除条件。返回操作状态。
customers_ad_group_criterion_customizers — Google Ads 客户广告组条件自定义项操作
google-ads-pp-cli customers-ad-group-criterion-customizers <customerId>— 创建、更新或移除广告组条件自定义项。返回操作状态。
customers_ad_group_criterion_labels — Google Ads 客户广告组条件标签操作
google-ads-pp-cli customers-ad-group-criterion-labels <customerId>— 创建和移除广告组条件标签。返回操作状态。
customers_ad_group_customizers — Google Ads 客户广告组自定义项操作
google-ads-pp-cli customers-ad-group-customizers <customerId>— 创建、更新或移除广告组自定义项。返回操作状态。
customers_ad_group_labels — Google Ads 客户广告组标签操作
google-ads-pp-cli customers-ad-group-labels <customerId>— 创建和移除广告组标签。返回操作状态。
customers_ad_groups — Google Ads 客户广告组操作
google-ads-pp-cli customers-ad-groups <customerId>— 创建、更新或移除广告组。返回操作状态。
customers_ad_parameters — Google Ads 客户广告参数操作
google-ads-pp-cli customers-ad-parameters <customerId>— 创建、更新或移除广告参数。返回操作状态。
customers_ads — Google Ads 客户广告操作
google-ads-pp-cli customers-ads <customerId>— 更新广告。返回操作状态。不支持更新 TextAd、ExpandedDynamicSearchAd,...
customers_asset_generations — Google Ads 客户素材资源生成操作
-
google-ads-pp-cli customers-asset-generations generate-images— 使用生成式 AI 生成可用作广告系列素材资源的图片。 -
google-ads-pp-cli customers-asset-generations generate-text— 使用生成式 AI 生成可用作广告系列素材资源的文本。 customers_asset_group_assets — Google Ads 客户资产组资产操作 -
google-ads-pp-cli customers-asset-group-assets <customerId>— 创建、更新或移除资产组资产。返回操作状态。
customers_asset_group_listing_group_filters — Google Ads 客户资产组商品目录组筛选条件操作
google-ads-pp-cli customers-asset-group-listing-group-filters <customerId>— 创建、更新或移除资产组商品目录组筛选条件。返回操作状态。
customers_asset_group_signals — Google Ads 客户资产组信号操作
google-ads-pp-cli customers-asset-group-signals <customerId>— 创建或移除资产组信号。返回操作状态。
customers_asset_groups — Google Ads 客户资产组操作
google-ads-pp-cli customers-asset-groups <customerId>— 创建、更新或移除资产组。返回操作状态。
customers_asset_set_assets — Google Ads 客户资产集资产操作
google-ads-pp-cli customers-asset-set-assets <customerId>— 创建、更新或移除资产集资产。返回操作状态。
customers_asset_sets — Google Ads 客户资产集操作
google-ads-pp-cli customers-asset-sets <customerId>— 创建、更新或移除资产集。返回操作状态。
customers_assets — Google Ads 客户资产操作
google-ads-pp-cli customers-assets <customerId>— 创建资产。返回操作状态。
customers_audiences — Google Ads 客户受众群体操作
google-ads-pp-cli customers-audiences <customerId>— 创建受众群体。返回操作状态。
customers_batch_jobs — Google Ads 客户批量作业操作
google-ads-pp-cli customers-batch-jobs add-operations— 向批量作业添加操作。google-ads-pp-cli customers-batch-jobs list-results— 返回批量作业的结果。作业必须已完成。支持标准列表分页。google-ads-pp-cli customers-batch-jobs mutate— 修改批量作业。google-ads-pp-cli customers-batch-jobs run— 运行批量作业。Operation.metadata 字段类型为 BatchJobMetadata。完成后,长时间运行的操作...
customers_bidding_data_exclusions — Google Ads 客户出价数据排除项操作
google-ads-pp-cli customers-bidding-data-exclusions <customerId>— 创建、更新或移除数据排除项。返回操作状态。
customers_bidding_seasonality_adjustments — Google Ads 客户出价季节性调整操作
google-ads-pp-cli customers-bidding-seasonality-adjustments <customerId>— 创建、更新或移除季节性调整。返回操作状态。
customers_bidding_strategies — Google Ads 客户出价策略操作
google-ads-pp-cli customers-bidding-strategies <customerId>— 创建、更新或移除出价策略。返回操作状态。
customers_billing_setups — Google Ads 客户账单设置操作
google-ads-pp-cli customers-billing-setups <customerId>— 创建账单设置,或取消现有账单设置。
customers_campaign_asset_sets — Google Ads 客户广告系列资产集操作
google-ads-pp-cli customers-campaign-asset-sets <customerId>— 创建、更新或移除广告系列资产集。返回操作状态。
customers_campaign_assets — Google Ads 客户广告系列资产操作
google-ads-pp-cli customers-campaign-assets <customerId>— 创建、更新或移除广告系列资产。返回操作状态。
customers_campaign_bid_modifiers — Google Ads 客户广告系列出价调整系数操作
-
google-ads-pp-cli customers-campaign-bid-modifiers <customerId>— 创建、更新或移除广告系列出价调整系数。返回操作状态。 customers_campaign_budgets — Google Ads 客户广告系列预算操作 -
google-ads-pp-cli customers-campaign-budgets <customerId>— 创建、更新或移除广告系列预算。返回操作状态。
customers_campaign_conversion_goals — Google Ads 客户广告系列转化目标操作
google-ads-pp-cli customers-campaign-conversion-goals <customerId>— 创建、更新或移除广告系列转化目标。返回操作状态。
customers_campaign_criteria — Google Ads 客户广告系列条件操作
google-ads-pp-cli customers-campaign-criteria <customerId>— 创建、更新或移除条件。返回操作状态。
customers_campaign_customizers — Google Ads 客户广告系列自定义项操作
google-ads-pp-cli customers-campaign-customizers <customerId>— 创建、更新或移除广告系列自定义项。返回操作状态。
customers_campaign_drafts — Google Ads 客户广告系列草稿操作
google-ads-pp-cli customers-campaign-drafts list-async-errors— 返回 CampaignDraft 提升过程中发生的所有错误。如果在广告系列草稿尚未……时调用,则会抛出错误。google-ads-pp-cli customers-campaign-drafts mutate— 创建、更新或移除广告系列草稿。返回操作状态。google-ads-pp-cli customers-campaign-drafts promote— 将草稿中的更改应用回基础广告系列。此方法会返回一个长时间运行操作(LRO)……
customers_campaign_goal_configs — Google Ads 客户广告系列目标配置操作
google-ads-pp-cli customers-campaign-goal-configs <customerId>— 创建或更新广告系列目标配置。
customers_campaign_groups — Google Ads 客户广告系列组操作
google-ads-pp-cli customers-campaign-groups <customerId>— 创建、更新或移除广告系列组。返回操作状态。
customers_campaign_labels — Google Ads 客户广告系列标签操作
google-ads-pp-cli customers-campaign-labels <customerId>— 创建和移除广告系列与标签之间的关联。返回操作状态。
customers_campaign_lifecycle_goal — Google Ads 客户广告系列生命周期目标操作
google-ads-pp-cli customers-campaign-lifecycle-goal <customerId>— 处理给定的广告系列生命周期配置。
customers_campaign_shared_sets — Google Ads 客户广告系列共享集操作
google-ads-pp-cli customers-campaign-shared-sets <customerId>— 创建或移除广告系列共享集。返回操作状态。
customers_campaigns — Google Ads 客户广告系列操作
google-ads-pp-cli customers-campaigns enable-pmax-brand-guidelines— 为 Performance Max 广告系列启用品牌指南。google-ads-pp-cli customers-campaigns mutate— 创建、更新或移除广告系列。返回操作状态。
customers_conversion_actions — Google Ads 客户转化操作操作
google-ads-pp-cli customers-conversion-actions <customerId>— 创建、更新或移除转化操作。返回操作状态。
customers_conversion_custom_variables — Google Ads 客户转化自定义变量操作
google-ads-pp-cli customers-conversion-custom-variables <customerId>— 创建或更新转化自定义变量。返回操作状态。
customers_conversion_goal_campaign_configs — Google Ads 客户转化目标广告系列配置操作
google-ads-pp-cli customers-conversion-goal-campaign-configs <customerId>— 创建、更新或移除转化目标广告系列配置。返回操作状态。
customers_conversion_value_rule_sets — Google Ads 客户转化价值规则集操作
google-ads-pp-cli customers-conversion-value-rule-sets <customerId>— 创建、更新或移除转化价值规则集。返回操作状态。
customers_conversion_value_rules — Google Ads 客户转化价值规则操作
google-ads-pp-cli customers-conversion-value-rules <customerId>— 创建、更新或移除转化价值规则。返回操作状态。
customers_custom_audiences — Google Ads 客户自定义受众操作
google-ads-pp-cli customers-custom-audiences <customerId>— 创建或更新自定义受众。返回操作状态。
customers_custom_conversion_goals — Google Ads 客户自定义转化目标操作
google-ads-pp-cli customers-custom-conversion-goals <customerId>— 创建、更新或移除自定义转化目标。返回操作状态。
customers_custom_interests — Google Ads 客户自定义兴趣操作
google-ads-pp-cli customers-custom-interests <customerId>— 创建或更新自定义兴趣。返回操作状态。
customers_customer_asset_sets — Google Ads 客户客户资源集操作
google-ads-pp-cli customers-customer-asset-sets <customerId>— 创建或移除客户资源集。返回操作状态。
customers_customer_assets — Google Ads 客户客户资源操作
google-ads-pp-cli customers-customer-assets <customerId>— 创建、更新或移除客户资源。返回操作状态。
customers_customer_client_links — Google Ads 客户客户客户端链接操作
google-ads-pp-cli customers-customer-client-links <customerId>— 创建或更新客户客户端链接。返回操作状态。
customers_customer_conversion_goals — Google Ads 客户客户转化目标操作
google-ads-pp-cli customers-customer-conversion-goals <customerId>— 创建、更新或移除客户转化目标。返回操作状态。
customers_customer_customizers — Google Ads 客户客户自定义参数操作
google-ads-pp-cli customers-customer-customizers <customerId>— 创建、更新或移除客户自定义参数。返回操作状态。
customers_customer_labels — Google Ads 客户客户标签操作
google-ads-pp-cli customers-customer-labels <customerId>— 创建和移除客户与标签之间的关联。返回操作状态。
customers_customer_lifecycle_goal — Google Ads 客户客户生命周期目标操作
google-ads-pp-cli customers-customer-lifecycle-goal <customerId>— 处理指定的客户生命周期配置。
customers_customer_manager_links — Google Ads 客户客户经理链接操作
google-ads-pp-cli customers-customer-manager-links move-manager-link— 将客户账户转移至新的经理账户。此操作简化了需要两个操作的复杂请求……google-ads-pp-cli customers-customer-manager-links mutate— 更新客户经理链接。返回操作状态。
customers_customer_negative_criteria — Google Ads 客户客户否定条件操作
google-ads-pp-cli customers-customer-negative-criteria <customerId>— 创建或移除条件。返回操作状态。
customers_customer_sk_ad_network_conversion_value_schemas — Google Ads 客户客户 SK Ad Network 转化价值架构操作
google-ads-pp-cli customers-customer-sk-ad-network-conversion-value-schemas <customerId>— 创建或更新 CustomerSkAdNetworkConversionValueSchema。
customers_customer_user_access_invitations — Google Ads 客户客户用户访问邀请操作
-
google-ads-pp-cli customers-customer-user-access-invitations <customerId>— 创建或移除访问邀请。 customers_customer_user_accesses — Google Ads 客户用户访问权限操作 -
google-ads-pp-cli customers-customer-user-accesses <customerId>— 更新或移除用户对指定客户的权限。将返回操作状态。
customers_customizer_attributes — Google Ads 客户自定义属性操作
google-ads-pp-cli customers-customizer-attributes <customerId>— 创建、更新或移除自定义属性。将返回操作状态。
customers_data_links — Google Ads 客户数据链接操作
google-ads-pp-cli customers-data-links create— 创建数据链接。请求的 Google Ads 账号名称和账号 ID 将与第三方共享(例如……google-ads-pp-cli customers-data-links remove— 移除数据链接。google-ads-pp-cli customers-data-links update— 更新数据链接。
customers_experiment_arms — Google Ads 客户实验组操作
google-ads-pp-cli customers-experiment-arms <customerId>— 创建、更新或移除实验组。将返回操作状态。
customers_experiments — Google Ads 客户实验操作
google-ads-pp-cli customers-experiments end-experiment— 立即结束实验,修改实验的预定结束日期,无需等到当天结束。结束……google-ads-pp-cli customers-experiments graduate-experiment— 将实验升级为正式广告系列。google-ads-pp-cli customers-experiments list-experiment-async-errors— 返回上次实验更新(安排或推广)期间发生的所有错误。支持……google-ads-pp-cli customers-experiments mutate— 创建、更新或移除实验。将返回操作状态。google-ads-pp-cli customers-experiments promote-experiment— 推广试验广告系列,将其中的更改应用到基础广告系列。此方法会返回……google-ads-pp-cli customers-experiments schedule-experiment— 安排实验。设计中的广告系列将转换为正式广告系列(称为实验……
customers_goals — Google Ads 客户目标操作
google-ads-pp-cli customers-goals <customerId>— 创建或更新目标。
customers-google-ads — Google Ads 客户 Google Ads 操作
google-ads-pp-cli customers-google-ads mutate— 创建、更新或移除资源。此方法支持包含多种资源类型的原子事务……google-ads-pp-cli customers-google-ads search— 返回所有符合搜索查询条件的行。google-ads-pp-cli customers-google-ads search-stream— 返回所有符合搜索流查询条件的行。
customers_invoices — Google Ads 客户发票操作
google-ads-pp-cli customers-invoices <customerId>— 返回指定月份与某个账单设置关联的所有发票。
customers_keyword_plan_ad_group_keywords — Google Ads 客户关键字规划广告组关键字操作
google-ads-pp-cli customers-keyword-plan-ad-group-keywords <customerId>— 创建、更新或移除关键字规划广告组关键字。将返回操作状态。
customers_keyword_plan_ad_groups — Google Ads 客户关键字规划广告组操作
google-ads-pp-cli customers-keyword-plan-ad-groups <customerId>— 创建、更新或移除关键字规划广告组。将返回操作状态。
customers_keyword_plan_campaign_keywords — Google Ads 客户关键字规划广告系列关键字操作
google-ads-pp-cli customers-keyword-plan-campaign-keywords <customerId>— 创建、更新或移除关键字规划广告系列关键字。将返回操作状态。
customers_keyword_plan_campaigns — Google Ads 客户关键字规划广告系列操作
google-ads-pp-cli customers-keyword-plan-campaigns <customerId>— 创建、更新或移除关键词规划系列。返回操作状态。
customers_keyword_plans — Google Ads 客户关键词规划操作
google-ads-pp-cli customers-keyword-plans <customerId>— 创建、更新或移除关键词规划。返回操作状态。
customers_labels — Google Ads 客户标签操作
google-ads-pp-cli customers-labels <customerId>— 创建、更新或移除标签。返回操作状态。
customers_local_services — Google Ads 客户本地服务操作
google-ads-pp-cli customers-local-services <customerId>— RPC,用于将本地服务潜在客户对话资源追加到本地服务潜在客户资源。
customers_local_services_leads — Google Ads 客户本地服务潜在客户操作
google-ads-pp-cli customers-local-services-leads <resourceName>— RPC,用于针对本地服务潜在客户资源提供反馈。
customers_offline_user_data_jobs — Google Ads 客户离线用户数据作业操作
google-ads-pp-cli customers-offline-user-data-jobs add-operations— 向离线用户数据作业添加操作。google-ads-pp-cli customers-offline-user-data-jobs create— 创建离线用户数据作业。google-ads-pp-cli customers-offline-user-data-jobs run— 运行离线用户数据作业。作业完成后,长时间运行的操作将包含处理结果或...
customers_operations — Google Ads 客户操作
google-ads-pp-cli customers-operations cancel— 开始异步取消长时间运行的操作。服务会尽力取消该操作...google-ads-pp-cli customers-operations delete— 删除长时间运行的操作。此方法表示客户端不再关注该操作...google-ads-pp-cli customers-operations get— 获取长时间运行的操作的最新状态。客户端可以使用此方法轮询操作结果...google-ads-pp-cli customers-operations list— 列出与请求中指定过滤条件相匹配的操作。如果服务不支持此方法,则...google-ads-pp-cli customers-operations wait— 等待指定的长时间运行操作完成,或等待至达到指定的最长超时时间,并返回...
customers_payments_accounts — Google Ads 客户付款账号操作
google-ads-pp-cli customers-payments-accounts <customerId>— 返回登录客户 ID 与指定的服务客户之间所有经理关联的付款账号...
customers_product_link_invitations — Google Ads 客户产品关联邀请操作
google-ads-pp-cli customers-product-link-invitations create— 创建产品关联邀请。google-ads-pp-cli customers-product-link-invitations remove— 移除产品关联邀请。google-ads-pp-cli customers-product-link-invitations update— 更新产品关联邀请。
customers_product_links — Google Ads 客户产品关联操作
google-ads-pp-cli customers-product-links create— 创建产品关联。google-ads-pp-cli customers-product-links remove— 移除产品关联。
customers_recommendation_subscriptions — Google Ads 客户建议订阅操作
google-ads-pp-cli customers-recommendation-subscriptions <customerId>— 使用相应的应用参数修改指定订阅。
customers_recommendations — Google Ads 客户建议操作
-
google-ads-pp-cli customers-recommendations apply— 使用相应的应用参数应用指定的建议。 -
google-ads-pp-cli customers-recommendations dismiss— 忽略指定的建议。 -
google-ads-pp-cli customers-recommendations generate— 根据请求的 recommendation_types 生成建议。 customers_remarketing_actions — Google Ads 客户再营销操作 -
google-ads-pp-cli customers-remarketing-actions <customerId>— 创建或更新再营销操作。返回操作状态。
customers_shared_criteria — Google Ads 客户共享条件操作
google-ads-pp-cli customers-shared-criteria <customerId>— 创建或移除共享条件。返回操作状态。
customers_shared_sets — Google Ads 客户共享集合操作
google-ads-pp-cli customers-shared-sets <customerId>— 创建、更新或移除共享集合。返回操作状态。
customers_smart_campaign_settings — Google Ads 客户 Smart 广告系列设置操作
google-ads-pp-cli customers-smart-campaign-settings get-smart-campaign-status— 返回所请求的 Smart 广告系列状态。google-ads-pp-cli customers-smart-campaign-settings mutate— 更新广告系列的 Smart 广告系列设置。
customers_third_party_app_analytics_links — Google Ads 客户第三方应用分析链接操作
google-ads-pp-cli customers-third-party-app-analytics-links <resourceName>— 重新生成 ThirdPartyAppAnalyticsLink.shareable_link_id,设置时应将其提供给第三方……
customers_user_list_customer_types — Google Ads 客户用户列表客户类型操作
google-ads-pp-cli customers-user-list-customer-types <customerId>— 添加或移除用户列表客户类型。返回操作状态。
customers_user_lists — Google Ads 客户用户列表操作
google-ads-pp-cli customers-user-lists <customerId>— 创建或更新用户列表。返回操作状态。
geo_target_constants — Google Ads 地理位置目标常量操作
google-ads-pp-cli geo-target-constants— 按位置名称或资源名称返回 GeoTargetConstant 建议。
google_ads — Google Ads 操作
google-ads-pp-cli google-ads generate-conversion-rates— 为受支持的可规划产品返回转化率建议集合。google-ads-pp-cli google-ads list-plannable-locations— 返回可规划位置列表(例如国家/地区)。google-ads-pp-cli google-ads list-plannable-products— 返回各位置可规划的 YouTube 广告格式列表及其允许的定位方式。google-ads-pp-cli google-ads list-plannable-user-interests— 返回可规划的用户兴趣列表。可规划的用户兴趣是指可以用于覆盖范围定位的用户兴趣……google-ads-pp-cli google-ads list-plannable-user-lists— 返回可规划用户列表及其可规划状态。用户列表可能无法用于某些……
google_ads_fields — Google Ads 字段操作
google-ads-pp-cli google-ads-fields get— 仅返回请求的字段。google-ads-pp-cli google-ads-fields search— 返回符合搜索查询的所有字段。
keyword_theme_constants — Google Ads 关键字主题常量操作
google-ads-pp-cli keyword-theme-constants— 按关键字主题返回 KeywordThemeConstant 建议。
查找合适的命令
知道要做什么,但不知道该用哪个命令时,可以直接向 CLI 提问:
google-ads-pp-cli which "<capability in your own words>"
which 会根据自然语言能力查询,从此 CLI 精选的功能索引中匹配最合适的命令。退出代码 0 表示至少找到一个匹配项;退出代码 2 表示没有可信的匹配项,此时可改用 --help 或使用范围更窄的查询。
身份验证设置
通过 OAuth2 流程进行身份验证。auth login 会打开浏览器,运行授权流程,并存储刷新令牌,以便自动生成访问令牌:
google-ads-pp-cli auth login --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET
如果设置了 $GOOGLE_ADS_CLIENT_ID / $GOOGLE_ADS_CLIENT_SECRET,--client-id / --client-secret 默认使用它们。使用 google-ads-pp-cli auth status 检查已存储的授权,或使用 google-ads-pp-cli auth logout 清除授权。
另请设置 GOOGLE_ADS_DEVELOPER_TOKEN;通过管理账户调用时,需设置 GOOGLE_ADS_LOGIN_CUSTOMER_ID。
运行 google-ads-pp-cli doctor 验证设置。
Agent 模式
在任意命令中添加 --agent。它会展开为:--json --compact --no-input --no-color --yes。
-
可管道传输 — JSON 输出到 stdout,错误输出到 stderr
-
可筛选 —
--select保留字段子集。点分路径可深入嵌套结构;数组会逐元素遍历。对于冗长 API,这对控制上下文大小至关重要:google-ads-pp-cli customers-google-ads search mock-value --agent --select id,name,status -
可预览 —
--dry-run显示请求,但不发送 -
适合离线使用 — 有本地 SQLite 存储时,sync/search 命令可以使用该存储
-
非交互式 — 从不提示,每项输入都通过标志提供
-
显式重试 — 仅当已存在的创建结果应视为成功时才使用
--idempotent;仅当缺失的删除目标应视为成功时才使用--ignore-missing
响应封装
从本地存储或 API 读取数据的命令会将输出封装在来源信息中:
{
"meta": {"source": "live" | "local", "synced_at": "...", "reason": "..."},
"results": <data>
}
解析 .results 获取数据,并查看 .meta.source 判断数据来自实时来源还是本地存储。只有当 stdout 是终端时,才会向 stderr 输出人类可读的 N results (live) 摘要;通过管道接收输出的程序或 Agent 会在 stdout 上获得纯 JSON。
Agent 反馈
当你(或 Agent)发现此 CLI 有不妥之处时,请记录下来:
google-ads-pp-cli feedback "the --since flag is inclusive but docs say exclusive"
google-ads-pp-cli feedback --stdin < notes.txt
google-ads-pp-cli feedback list --json --limit 10
条目会本地存储在 ~/.google-ads-pp-cli/feedback.jsonl。除非设置了 GOOGLE_ADS_FEEDBACK_ENDPOINT,且传入了 --send 或设置了 GOOGLE_ADS_FEEDBACK_AUTO_SEND=true,否则不会通过 POST 发送。默认行为仅在本地存储。
写下让你感到意外的地方,而不是提交错误报告。简短、具体,写成一行:这些细节会不断累积。
输出交付
每条命令都接受 --deliver <sink>。输出会发送到指定目标,同时输出到 stdout,或替代 stdout 输出,这样 Agent 无需手动通过管道传递即可路由命令结果。支持三种目标:
| 目标 | 效果 |
|---|---|
stdout | 默认;仅写入 stdout |
file:<path> | 将输出原子性地写入 <path>(临时文件 + 重命名) |
webhook:<url> | 将输出正文 POST 到 URL(使用 --compact 时为 application/json 或 application/x-ndjson) |
遇到未知方案时会拒绝执行,并返回结构化错误,列出支持的方案。Webhook 失败时会返回非零状态,并在 stderr 中记录 URL 和 HTTP 状态码。
命名配置
配置是保存的一组标志值,可在多次调用中重复使用。如果定时运行的 Agent 每次都以相同配置调用同一命令,就可以使用配置——这是 HeyGen 的 “Beacon” 模式。
google-ads-pp-cli profile save briefing --json
google-ads-pp-cli --profile briefing customers-google-ads search mock-value
google-ads-pp-cli profile list --json
google-ads-pp-cli profile show briefing
google-ads-pp-cli profile delete briefing --yes
显式标志的优先级始终高于配置值;配置值的优先级高于默认值。agent-context 会在 available_profiles 下列出所有可用配置,以便进行自省的 Agent 在运行时发现它们。
异步任务
对于会提交长时间运行任务的端点,生成器会检测提交后轮询的模式(响应中包含 job_id / task_id / operation_id 字段,且有对应的状态端点),并为提交命令添加三个额外标志:
| 标志 | 用途 |
|---|---|
--wait | 等待任务达到终止状态,而不是立即返回任务 ID |
--wait-timeout | 最长等待时长(默认 10m,0 表示不设超时) |
--wait-interval | 初始轮询间隔(默认 2s;采用指数退避逐渐延长,最长为 30s) |
如果想提交异步任务后不等待结果,请在不带 --wait 的情况下提交;如果想让一条命令返回已完成的产物,请使用 --wait。
退出代码
| 代码 | 含义 |
|---|---|
| 0 | 成功 |
| 2 | 用法错误(参数错误) |
| 3 | 未找到资源 |
| 4 | 需要身份验证 |
| 5 | API 错误(上游问题) |
| 7 | 请求频率受限(等待后重试) |
| 10 | 配置错误 |
参数解析
解析 $ARGUMENTS:
- 为空、
help或--help→ 显示google-ads-pp-cli --help的输出 - 以
install开头 → 以mcp结尾 → 安装 MCP;否则 → 参见上文的先决条件 - 其他任何内容 → 直接使用(作为 CLI 命令执行,并带上
--agent)
MCP 服务安装
- 安装 MCP 服务:
go install github.com/mvanhorn/printing-press-library/library/marketing/google-ads/cmd/google-ads-pp-mcp@latest - 在 Claude Code 中注册:
claude mcp add google-ads-pp-mcp -- google-ads-pp-mcp - 验证:
claude mcp list
直接使用
- 检查是否已安装:
which google-ads-pp-cli如果未找到,请提供安装选项(参见此技能开头的先决条件)。 - 将用户查询与上文“独特功能”和“命令参考”中的最佳命令相匹配。
- 使用
--agent标志执行:google-ads-pp-cli <command> [subcommand] [args] --agent - 如果存在歧义,请查看子命令帮助:
google-ads-pp-cli <command> --help。