@koda-sl/baker-cli 0.384.0 → 0.386.0-dev.4e118c09a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -157,13 +157,13 @@ Use `--output` to change format:
157
157
 
158
158
  ### Ad Platforms (`baker ads`)
159
159
 
160
- Multi-platform ad commands. Google, Meta, and LinkedIn support both reads and **staged writes** (create/update campaigns, ad sets/ad groups, ads, creatives, audiences — applied on chat publish); X (Twitter) is read + analytics. TikTok is coming.
160
+ Multi-platform ad commands. Google, Meta, and LinkedIn support both reads and **staged writes** (create/update campaigns, ad sets/ad groups, ads, creatives, audiences — applied on chat publish); X (Twitter) is read + analytics; ChatGPT Ads is read + analytics + staged writes. TikTok is coming.
161
161
 
162
162
  ---
163
163
 
164
164
  ### `baker ads google accounts`
165
165
 
166
- List all accessible Google Ads accounts. Run this first to find account IDs.
166
+ List the Google Ads accounts selected for this company. Run this first to find account IDs.
167
167
 
168
168
  ```bash
169
169
  baker ads google accounts
@@ -788,7 +788,7 @@ Read X Ads campaigns, line items, promoted tweets, creatives, audiences, and ana
788
788
 
789
789
  | Subcommand | What it returns |
790
790
  |---|---|
791
- | `accounts` | All accessible X Ads accounts |
791
+ | `accounts` | X Ads accounts selected for this company that X currently lists |
792
792
  | `funding` | Funding instruments for an account |
793
793
  | `campaigns` | Campaigns (filter by `--funding-instrument-ids`, `--campaign-ids`) |
794
794
  | `line-items` | Line items / ad groups (filter by `--campaign-ids`, `--line-item-ids`) |
@@ -863,6 +863,39 @@ baker ads x targeting-constants --constant tv_shows --locale en-US
863
863
 
864
864
  ---
865
865
 
866
+ ### ChatGPT Ads (`baker ads chatgpt`)
867
+
868
+ Read the company's ChatGPT Ads account (OpenAI's ads inside ChatGPT conversations) and how it performs, and stage changes to it that apply when the chat is published. The company connects one account in the dashboard (Brain → Integrations → ChatGPT Ads) with an API key from its Ads Manager; the key stays in Baker and never reaches the CLI, so there is no account id to pass.
869
+
870
+ | Subcommand | What it returns |
871
+ |---|---|
872
+ | `account` | Name, currency, timezone, status, and the brand and account reviews that decide whether anything serves |
873
+ | `campaigns` | Campaigns: objective, daily or lifetime budget (currency units), schedule, locations, platforms, serving issues |
874
+ | `ad-groups` | Ad groups (`--campaign-id`): bid strategy, max bid, context hints, serving issues |
875
+ | `ads` | Ads (`--ad-group-id`): the card's copy, image, destination, review outcome, serving issues |
876
+ | `conversions` | Pixels (with the pixel id a landing page installs) and conversion events, with the campaigns using each |
877
+ | `insights` | Impressions, clicks, spend, CTR, CPC, CPM, conversions, CPA, ROAS — per `--level account\|campaign\|ad_group\|ad`, over `--days N` or `--since/--until`, `--granularity`, `--segment country\|device\|platform\|product` |
878
+ | `campaigns create\|update\|pause\|resume` | Stage a campaign change: objective, daily or lifetime budget (currency units), schedule, countries, platforms, status |
879
+ | `ad-groups create\|update\|pause\|resume` | Stage an ad group change: context hints, bid strategy, max bid, status |
880
+ | `ads create\|update\|pause\|resume` | Stage a chat card: title, body, landing page, image, status |
881
+ | `account update` | Stage the advertiser's brand name or icon (`--favicon-url`) |
882
+ | `draft` | Review the staged changes as a tree; `show`, `amend`, `remove`, `clear`. After a publish, what applied and what failed |
883
+
884
+ `--full` on the list commands returns ChatGPT Ads' own objects. ChatGPT Ads refuses some metric and breakdown combinations (CPA, conversion rate and sales cannot be broken down; conversions come daily or as one total); `insights` refuses them first and says why.
885
+
886
+ Writes need `BAKER_CHAT_ID`: they stage on the chat and reach ChatGPT Ads only when it is published. New entities are created paused unless `--status active`.
887
+
888
+ ```bash
889
+ baker ads chatgpt account
890
+ baker ads chatgpt insights --days 30 --granularity daily --level account
891
+ baker ads chatgpt insights --campaign-id cmpn_123 --level ad --sort spend
892
+ baker ads chatgpt campaigns create --name "Spring push" --objective clicks --daily-budget 20 --countries ES
893
+ baker ads chatgpt ad-groups create --campaign-id chatgpt_temp_ab12 --name "Rooftop owners" --context-hints "solar panels for my house" --max-bid 2.50
894
+ baker ads chatgpt draft
895
+ ```
896
+
897
+ ---
898
+
866
899
  ### Meta Ads (`baker ads meta`)
867
900
 
868
901
  Meta Marketing API (Facebook + Instagram). Connect via OAuth in the dashboard, pick which ad accounts to scope to, then call from the CLI. Account ID via `--account-id act_123` or `BAKER_META_AD_ACCOUNT_ID` env var.
@@ -892,7 +925,7 @@ baker ads meta insights --object act_123 --level adset \
892
925
  baker ads meta activities --account-id act_123 --days 7
893
926
 
894
927
  # "Which Page should this ad run from?"
895
- baker ads meta pages # Facebook Pages the user manages (tasks shows which can ADVERTISE)
928
+ baker ads meta pages # Pages with promotingAccountIds and hasPageAccessToken
896
929
 
897
930
  # "What is the lead form collecting, and how many came in?"
898
931
  baker ads meta lead-forms --page-id 100635183117758 # instant forms on a Page + lead counts
@@ -930,6 +963,8 @@ baker ads meta custom-conversions --account-id act_123 # id, event cate
930
963
  baker ads meta custom-conversions --account-id act_123 --full # raw rule JSON, retention, timestamps
931
964
  ```
