@koda-sl/baker-cli 0.118.0 → 0.119.0
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 +38 -5
- package/dist/cli.js +560 -43
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -687,18 +687,39 @@ baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgr
|
|
|
687
687
|
--headlines "Come back and save" --long-headline "Finish signing up and get 20% off" \
|
|
688
688
|
--descriptions "Fast setup, no card required" --business-name "Acme" --final-url https://example.com \
|
|
689
689
|
--marketing-images g_temp_<img_landscape> --square-marketing-images g_temp_<img_square> --logo-images g_temp_<img_logo>
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
# Video ad — the YouTube video is its own asset first, then referenced by --video-assets
|
|
691
|
+
baker ads google assets create --customer-id 1234567890 --file '{"type":"youtubeVideo","youtubeVideoId":"dQw4w9WgXcQ"}'
|
|
692
|
+
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> --format video \
|
|
693
|
+
--video-assets g_temp_<video> --final-url https://example.com
|
|
694
|
+
# Demand Gen ad — image refs the same way
|
|
695
|
+
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> --format demandGen \
|
|
696
|
+
--headlines "Discover the app" --descriptions "Try it free today" --business-name "Acme" --final-url https://example.com \
|
|
697
|
+
--image-assets g_temp_<img> --square-image-assets g_temp_<img_square> --logo-image-assets g_temp_<img_logo>
|
|
698
|
+
# Update a staged/live asset in place (flat partial — set only what changed)
|
|
699
|
+
baker ads google assets update <assetId> --customer-id 1234567890 --link-text "New sitelink text" --final-urls https://example.com/new
|
|
700
|
+
|
|
701
|
+
# Performance Max — PMax has no ad format of its own; its copy/images stage as an asset group
|
|
702
|
+
baker ads google campaigns create --customer-id 1234567890 --name "PMax — Full Funnel" --channel-type PERFORMANCE_MAX --budget-ref g_temp_<budget>
|
|
703
|
+
baker ads google asset-groups create --customer-id 1234567890 --campaign-ref g_temp_<campaign> --name "Core" \
|
|
704
|
+
--headlines "Fast Widgets,Buy Online,Free Shipping" --long-headlines "The widget everyone is talking about" \
|
|
705
|
+
--descriptions "Best widgets around.,Ships tomorrow." --business-name "Acme" --final-urls https://example.com
|
|
706
|
+
baker ads google asset-groups update g_temp_<assetgroup> --status ENABLED
|
|
707
|
+
|
|
708
|
+
# Review / undo / amend staged changes
|
|
692
709
|
baker ads google draft list # readable campaign ▸ ad group ▸ ad tree + completeness advisories
|
|
693
710
|
baker ads google draft list --json # raw JSON envelope for scripting
|
|
711
|
+
baker ads google draft show g_temp_ab12 # full staged payload — the receipt before publish
|
|
712
|
+
baker ads google draft amend g_temp_ab12 --patch '{"amountMicros": 60000000}' # update in place, never remove+recreate
|
|
694
713
|
baker ads google draft remove g_temp_ab12 # cascades to dependents
|
|
695
714
|
baker ads google draft clear
|
|
696
715
|
```
|
|
697
716
|
|
|
698
|
-
Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets
|
|
717
|
+
Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets` (create/update/attach/detach), `asset-groups` (create/update — Performance Max), `audiences`, `conversions`, `bidding-strategies`, `labels`, `campaign-criteria`, and `draft`. Amounts are in major currency units (converted to micros). Money/bids: `--amount`, `--cpc-bid`, `--target-cpa` take major units; `--target-roas` a ratio. Less-common ops accept a `--file <payload.json>` (flags override file keys). Updates target a resource name or bare id as the positional argument; a target that names an op staged earlier **amends it in place**.
|
|
699
718
|
|
|
700
719
|
**Reviewing the draft** — `baker ads google draft list` renders everything you've staged as a grouped campaign ▸ ad group ▸ ad tree (with the simulated/live mode banner and non-blocking completeness advisories), the CLI counterpart to the dashboard's Google Ads tab. Pass `--json` for the raw envelope. Aim for a fully built campaign — 2–4 ad groups, ≥5 keywords each, 2–4 RSAs with 8–12 headlines, ≥4 sitelinks / ≥3 callouts / ≥1 structured snippet, and ≥1 shared negative list; the advisories flag what's still thin.
|
|
701
720
|
|
|
721
|
+
**Amending a staged op** — `draft amend <ref> (--file patch.json | --patch '<json>')` merges a JSON patch into an already-staged op's payload (objects deep-merge, `null` deletes a key, arrays/scalars replace) and re-validates it in full. Always prefer this over removing and re-staging — it preserves the op's ref (so dependents don't break) and its position in the draft. `draft show <ref>` prints the full staged payload (including warnings/annotations) so you can verify a change looks right before publish.
|
|
722
|
+
|
|
702
723
|
**Batch keyword adds** — `keywords add`, `negative-keywords add`, and `keyword-lists add` take a whole batch in one command: comma-separate `--text` entries and/or pass `--file <list.txt>` (one keyword per line). A `:EXACT`/`:PHRASE`/`:BROAD` suffix per entry overrides the `--match-type` default. Batches stage all-or-nothing as one request (limit 500); each keyword still lands as its own draft op, so it stays individually removable/amendable.
|
|
703
724
|
|
|
704
725
|
---
|
|
@@ -1024,7 +1045,7 @@ creatives create|update|pause|resume|duplicate
|
|
|
1024
1045
|
audiences create|upload
|
|
1025
1046
|
conversions create|update
|
|
1026
1047
|
lead-forms create|update
|
|
1027
|
-
draft [remove <ref
|
|
1048
|
+
draft [list|remove <ref>|clear|amend <ref>|show <ref>] # review/undo/amend staged write ops
|
|
1028
1049
|
```
|
|
1029
1050
|
|
|
1030
1051
|
#### Staged writes
|
|
@@ -1067,10 +1088,21 @@ baker ads linkedin creatives duplicate 1458413484 --headline "New headline" --re
|
|
|
1067
1088
|
# Amend staged ops in place — `update <li_temp_ref>` merges into the staged create and re-validates
|
|
1068
1089
|
baker ads linkedin creatives update li_temp_x3 --headline "Sharper headline" --image-id <bakerImageId>
|
|
1069
1090
|
baker ads linkedin campaigns update li_temp_x2 --daily-budget 100 --currency EUR
|
|
1091
|
+
# --campaign re-parents a staged creative to a different ad set (rejected once the creative is live)
|
|
1092
|
+
baker ads linkedin creatives update li_temp_x3 --campaign li_temp_x2
|
|
1093
|
+
# campaigns update passes --group/--type/--locale/--associated-entity through when the target is li_temp_*
|
|
1094
|
+
# (they're create-only once live) — so amending a staged campaign can still change its group or type
|
|
1095
|
+
baker ads linkedin campaigns update li_temp_x2 --group li_temp_x1_alt
|
|
1070
1096
|
# A second update to the same real URN also merges into the already-staged update op.
|
|
1071
1097
|
|
|
1098
|
+
# Generic amend — merge a JSON patch into ANY staged op's payload (objects deep-merge, null deletes
|
|
1099
|
+
# a key, arrays/scalars replace); always prefer this over remove + re-create
|
|
1100
|
+
baker ads linkedin draft amend li_temp_x2 --patch '{"dailyBudget": {"amount": "100"}}'
|
|
1101
|
+
baker ads linkedin draft show li_temp_x2 # full staged payload — the receipt before publish
|
|
1102
|
+
|
|
1072
1103
|
# Review / undo before publish; after publish shows per-op results (applied/simulated/failed/skipped)
|
|
1073
|
-
baker ads linkedin draft
|
|
1104
|
+
baker ads linkedin draft # readable Campaign group ▸ Campaign ▸ Creative tree
|
|
1105
|
+
baker ads linkedin draft list --json # raw JSON envelope for scripting
|
|
1074
1106
|
baker ads linkedin draft remove li_temp_x2 # removing a create cascades to dependents
|
|
1075
1107
|
baker ads linkedin draft clear
|
|
1076
1108
|
```
|
|
@@ -4458,6 +4490,7 @@ This CLI is designed for AI agent consumption. Key patterns:
|
|
|
4458
4490
|
- **0.105.0**: `baker images ...`, `baker videos ...`, and `baker testimonials ...` commands now type their `/api/{images,videos,testimonials}/...` request/response payloads from the shared `@baker/api` contract package instead of hand-written local interfaces. No command, flag, or output-shape changes.
|
|
4459
4491
|
- **0.106.0**: `baker ads linkedin` gains staged write commands — `campaign-groups`/`campaigns`/`creatives` create|update|pause|resume|(archive|)duplicate, `audiences create|upload`, `conversions create|update`, `lead-forms create|update`, plus `draft [remove|clear]` for review/undo. Ops validate at stage time, apply on chat publish, and run simulated (`urn:li:simulated:*`) unless LinkedIn writes are enabled for the company.
|
|
4460
4492
|
- **0.116.0**: `lead-forms create` models the full Campaign Manager form — `locale`, form banner image (`formImageId`/`formImageUrn`), predefined profile-field questions (validated enum) vs custom questions (`SINGLE_LINE_TEXT`/`MULTIPLE_CHOICE` with `options`, ≤3 custom), `privacyPolicyText`, disclosure `consents[]` (≤5), tracking `hiddenFields[]` (≤20), and `thankYou` confirmation CTA + landing/appointment link. Staged preview surfaces best-practice warnings (no qualifying question, no confirmation, no consent). No breaking flag changes.
|
|
4493
|
+
- **0.119.0**: `draft amend`/`draft show` land on both `baker ads google` and `baker ads linkedin` — a generic JSON-merge-patch to update any staged op in place plus a full-payload receipt, replacing remove+recreate as the correction path. Google gains `assets update` and `asset-groups create|update` (Performance Max asset groups are now their own entity — `ads create --format performanceMaxAssetGroup` never worked and is gone); `ads create --format video` moves from a bare YouTube id to `--video-assets` refs (**breaking flag change** — stage the video as an asset first); `--format demandGen` gains `--image-assets`/`--square-image-assets`/`--logo-image-assets` and flag-building for headlines/descriptions. LinkedIn's `draft list` now renders a readable Campaign group ▸ Campaign ▸ Creative tree by default (`--json` for raw), `creatives update` gains `--campaign` (re-parent while staged), and `campaigns update` passes create-only fields (`--group`/`--type`/`--locale`/`--associated-entity`) through when amending a `li_temp_*` staged create instead of always stripping them.
|
|
4461
4494
|
|
|
4462
4495
|
## Publishing
|
|
4463
4496
|
|