@koda-sl/baker-cli 0.114.1 → 0.115.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 +50 -0
- package/dist/cli.js +2266 -485
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -653,6 +653,56 @@ baker ads google library search-competitors "crm software" --location uk
|
|
|
653
653
|
|
|
654
654
|
---
|
|
655
655
|
|
|
656
|
+
### Staged writes (`baker ads google budgets|campaigns|...`)
|
|
657
|
+
|
|
658
|
+
Write commands **never touch the Google Ads API at stage time**. Each command stages a create/update/pause/resume/remove op against the current chat's draft (`BAKER_CHAT_ID`); the dashboard shows it as a pending "Google Ads" change, and the whole draft applies as one atomic `GoogleAdsService.Mutate` when the chat is published. Feature-flagged per company (`companies.googleAdsWriteEnabled`) — off by default = a fully simulated publish with zero real API calls.
|
|
659
|
+
|
|
660
|
+
Reference not-yet-created resources with `g_temp_*` refs returned by earlier `create` commands (they map to Google's temporary negative-ID resource names inside one atomic batch).
|
|
661
|
+
|
|
662
|
+
```bash
|
|
663
|
+
# Build a Search campaign bottom-up, chaining temp refs
|
|
664
|
+
baker ads google budgets create --customer-id 1234567890 --name "Search budget" --amount 50
|
|
665
|
+
# → { ref: "g_temp_ab12", ... }
|
|
666
|
+
baker ads google campaigns create --customer-id 1234567890 --name "Brand — Search" \
|
|
667
|
+
--channel-type SEARCH --budget-ref g_temp_ab12 --bidding-strategy MANUAL_CPC
|
|
668
|
+
baker ads google ad-groups create --customer-id 1234567890 --name "Brand terms" --campaign-ref g_temp_<campaign>
|
|
669
|
+
baker ads google keywords add --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> --text "brand name" --match-type EXACT
|
|
670
|
+
# Shared negative keyword list → attach to the campaign
|
|
671
|
+
baker ads google keyword-lists create --customer-id 1234567890 --name "Brand exclusions"
|
|
672
|
+
baker ads google keyword-lists add --customer-id 1234567890 --list-ref g_temp_<list> --text "free" --match-type BROAD
|
|
673
|
+
baker ads google keyword-lists attach --customer-id 1234567890 --campaign-ref g_temp_<campaign> --list-ref g_temp_<list>
|
|
674
|
+
|
|
675
|
+
# Batch keywords — one command stages the whole set as ONE request (up to 500)
|
|
676
|
+
baker ads google keywords add --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> \
|
|
677
|
+
--text "brand name, brand shop:PHRASE, brand store" --match-type EXACT
|
|
678
|
+
baker ads google keyword-lists add --customer-id 1234567890 --list-ref <list-id> --file negatives.txt
|
|
679
|
+
# negatives.txt: one keyword[:MATCH_TYPE] per line; blank lines and "# comments" are skipped
|
|
680
|
+
# Responsive search ad
|
|
681
|
+
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> \
|
|
682
|
+
--headlines "Fast Widgets,Buy Online,Free Shipping" --descriptions "Best widgets around.,Ships tomorrow." \
|
|
683
|
+
--final-url https://example.com
|
|
684
|
+
# Responsive display ad — images are fields on the ad; register each image as an asset first (returns a g_temp_* ref)
|
|
685
|
+
baker ads google assets create --customer-id 1234567890 --file '{"type":"image","imageId":"<baker_image_id>","name":"Hero"}'
|
|
686
|
+
baker ads google ads create --customer-id 1234567890 --ad-group-ref g_temp_<adgroup> --format responsiveDisplay \
|
|
687
|
+
--headlines "Come back and save" --long-headline "Finish signing up and get 20% off" \
|
|
688
|
+
--descriptions "Fast setup, no card required" --business-name "Acme" --final-url https://example.com \
|
|
689
|
+
--marketing-images g_temp_<img_landscape> --square-marketing-images g_temp_<img_square> --logo-images g_temp_<img_logo>
|
|
690
|
+
|
|
691
|
+
# Review / undo staged changes
|
|
692
|
+
baker ads google draft list # readable campaign ▸ ad group ▸ ad tree + completeness advisories
|
|
693
|
+
baker ads google draft list --json # raw JSON envelope for scripting
|
|
694
|
+
baker ads google draft remove g_temp_ab12 # cascades to dependents
|
|
695
|
+
baker ads google draft clear
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
Command groups: `budgets`, `campaigns`, `ad-groups`, `keywords` (add/update/remove), `negative-keywords`, `keyword-lists`, `ads`, `assets`, `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
|
+
|
|
700
|
+
**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
|
+
|
|
702
|
+
**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
|
+
|
|
704
|
+
---
|
|
705
|
+
|
|
656
706
|
### Caching
|
|
657
707
|
|
|
658
708
|
Google Ads data is cached at two levels:
|