932
965
 
966
+ Use a Page only with an ad account listed in its `promotingAccountIds`. Instant-form reads need `hasPageAccessToken: true` on that Page and the company's lead-ads permissions.
967
+
933
968
  **Custom Conversions** — a marketer's own conversion (a pixel event narrowed by a rule, e.g. "PageView on /gracias"), which is what "my conversions" almost always means. To optimize an ad set toward one, pass `--custom-conversion-id <id>` and nothing else: Baker reads the conversion off Meta at stage time and fills its pixel, event category and rule, the same four fields Ads Manager stores. Staging refuses an archived or unavailable conversion, one not built on a pixel, and one belonging to another ad account. Deleting one — in Events Manager or over the API — archives it: it leaves the panel but stays readable on the account, so the listing still shows it flagged `archived`.
934
969
 
935
970
  `custom-conversions create` stages a new one (`--name`, `--pixel-id`, `--custom-event-type`, plus `--url-contains "/gracias"` or `--rule-file`). A rule is a tree of `and`/`or` over `{"<field>":{"<operator>":<value>}}` leaves, where the field is `URL`, `event`, `referrer` or any event parameter the pixel sends (`value`, `content_category`, or your own), so `--url-contains` is only the single-URL shortcut and `--rule-file` reaches the rest. Meta accepts an unmatchable rule and reports success, so staging refuses unknown operators, bare values, empty branches and two conditions written side by side where `and` was meant, before the op is staged. A case-sensitive `contains` is a real operator and gets through — on a URL always write `i_contains`. It is create-only, because Meta's edge offers neither update nor a delete that removes — which is also why staging refuses a create whose pixel, event category and rule already exist, live on the account or staged earlier in the same chat, or one that would pass Meta's cap of 100 per account. An ad set in the same chat can chain to it with `--custom-conversion-id meta_temp_*`.
@@ -952,6 +987,11 @@ Chain a full ad from scratch with `meta_temp_*` refs (each create returns one):
952
987
  # 1. (optional) upload creative media from the Baker library → publishes an image hash
953
988
  baker ads meta media upload --account-id act_123 --kind image --image-id <bakerImageId> # → meta_temp_img
954
989
 
990
+ # For on-ad leads, choose a Page with this account in promotingAccountIds and hasPageAccessToken: true
991
+ baker ads meta lead-forms create --account-id act_123 --page-id 555 --name "Free audit" \
992
+ --questions FULL_NAME,EMAIL,PHONE --privacy-policy-url https://example.com/privacy \
993
+ --follow-up-url https://example.com # → meta_temp_form
994
+
955
995
  # 2. campaign → ad set → creative → ad
956
996
  baker ads meta campaigns create --account-id act_123 --name "Q3 Prospecting" --objective OUTCOME_LEADS --daily-budget 50 # → meta_temp_camp
957
997
  baker ads meta adsets create --account-id act_123 --campaign meta_temp_camp --name "US 25-54" \
@@ -997,9 +1037,8 @@ To find one entity by name, pass `--name-contains <text>` to `campaigns`, `adset
997
1037
 
998
1038
  ```
999
1039
  accounts # ad accounts in the connected scope
1000
- accounts --include-all # every account the token can see (admin/debug)
1001
1040
  account # single-account detail (currency, balance, business, status)
1002
- businesses # /me/businesses
1041
+ businesses # businesses linked to selected ad accounts
1003
1042
  campaigns # ACTIVE-only by default
1004
1043
  adsets # filter by --campaign-id
1005
1044
  ads # filter by --adset-id or --campaign-id
@@ -1125,7 +1164,6 @@ baker ads linkedin bid-pricing --account-id 503001492 \
1125
1164
 
1126
1165
  ```
1127
1166
  accounts # accounts in the connected picker scope
1128
- accounts --include-all # every account the token can see
1129
1167
  account # single-account detail (currency, type, status)
1130
1168
 
1131
1169
  campaign-groups # default ACTIVE-only
@@ -1497,7 +1535,7 @@ A Google Analytics connection made before writes shipped is read-only and every
1497
1535
 
1498
1536
  ### `baker ga4 properties`
1499
1537
 
1500
- List accessible GA4 properties. Run this first to find property IDs.
1538
+ List the GA4 properties selected for this company. Run this first to find property IDs.
1501
1539
 
1502
1540
  ```bash
1503
1541
  baker ga4 properties
@@ -3751,6 +3789,10 @@ baker schema tag-manager read # Kebab-case paths resolve to their registered n
3751
3789
 
3752
3790
  Not every command registers a schema. On `NOT_FOUND` the error carries a structured `fix` pointing at `--help` and the family's agent doc (`__tooling__/docs/tools/baker/<family>.md` in sandboxes). Every top-level family's `--help` also ends with a `Full guide:` line pointing at that doc; `packages/cli/__tests__/doc-coverage.test.ts` fails CI if a mounted command is missing from its family doc.
3753
3791
 
3792
+ ### `baker tag-manager containers`
3793
+
3794
+ Lists the company's selected Tag Manager containers that the connected Google account can still open. If access to a selected container was lost, the response names it in `unavailableContainers` and asks the user to reconnect with an account that can open it.
3795
+
3754
3796
  ## `baker studio` — make new imagery
3755
3797
 
3756
3798
  The generation lane. `baker images` **sources** what already exists; `baker studio` **makes** what doesn't. Every call opens a *batch* — one brief, 1-8 takes, rendered in parallel — recorded against the calling chat and shown in the dashboard Studio next to the batches the client ran themselves.
@@ -20,9 +20,9 @@ import {
20
20
  shouldEscalate
21
21
  } from "./chunk-HJEMOSPH.js";
22
22
 
23
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js
23
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js
24
24
  var require_safe_stable_stringify = __commonJS({
25
- "../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"(exports, module) {
25
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js"(exports, module) {
26
26
  "use strict";
27
27
  var { hasOwnProperty } = Object.prototype;
28
28
  var stringify = configure2();
@@ -1123,7 +1123,7 @@ function resolveAdaptFormats(params) {
1123
1123
  return params.formats ?? [];
1124
1124
  }
1125
1125
 
1126
- // ../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/esm/wrapper.js
1126
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/esm/wrapper.js
1127
1127
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1128
1128
  var configure = import__.default.configure;
1129
1129
  var wrapper_default = import__.default;
@@ -9986,4 +9986,4 @@ export {
9986
9986
  defaultRegistry,
9987
9987
  createEngineFromEnv
9988
9988
  };
9989
- //# sourceMappingURL=chunk-FGHMWBUD.js.map
9989
+ //# sourceMappingURL=chunk-JHKW6IDX.js.map