@koda-sl/baker-cli 0.123.0-dev.70bf43ce4 → 0.123.0-dev.ab8c14ab5
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 +104 -301
- package/dist/{chunk-VSVGPYJK.js → chunk-MWFJ5NOP.js} +74 -337
- package/dist/chunk-MWFJ5NOP.js.map +1 -0
- package/dist/cli.js +3049 -2636
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.d.ts +0 -58
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-VSVGPYJK.js.map +0 -1
package/README.md
CHANGED
|
@@ -397,262 +397,6 @@ baker ads google keywords metrics --customer-id 1234567890 --keywords "running s
|
|
|
397
397
|
|
|
398
398
|
---
|
|
399
399
|
|
|
400
|
-
### Google Ads Library (`baker ads google library`)
|
|
401
|
-
|
|
402
|
-
Manage and search the Google Ads Transparency Center. Track competitor advertisers, browse their ad creatives, and discover who's bidding on keywords.
|
|
403
|
-
|
|
404
|
-
**Typical workflow:** `search-advertiser` → `track` → `search-ads`
|
|
405
|
-
|
|
406
|
-
---
|
|
407
|
-
|
|
408
|
-
### `baker ads google library search-advertiser "query"`
|
|
409
|
-
|
|
410
|
-
Search for an advertiser on the Google Ads Transparency Center.
|
|
411
|
-
|
|
412
|
-
> **Recommended:** use the domain running the ads (e.g. `example.com`) for more accurate results.
|
|
413
|
-
|
|
414
|
-
```bash
|
|
415
|
-
baker ads google library search-advertiser "example.com"
|
|
416
|
-
baker ads google library search-advertiser "Nike"
|
|
417
|
-
```
|
|
418
|
-
|
|
419
|
-
**Response:**
|
|
420
|
-
|
|
421
|
-
```json
|
|
422
|
-
{
|
|
423
|
-
"ok": true,
|
|
424
|
-
"data": {
|
|
425
|
-
"results": [
|
|
426
|
-
{ "advertiserId": "AR12345678901234567", "name": "Nike, Inc.", "region": "US", "format": "TEXT_IMAGE_VIDEO" }
|
|
427
|
-
]
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
**Flags:**
|
|
433
|
-
|
|
434
|
-
| Flag | Description |
|
|
435
|
-
|------------|--------------------------------|
|
|
436
|
-
| `--output` | Format: `json` \| `csv` \| `md` |
|
|
437
|
-
|
|
438
|
-
---
|
|
439
|
-
|
|
440
|
-
### `baker ads google library track <id> <name>`
|
|
441
|
-
|
|
442
|
-
Track a new Google advertiser and wait for the initial ad sync to complete. Polls every 5 seconds with a 10-minute timeout. Progress is written to stderr.
|
|
443
|
-
|
|
444
|
-
```bash
|
|
445
|
-
baker ads google library track AR12345678901234567 "Nike, Inc."
|
|
446
|
-
baker ads google library track AR12345678901234567 "Nike, Inc." --json
|
|
447
|
-
```
|
|
448
|
-
|
|
449
|
-
**Response (with `--json`):**
|
|
450
|
-
|
|
451
|
-
```json
|
|
452
|
-
{
|
|
453
|
-
"ok": true,
|
|
454
|
-
"data": {
|
|
455
|
-
"advertiserId": "ar_abc123",
|
|
456
|
-
"accountId": "acc_def456",
|
|
457
|
-
"totalAdCount": 342,
|
|
458
|
-
"activeAdCount": 89
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
**Flags:**
|
|
464
|
-
|
|
465
|
-
| Flag | Description |
|
|
466
|
-
|----------|----------------------|
|
|
467
|
-
| `--json` | Output in JSON format |
|
|
468
|
-
|
|
469
|
-
---
|
|
470
|
-
|
|
471
|
-
### `baker ads google library list-advertisers`
|
|
472
|
-
|
|
473
|
-
List all tracked Google advertisers and their accounts.
|
|
474
|
-
|
|
475
|
-
```bash
|
|
476
|
-
baker ads google library list-advertisers
|
|
477
|
-
baker ads google library list-advertisers --output md
|
|
478
|
-
```
|
|
479
|
-
|
|
480
|
-
**Flags:**
|
|
481
|
-
|
|
482
|
-
| Flag | Description |
|
|
483
|
-
|------------|--------------------------------|
|
|
484
|
-
| `--output` | Format: `json` \| `csv` \| `md` |
|
|
485
|
-
|
|
486
|
-
---
|
|
487
|
-
|
|
488
|
-
### `baker ads google library sync-status <accountId>`
|
|
489
|
-
|
|
490
|
-
Check the sync status and ad counts of a tracked account.
|
|
491
|
-
|
|
492
|
-
```bash
|
|
493
|
-
baker ads google library sync-status acc_def456
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
**Response:**
|
|
497
|
-
|
|
498
|
-
```json
|
|
499
|
-
{
|
|
500
|
-
"ok": true,
|
|
501
|
-
"data": {
|
|
502
|
-
"syncStatus": null,
|
|
503
|
-
"totalAdCount": 342,
|
|
504
|
-
"activeAdCount": 89
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
`syncStatus` is `null` when idle, `"syncing"` during a sync, or `"error"` if the last sync failed.
|
|
510
|
-
|
|
511
|
-
---
|
|
512
|
-
|
|
513
|
-
### `baker ads google library search-ads <accountId>`
|
|
514
|
-
|
|
515
|
-
Search and filter ads for a tracked account. Supports pagination.
|
|
516
|
-
|
|
517
|
-
```bash
|
|
518
|
-
baker ads google library search-ads acc_def456
|
|
519
|
-
baker ads google library search-ads acc_def456 --search "summer sale" --isActive --mediaType image
|
|
520
|
-
baker ads google library search-ads acc_def456 --sort newest --limit 50
|
|
521
|
-
baker ads google library search-ads acc_def456 --cursor "eyJwYWdl..."
|
|
522
|
-
```
|
|
523
|
-
|
|
524
|
-
**Response:**
|
|
525
|
-
|
|
526
|
-
```json
|
|
527
|
-
{
|
|
528
|
-
"ok": true,
|
|
529
|
-
"data": {
|
|
530
|
-
"page": [
|
|
531
|
-
{
|
|
532
|
-
"_id": "abc123",
|
|
533
|
-
"platform": "google",
|
|
534
|
-
"externalId": "CR_1234567890",
|
|
535
|
-
"isActive": true,
|
|
536
|
-
"mediaType": "image",
|
|
537
|
-
"headline": "Summer Sale — 50% Off Everything",
|
|
538
|
-
"description": "Shop our biggest sale of the year. Free shipping on all orders.",
|
|
539
|
-
"destinationUrl": "https://example.com/summer-sale",
|
|
540
|
-
"bodyText": "Summer Sale — 50% Off Everything",
|
|
541
|
-
"pageName": "Example Store",
|
|
542
|
-
"impressionsMin": 100000,
|
|
543
|
-
"impressionsMax": 200000,
|
|
544
|
-
"startDate": "2025-06-01",
|
|
545
|
-
"endDate": "2025-06-30",
|
|
546
|
-
"firstSeenAt": 1717200000000,
|
|
547
|
-
"lastSeenAt": 1719792000000,
|
|
548
|
-
"publisherPlatforms": ["GOOGLE_ADS"],
|
|
549
|
-
"regionCodes": ["US", "GB"],
|
|
550
|
-
"variations": [
|
|
551
|
-
{
|
|
552
|
-
"headline": "Summer Sale — 50% Off",
|
|
553
|
-
"description": "Shop our biggest sale of the year.",
|
|
554
|
-
"destinationUrl": "https://example.com/summer-sale",
|
|
555
|
-
"imageUrl": "https://...",
|
|
556
|
-
"visibleUrl": "example.com"
|
|
557
|
-
}
|
|
558
|
-
],
|
|
559
|
-
"regions": [
|
|
560
|
-
{ "code": "US", "name": "United States" }
|
|
561
|
-
],
|
|
562
|
-
"analysisStatus": "completed",
|
|
563
|
-
"aiAnalysis": {
|
|
564
|
-
"aiSummary": "Promotional display ad for a seasonal sale with urgency-driven CTA",
|
|
565
|
-
"hookAngle": "Discount/Price",
|
|
566
|
-
"offerType": "Percentage Discount",
|
|
567
|
-
"ctaStrategy": "Shop Now",
|
|
568
|
-
"funnelStage": "Bottom",
|
|
569
|
-
"targetAudience": "Price-sensitive shoppers",
|
|
570
|
-
"adFormat": "responsive_display",
|
|
571
|
-
"tags": ["sale", "discount", "ecommerce"],
|
|
572
|
-
"trustSignals": ["Free shipping"],
|
|
573
|
-
"keyMessages": ["50% off", "Free shipping"],
|
|
574
|
-
"competitiveAngle": "Price leadership",
|
|
575
|
-
"dominantColors": ["#FF5733", "#FFFFFF"],
|
|
576
|
-
"analyzedAt": 1719792000000
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
],
|
|
580
|
-
"continueCursor": "eyJwYWdl...",
|
|
581
|
-
"isDone": false
|
|
582
|
-
}
|
|
583
|
-
}
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
**Key response fields:**
|
|
587
|
-
|
|
588
|
-
| Field | Description |
|
|
589
|
-
|-------|-------------|
|
|
590
|
-
| `headline`, `description` | Top-level ad copy (first variation) |
|
|
591
|
-
| `variations[]` | All ad variations with copy, images, videos, and URLs |
|
|
592
|
-
| `regions[]` | Geographic targeting regions |
|
|
593
|
-
| `impressionsMin/Max` | Estimated impression range (Google Ads Transparency data) |
|
|
594
|
-
| `publisherPlatforms` | Where the ad ran (GOOGLE_ADS, YOUTUBE, etc.) |
|
|
595
|
-
| `analysisStatus` | AI analysis state: `pending`, `processing`, `completed`, `failed` |
|
|
596
|
-
| `aiAnalysis` | AI-generated creative analysis (only present when `analysisStatus` is `completed`) |
|
|
597
|
-
| `aiAnalysis.aiSummary` | One-line AI summary of the ad |
|
|
598
|
-
| `aiAnalysis.hookAngle` | Creative hook (Discount, Fear, Social Proof, etc.) |
|
|
599
|
-
| `aiAnalysis.funnelStage` | Funnel position: Top, Middle, Bottom |
|
|
600
|
-
| `aiAnalysis.tags` | AI-generated tags for filtering |
|
|
601
|
-
|
|
602
|
-
**Flags:**
|
|
603
|
-
|
|
604
|
-
| Flag | Description |
|
|
605
|
-
|---------------|------------------------------------------------|
|
|
606
|
-
| `--search` | Search term for ad text |
|
|
607
|
-
| `--isActive` | Filter by active ads only |
|
|
608
|
-
| `--mediaType` | Filter by media type: `image`, `video`, `text` |
|
|
609
|
-
| `--sort` | Sort: `newest` or `oldest` |
|
|
610
|
-
| `--limit` | Max results per page (default 20, max 100) |
|
|
611
|
-
| `--cursor` | Pagination cursor from previous response |
|
|
612
|
-
| `--output` | Format: `json` \| `csv` \| `md` |
|
|
613
|
-
|
|
614
|
-
---
|
|
615
|
-
|
|
616
|
-
### `baker ads google library sync <accountId>`
|
|
617
|
-
|
|
618
|
-
Trigger an immediate re-sync for a tracked account. Polls every 5 seconds until complete (10-minute timeout). Progress is written to stderr.
|
|
619
|
-
|
|
620
|
-
```bash
|
|
621
|
-
baker ads google library sync acc_def456
|
|
622
|
-
```
|
|
623
|
-
|
|
624
|
-
**Response:**
|
|
625
|
-
|
|
626
|
-
```json
|
|
627
|
-
{
|
|
628
|
-
"ok": true,
|
|
629
|
-
"data": {
|
|
630
|
-
"totalAdCount": 350,
|
|
631
|
-
"activeAdCount": 92
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
```
|
|
635
|
-
|
|
636
|
-
---
|
|
637
|
-
|
|
638
|
-
### `baker ads google library search-competitors "keyword"`
|
|
639
|
-
|
|
640
|
-
Search for competitors running Google ads for a keyword. Uses DataForSEO (same data as `baker research advertisers`).
|
|
641
|
-
|
|
642
|
-
```bash
|
|
643
|
-
baker ads google library search-competitors "running shoes"
|
|
644
|
-
baker ads google library search-competitors "crm software" --location uk
|
|
645
|
-
```
|
|
646
|
-
|
|
647
|
-
**Flags:**
|
|
648
|
-
|
|
649
|
-
| Flag | Description |
|
|
650
|
-
|--------------|----------------------------|
|
|
651
|
-
| `--location` | Location name or code |
|
|
652
|
-
| `--json` | Output in JSON format |
|
|
653
|
-
|
|
654
|
-
---
|
|
655
|
-
|
|
656
400
|
### Staged writes (`baker ads google budgets|campaigns|...`)
|
|
657
401
|
|
|
658
402
|
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.
|
|
@@ -1142,7 +886,7 @@ Notes:
|
|
|
1142
886
|
- All write commands take `--file <json>` payloads; explicit flags override file keys. `baker schema ads.linkedin.campaigns.create` for exact args.
|
|
1143
887
|
- Money flags (`--bid`, `--daily-budget`, `--total-budget`) require `--currency`.
|
|
1144
888
|
- Creative media comes from the Baker library (`--image-id`/`--video-id` from `baker images`/`baker videos` — uploaded to LinkedIn at publish) or as LinkedIn URNs (`--image-urn`/`--video-urn`). Formats: `image|video|text|spotlight|follower|document|carousel|conversation|tla|jobs`; complex formats take `--file` with the full content object; conversation ads take `--file` with the message flow (`{message: {subject, body, senderName?, buttons[]}}` — buttons `NESTED` (with `nestedMessage`) or `LANDING_PAGE` (with `landingPageUrl`), ≤25 messages, bodies ≤500 chars, labels ≤25). Limits: headline ≤70, text-ad 25/75, intro soft-truncates at 600 chars. TLA sponsors an existing post via `--post-urn`.
|
|
1145
|
-
- Lead forms are file-first (`lead-forms create --file form.json`). Required: name, headline (≤60), privacyPolicyUrl, questions[] (≤12; playbook: ≤4 for completion). Each question is a predefined profile field (`{ name, predefinedField: "EMAIL" }` — Contact/Work/Company/Education/Demographic library) or a custom question (`{ name, questionType: "SINGLE_LINE_TEXT" | "MULTIPLE_CHOICE", options?: [...] }`; ≤3 custom, MULTIPLE_CHOICE needs 2–30 options). Also supported: `locale {country,language}`, `formImageId`/`formImageUrn` (banner), `
|
|
889
|
+
- Lead forms are file-first (`lead-forms create --file form.json`). Required: name, headline (≤60), privacyPolicyUrl, questions[] (≤12; playbook: ≤4 for completion). Each question is a predefined profile field (`{ name, predefinedField: "EMAIL" }` — Contact/Work/Company/Education/Demographic library) or a custom question (`{ name, questionType: "SINGLE_LINE_TEXT" | "MULTIPLE_CHOICE", options?: [...] }`; ≤3 custom, MULTIPLE_CHOICE needs 2–30 options). Also supported: `locale {country,language}`, `formImageId`/`formImageUrn` (banner), `consents[]` (≤5 disclosure checkboxes `{text, required}`), `hiddenFields[]` (≤20 `{name, value}` tracking fields), `legalDisclaimer`, `thankYou {message, cta, landingUrl | appointmentUrl}` (Calendly/Chili Piper booking link). The staged preview emits non-blocking best-practice warnings when a form has no qualifying question, no confirmation message/action, or no consent checkbox.
|
|
1146
890
|
|
|
1147
891
|
#### `audit` — playbook diagnostic
|
|
1148
892
|
|
|
@@ -2417,13 +2161,17 @@ baker testimonials tags
|
|
|
2417
2161
|
|
|
2418
2162
|
### Winning Ads (`baker winning-ads`)
|
|
2419
2163
|
|
|
2420
|
-
Search the **ad-dna** corpus of scored "winning" competitor ads for reference creatives to reproduce (e.g. with `baker canvas`). Each result carries a presigned media URL (~1h TTL), the ad's DNA summary, and scores. The CLI authenticates with the normal `BAKER_API_KEY`; the Baker backend proxies the request to the ad-dna service with a server-held token — no extra credential in the sandbox.
|
|
2164
|
+
Search the **ad-dna** corpus of scored "winning" competitor ads for reference creatives to reproduce (e.g. with `baker canvas`), and manage the brands your library tracks (`follow` / `following` / `unfollow`). Each result carries a presigned media URL (~1h TTL), the ad's DNA summary, and scores. The CLI authenticates with the normal `BAKER_API_KEY`; the Baker backend proxies the request to the ad-dna service with a server-held token — no extra credential in the sandbox.
|
|
2165
|
+
|
|
2166
|
+
> The corpus has **Meta + LinkedIn** connectors, so `--platform` inputs are limited to `meta,linkedin`. (Older result rows may still carry a legacy platform string.)
|
|
2421
2167
|
|
|
2422
2168
|
> Backend env: the Convex deployment must have `AD_DNA_API_TOKEN` set (`npx convex env set AD_DNA_API_TOKEN …`). `AD_DNA_API_URL` is optional and defaults to `https://ads.withbaker.com`.
|
|
2423
2169
|
|
|
2170
|
+
> Replaces the old `baker ads google library` tree, which has been removed. Competitor-by-keyword discovery still lives at `baker research advertisers`.
|
|
2171
|
+
|
|
2424
2172
|
### `baker winning-ads search <query>`
|
|
2425
2173
|
|
|
2426
|
-
Semantic search (dense recall + BM25 + rerank)
|
|
2174
|
+
Semantic search (dense recall + BM25 + rerank) → `POST /api/ad-library/winners/search`. The CLI projects each result to a **lean, decision-focused** shape so the agent's context stays small — default fields: `advertiser`, `advertiser_id`, `platform`, `format`, `relevance`, `winner_score`, `summary` (what the ad is about), `media_url`; plus top-level `pool_size`, `match_confidence` (`high|medium|low`), and `below_floor_count` (matches dropped under the relevance floor). `--full` adds DNA detail (`angle`, `target_persona`, `hook_archetype`, `awareness_stage`, `industry`) + longevity (`days_active`, `reach`, `active`, `winner_category`, `media_kind`). `--output json` (default) returns the lean objects; `--output md` prints a table.
|
|
2427
2175
|
|
|
2428
2176
|
> `media_url` is the creative itself: for `static` it's the image, for `video` it's the video file. ad-dna stores **no separate poster** for videos, so a video result has only the video URL.
|
|
2429
2177
|
|
|
@@ -2445,7 +2193,7 @@ baker winning-ads search --ref-ad-id a_12345 --first-seen-after 2026-01-01T00:00
|
|
|
2445
2193
|
| `--limit <n>` | Max results 1–100 (**default 10** — shortlist size) |
|
|
2446
2194
|
| `--max-per-advertiser <n>` | Cap results per advertiser 1–50 (default 3) |
|
|
2447
2195
|
| `--min-relevance <0-1>` | Relevance floor; trims weak matches |
|
|
2448
|
-
| `--platform <list>` |
|
|
2196
|
+
| `--platform <list>` | `meta,linkedin` — pass a single value to search **only** that platform |
|
|
2449
2197
|
| `--format <list>` | `video,static,carousel` |
|
|
2450
2198
|
| `--winner-category <list>` | `winner,scaled_winner,evergreen,rising,untested,dud,…` (default: all) |
|
|
2451
2199
|
| `--awareness <list>` | `unaware,problem_aware,solution_aware,product_aware,most_aware` |
|
|
@@ -2460,13 +2208,66 @@ Reading the scores: **`relevance`** (0–1) = match of the creative to your quer
|
|
|
2460
2208
|
|
|
2461
2209
|
### `baker winning-ads advertisers <brand>`
|
|
2462
2210
|
|
|
2463
|
-
|
|
2211
|
+
List corpus brands by name or domain → `GET /api/ad-library/advertisers`. Use it to find **your own** advertiser (to `--exclude-advertiser`) or a **competitor** (to `--advertiser-id` / `winners`). Lean default fields: `advertiser_id`, `label`, `platform_count`, `family_count`, `active_ad_count`, `total_ad_count`; `--full` adds `scraped_name`, `image_url`, `platforms`, `total_reach`, `last_synced_at`. Supports `--platform meta|linkedin`, `--limit`, `--offset`.
|
|
2464
2212
|
|
|
2465
2213
|
```bash
|
|
2466
2214
|
baker winning-ads advertisers "Acme" --output md # find our own advertiser id
|
|
2467
2215
|
baker winning-ads advertisers "Deel" --platform meta --output md
|
|
2468
2216
|
```
|
|
2469
2217
|
|
|
2218
|
+
### `baker winning-ads follow "<domain | profile URL | brand>" --platform meta|linkedin`
|
|
2219
|
+
|
|
2220
|
+
Add a brand's ads to your library → `POST /api/ad-library/follow`. `--platform` is **required**. The result `status` is one of:
|
|
2221
|
+
|
|
2222
|
+
- `following` — the brand is already in the corpus; you're now subscribed (no wait).
|
|
2223
|
+
- `added` — a new brand was queued for ingestion; its ads appear as discovery completes (a `hints[]` note flags this).
|
|
2224
|
+
- `ambiguous` — the input mapped to multiple brands; pick one from `candidates` and re-run with a more specific domain/URL.
|
|
2225
|
+
|
|
2226
|
+
```bash
|
|
2227
|
+
baker winning-ads follow "deel.com" --platform meta
|
|
2228
|
+
baker winning-ads follow "https://www.linkedin.com/company/acme" --platform linkedin --label "Acme (competitor)"
|
|
2229
|
+
```
|
|
2230
|
+
|
|
2231
|
+
### `baker winning-ads following`
|
|
2232
|
+
|
|
2233
|
+
List the brands you follow → `GET /api/ad-library/following`. Each row shows `status` (`ready` vs `adding…`) plus cached counts (`active_ad_count`, `total_ad_count`, `family_count`) and discovery progress (`adding_discovered`, `adding_enqueued`). `--full` adds `image_url` + `platforms`.
|
|
2234
|
+
|
|
2235
|
+
```bash
|
|
2236
|
+
baker winning-ads following --output md
|
|
2237
|
+
```
|
|
2238
|
+
|
|
2239
|
+
### `baker winning-ads winners <advertiser>`
|
|
2240
|
+
|
|
2241
|
+
Top winning ads for one advertiser id → `GET /api/ad-library/advertiser-winners`. Same lean winner cards as `search` (add `--full` for DNA + longevity). Supports `--top N` and `--platform meta|linkedin`.
|
|
2242
|
+
|
|
2243
|
+
```bash
|
|
2244
|
+
baker winning-ads winners adv_123 --top 15 --output md
|
|
2245
|
+
```
|
|
2246
|
+
|
|
2247
|
+
### `baker winning-ads unfollow <advertiser>`
|
|
2248
|
+
|
|
2249
|
+
Stop following a brand by advertiser id → `POST /api/ad-library/unfollow`. Returns `{ removed }`.
|
|
2250
|
+
|
|
2251
|
+
```bash
|
|
2252
|
+
baker winning-ads unfollow adv_123
|
|
2253
|
+
```
|
|
2254
|
+
|
|
2255
|
+
### `baker winning-ads brief`
|
|
2256
|
+
|
|
2257
|
+
Generate a creative brief grounded in strategically-similar winners → `POST /api/ad-library/brief`. Optionally describe the target creative with `--dna` (a JSON object), steer with `--notes`, and cap references with `--k`. Returns `brief_markdown` + `reference_ad_ids`.
|
|
2258
|
+
|
|
2259
|
+
```bash
|
|
2260
|
+
baker winning-ads brief --dna '{"angle":"cost savings","awareness_stage":"solution_aware"}' --notes "B2B, LinkedIn video" --k 8
|
|
2261
|
+
```
|
|
2262
|
+
|
|
2263
|
+
### `baker winning-ads patterns --winners <adIds> --duds <adIds>`
|
|
2264
|
+
|
|
2265
|
+
Mine what separates two cohorts of ads → `POST /api/ad-library/patterns`. Pass a comma-list of winning ad ids (`--winners`, cohort A) and weaker/dud ad ids (`--duds`, cohort B), plus optional `--top-n`. Returns each discriminating DNA field with the cohort it `favors` (`winners`/`duds`), a `score`, and the top values on each side.
|
|
2266
|
+
|
|
2267
|
+
```bash
|
|
2268
|
+
baker winning-ads patterns --winners a_1,a_2,a_3 --duds a_9,a_8 --top-n 10 --output md
|
|
2269
|
+
```
|
|
2270
|
+
|
|
2470
2271
|
---
|
|
2471
2272
|
|
|
2472
2273
|
### Scheduled Actions (`baker scheduled-actions`)
|
|
@@ -2502,6 +2303,46 @@ Rules:
|
|
|
2502
2303
|
|
|
2503
2304
|
---
|
|
2504
2305
|
|
|
2306
|
+
### Marketing Tags (`baker tags`)
|
|
2307
|
+
|
|
2308
|
+
Read the client's marketing/analytics tags (Meta pixel, GA4, Google Ads, GTM, Clarity, Hotjar, PostHog, …) — production tags overlaid with the changes staged in this chat.
|
|
2309
|
+
|
|
2310
|
+
**The CLI is read-only.** Every tag change (create, edit, delete) goes through the `request_tag_input` tool (`baker_ui` MCP server): the agent proposes one or more changes — each becomes a tab in one blocking approval form — pre-filling the non-secret fields it knows; the user reviews, edits, fills secret fields, and approves or skips each tab. Approved changes stage on the chat and apply when the chat is published; discarding the chat drops them.
|
|
2311
|
+
|
|
2312
|
+
`BAKER_CHAT_ID` must be set.
|
|
2313
|
+
|
|
2314
|
+
```bash
|
|
2315
|
+
baker tags list # effective view: production + staged, full readable config + secret status
|
|
2316
|
+
baker tags draft # review the staged changes awaiting publish
|
|
2317
|
+
```
|
|
2318
|
+
|
|
2319
|
+
Notes:
|
|
2320
|
+
|
|
2321
|
+
- **`list` prints each tag's full readable config.** Every non-secret field is shown in full under the tag — the Clarity `projectId`, GA4 `measurementId`, the entire custom `code` snippet, etc. — so the agent reuses a stored value to pre-fill a follow-up change instead of asking the user for something already installed. Secrets are never among these fields. (`--json` emits the same data as the raw envelope.)
|
|
2322
|
+
- **Secrets never travel through this CLI or the chat.** Secret fields (`accessToken`, `apiSecret`, `authorizationToken`, `apiKey`, `conversionToken`, `oauthProviderId`) are entered only in the dashboard's secure tag form and flow straight into the staged draft; tool responses only ever name which secret fields are set/pending.
|
|
2323
|
+
- Staged creates get a server-generated `tag_temp_*` ref (returned in the tool result and printed by `list`). Use it (or a real tag id) as flow side-effect `tagIds` — the published tag keeps resolving under the temp ref.
|
|
2324
|
+
- Proposing a delete on a `tag_temp_*` ref drops the staged create instead.
|
|
2325
|
+
- Single-instance types (`code`, `posthog`, `datafast`) reject a second instance against the chat's effective view.
|
|
2326
|
+
- Conflicts at publish (tag deleted in the dashboard, config invalid) skip the op with a recorded reason — they never block the publish.
|
|
2327
|
+
|
|
2328
|
+
### Forms / Flows (`baker flows`)
|
|
2329
|
+
|
|
2330
|
+
Read this workspace's Forms (flows) and the configuration status of each one's **confidential fields** — side-effect connection secrets, OAuth connections, and third-party field definitions (HubSpot, Calendly, HighLevel, SavvyCal). Reads the local `_data.json` files; no secret values are ever decrypted or printed.
|
|
2331
|
+
|
|
2332
|
+
**The CLI is read-only.** Author a Form's structure (nodes, conditions, side effects, field mappings) by editing its `_data.json` with the flow-builder skill. Configure the confidential fields it reports as `[missing]` / `[needs connection]` / `not selected` through the `request_flow_input` tool (`baker_ui` MCP server): the agent authors the surrounding structure, references it by `nodeId`/`sideEffectId`, and the user enters secrets, connects/picks OAuth accounts, and picks third-party forms in the dashboard. Those values are written (encrypted, where a secret) into the Form on the chat's branch and go live when the chat is published.
|
|
2333
|
+
|
|
2334
|
+
```bash
|
|
2335
|
+
baker flows list # every Form + how many confidential fields still need setup
|
|
2336
|
+
baker flows show contact # one Form's confidential fields and their status
|
|
2337
|
+
baker flows show contact --full # include the full flow tree (secret values redacted)
|
|
2338
|
+
```
|
|
2339
|
+
|
|
2340
|
+
Notes:
|
|
2341
|
+
|
|
2342
|
+
- **Secrets never travel through this CLI or the chat.** `show` reports only whether each field is configured (`[set]`/`[missing]`, `[connected]`/`[needs connection]`, selected/not selected) — never a value. Configured secrets appear only as `[configured]` ciphertext markers.
|
|
2343
|
+
- Confidential side-effect types: `httpWebhook`, `zapier`, `crmble` (typed credentials); `pipedrive`, `googleSpreadsheet`, `hubspotForm`, `goHighlevelContact` (OAuth connection + resource); `email`. Widget node types needing a resource pick: `calendly`, `savvycal`, `hubspot`, `hubspotMeeting`, `highlevel`, `highlevelForm`.
|
|
2344
|
+
- `request_flow_input` changes stage on the chat's branch and apply when the chat is published; discarding the chat drops them.
|
|
2345
|
+
|
|
2505
2346
|
### Action Items (`baker actions`)
|
|
2506
2347
|
|
|
2507
2348
|
Manage action items for the current chat. Most write operations stage on the chat's draft and apply atomically when the chat is published. Claim/release run live so other chats can see who's working on what.
|
|
@@ -2661,17 +2502,6 @@ baker canvas run my-canvas.json
|
|
|
2661
2502
|
# single node — that old serial workaround is obsolete.
|
|
2662
2503
|
baker canvas run my-canvas.json --parallel 8
|
|
2663
2504
|
|
|
2664
|
-
# 2c. Runs persist across sandboxes/sessions by default: node results sync to a
|
|
2665
|
-
# company-scoped remote cache (small JSON pointers; bytes stay in R2), so a FRESH
|
|
2666
|
-
# sandbox re-runs an already-computed canvas at zero credits — assets rehydrate
|
|
2667
|
-
# from R2, sha-verified. Every run also posts a durable history record (per-node
|
|
2668
|
-
# outputs, credits, cached/fresh) that powers the dashboard's Creatives
|
|
2669
|
-
# generations timeline. Opt out with --remote-cache off (env
|
|
2670
|
-
# BAKER_CANVAS_REMOTE_CACHE=off) and --no-record. With --remote-cache off,
|
|
2671
|
-
# assets are not uploaded, so a recorded run keeps its stats but has no
|
|
2672
|
-
# browsable outputs — pass --no-record too if you want nothing persisted.
|
|
2673
|
-
baker canvas run my-canvas.json --remote-cache off --no-record
|
|
2674
|
-
|
|
2675
2505
|
# 3. Inspect a finished run (per-node timing, file list, optional video thumbs)
|
|
2676
2506
|
baker canvas inspect <run_id>
|
|
2677
2507
|
|
|
@@ -2916,7 +2746,7 @@ Pick a `source` discriminator and declare the kind you expect. See [Ingestion](#
|
|
|
2916
2746
|
|
|
2917
2747
|
**Outputs:** `asset` → `<params.expect>` / content-determined (URL strategy table) or extension-inferred (path).
|
|
2918
2748
|
|
|
2919
|
-
**Path-source notes:** the canvas is **not portable** to another machine without the file. Cache key folds the file's `mtime:size`, so editing the file invalidates the cache automatically. Supported extensions: `png`, `jpg`/`jpeg`, `webp`, `gif`, `avif`, `svg`, `mp4`, `webm`, `mov`, `m4v`, `mp3`, `wav`, `m4a`, `ogg`, `flac`, `json`, `txt`, `md`, `markdown`, `html`/`htm`, `csv`, `ttf`, `otf`, `woff`, `woff2`. Unknown extensions fall back to magic-byte sniffing for common image formats (and an SVG content sniff), else `kind_mismatch`. **
|
|
2749
|
+
**Path-source notes:** the canvas is **not portable** to another machine without the file. Cache key folds the file's `mtime:size`, so editing the file invalidates the cache automatically. Supported extensions: `png`, `jpg`/`jpeg`, `webp`, `gif`, `avif`, `svg`, `mp4`, `webm`, `mov`, `m4v`, `mp3`, `wav`, `m4a`, `ogg`, `flac`, `json`, `txt`, `md`, `markdown`, `html`/`htm`, `csv`, `ttf`, `otf`, `woff`, `woff2`. Unknown extensions fall back to magic-byte sniffing for common image formats (and an SVG content sniff), else `kind_mismatch`. **SVG (`expect: "image"`) is rasterized to a transparent PNG on ingest** — brand logos are usually SVG, and image-generation models can't read SVG markup, so it's upscaled (longest edge near 2048px) with transparency preserved and the resulting asset carries `metadata.rasterized_from: "svg"`. **Video (`expect: "video"`) duration is probed from the file's ISO-BMFF (`mp4`/`mov`/`m4v`) header** and stamped as the canonical `duration_ms` (and `metadata.duration_ms`); other containers (e.g. `webm`) leave it unset. Downstream `video_deconstruct` uses this declared duration to size its ingest-poll timeout and preflight — without it those fall back to worst-case budgets and a single deconstruct step can hit the action time limit.
|
|
2920
2750
|
|
|
2921
2751
|
**Cost:** 0 engine credits for direct fetch + yt-dlp + local file. Handinger charges per scrape.
|
|
2922
2752
|
|
|
@@ -3918,10 +3748,6 @@ Validate, then execute the graph. Blocks until done. Logs one line per node. Ret
|
|
|
3918
3748
|
| `--run-id <id>` | auto ULID | Override the generated run id. |
|
|
3919
3749
|
| `--cache-policy <policy>` | `read_write` | `read_write`, `bypass`, or `read_only`. |
|
|
3920
3750
|
| `--concurrency <n>` | `5` (or `BAKER_CANVAS_CONCURRENCY`) | Max nodes executing at once within a layer. |
|
|
3921
|
-
| `--remote-cache <on\|off>` | `on` (or `BAKER_CANVAS_REMOTE_CACHE`) | Company-scoped remote cache + durable asset persistence. |
|
|
3922
|
-
| `--no-record` | records | Skip posting the durable run-history record (and its live progress). |
|
|
3923
|
-
|
|
3924
|
-
**Run history streams live.** The run posts its plan (every node + its dependency edges) the moment validation passes, then re-posts a progress snapshot as each node starts and settles — the dashboard's creative workflow graph shows nodes flipping pending → running → done in real time, with each node's outputs attached as they land. A failed run keeps its per-node trail (what completed, what died). All best-effort: an unreachable backend never changes the run's outcome.
|
|
3925
3751
|
|
|
3926
3752
|
**Failures don't abandon sibling work.** Nodes in a layer run under the concurrency cap and every one **settles** — a failed clip no longer kills its in-flight siblings, whose finished results still land in the content-addressed cache. One failure re-throws as-is; several are reported together (each failed node named). Re-running `baker canvas run` resumes from the cache and re-executes **only** the failed nodes and their descendants — never hand-orchestrate per-node renders. Long `video_generate` clips execute as **backend jobs** (the CLI polls; a CDN/proxy timeout can no longer kill a generation mid-flight).
|
|
3927
3753
|
|
|
@@ -3987,7 +3813,6 @@ baker canvas run ./reference-ad.video.canvas.json
|
|
|
3987
3813
|
| Flag | Default | Effect |
|
|
3988
3814
|
|---|---|---|
|
|
3989
3815
|
| `--out <path>` | `<video-dir>/<name>.video.canvas.json` | Where to write the canvas (composition is copied alongside). |
|
|
3990
|
-
| `--slug <slug>` | — | Creative slug (lowercase kebab): writes the canvas to `src/creatives/<slug>/<slug>.canvas.json` — the repo convention that attaches every run to the creative's dashboard generation history. `--out` wins over `--slug`. |
|
|
3991
3816
|
| `--frames <mode>` | `generate` | `generate` emits ONE recast keyframe per scene (the original frame is dropped so the dropped `el_*` assets drive identity); `reuse` wires the real extracted first+last frames straight into the clips (faithful, cheaper, no recast). |
|
|
3992
3817
|
| `--ambient` | off | Give silent **b-roll** scenes native diegetic ambient (Seedance `generate_audio`), mixed deep under the music bed. Talking scenes already carry voice; check levels don't muddy the mix before keeping it. |
|
|
3993
3818
|
| `--max-scenes <n>` | all source scenes | **Cost lever that reduces fidelity** — caps the deconstruct, MERGING away every scene beyond the cap (fewer cuts, lost beats). Prints a warning when set; omit it to reproduce every scene. |
|
|
@@ -4029,7 +3854,6 @@ baker canvas run ./static-ad.canvas.json
|
|
|
4029
3854
|
|---|---|---|
|
|
4030
3855
|
| `--context <text>` | — | Known provenance (advertiser, category, market) to ground the describe. |
|
|
4031
3856
|
| `--out <path>` | `<image-dir>/static-ad.canvas.json` (cwd when `<image>` is a URL) | Where to write the canvas (`prompt.json` is written alongside). |
|
|
4032
|
-
| `--slug <slug>` | — | Creative slug (lowercase kebab): writes the canvas to `src/creatives/<slug>/<slug>.canvas.json` — the repo convention that attaches every run to the creative's dashboard generation history. `--out` wins over `--slug`. With a slug, the reference image is **downloaded into `src/creatives/<slug>/references/` and normalized to a model-safe format** (SVG/AVIF/HEIC/… → PNG), named from the actual bytes (not the URL string) so a presigned/extensionless URL never lands as PNG-bytes-in-`.jpg` — the canvas ingests that committed, portable path instead of the expiring URL. |
|
|
4033
3857
|
| `--describe-model <id>` | registry default (`~google/gemini-pro-latest`) | Override the `image_describe` model. |
|
|
4034
3858
|
| `--select-model <id>` | registry default (`~google/gemini-flash-latest`) | Override the element-selection `text_generate` model. |
|
|
4035
3859
|
| `--layout-model <id>` | registry default (`~google/gemini-flash-latest`) | Override the global-layout `text_generate` model. |
|
|
@@ -4039,8 +3863,6 @@ baker canvas run ./static-ad.canvas.json
|
|
|
4039
3863
|
|
|
4040
3864
|
Scaffolding runs (and bills) the two vision passes; **running** the result generates a billed image. `baker canvas validate` does not check that the `[TODO]` paths exist — supply the real files before `run`.
|
|
4041
3865
|
|
|
4042
|
-
**Resuming an interrupted run.** A long `baker canvas run` (multi-clip video) that is killed mid-render — session end, sandbox pause — leaves a marker under the outputs dir. The next `baker canvas run` of the same canvas automatically **resumes** that run: it reuses the run id so still-running billed jobs re-attach instead of being abandoned and re-billed, and completed nodes come from the cache. A clean completion (or a handled failure) clears the marker, so a normal re-run starts a fresh generation. Force a new run with `--fresh`, or pin a specific run with `--run-id <id>`. Independent same-layer nodes (e.g. video clips) fan out in parallel up to `--parallel`/`--concurrency` (default 8; env `BAKER_CANVAS_CONCURRENCY`).
|
|
4043
|
-
|
|
4044
3866
|
#### `baker canvas inspect <run_id> [--thumbnails]`
|
|
4045
3867
|
|
|
4046
3868
|
One-page summary of a completed run: per-node duration + cache status, list of files in the run dir, optional video thumbnails (start/middle/end frames extracted via ffmpeg).
|
|
@@ -4503,26 +4325,6 @@ import {
|
|
|
4503
4325
|
} from "@koda-sl/baker-cli/engine";
|
|
4504
4326
|
```
|
|
4505
4327
|
|
|
4506
|
-
## Creatives
|
|
4507
|
-
|
|
4508
|
-
Publish an approved canvas render as a first-class Baker creative. The image uploads to the Baker image library (tagged `creative`), a creative record is created/updated, and the command prints the creative reference JSON the dashboard renders in chat.
|
|
4509
|
-
|
|
4510
|
-
```bash
|
|
4511
|
-
baker creatives publish ./canvas/<run_id>/<final>.png --title "Spring Offer 4x5" \
|
|
4512
|
-
--slug spring-offer-4x5 --run-id r_01JXYZ... \
|
|
4513
|
-
--source-reference-url "https://www.facebook.com/ads/library/?id=..."
|
|
4514
|
-
```
|
|
4515
|
-
|
|
4516
|
-
| Flag | Effect |
|
|
4517
|
-
|---|---|
|
|
4518
|
-
| `--title <text>` | Required. Human title for the creative. |
|
|
4519
|
-
| `--slug <slug>` | Creative slug (`src/creatives/<slug>/`) — attaches the image to that creative's row, marks it `published`. |
|
|
4520
|
-
| `--run-id <r_…>` | Pins the approved generation from the creative's run history as the published one. |
|
|
4521
|
-
| `--source-reference-url <url>` | Original reference ad URL, recorded on the creative. |
|
|
4522
|
-
| `--context <text>` | Optional describe context for the uploaded image asset. |
|
|
4523
|
-
|
|
4524
|
-
Without `--slug` the command behaves as before (one creative record per published image). With `--slug` it upserts the repo-convention row — the same one the dashboard's Creatives tab and the `src/creatives/{slug}/` folder describe — so publish, repo sync, and run history all land on a single record regardless of order.
|
|
4525
|
-
|
|
4526
4328
|
## Help & Discovery
|
|
4527
4329
|
|
|
4528
4330
|
Every command supports `--help` for usage info:
|
|
@@ -4559,6 +4361,7 @@ This CLI is designed for AI agent consumption. Key patterns:
|
|
|
4559
4361
|
- **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.
|
|
4560
4362
|
- **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.
|
|
4561
4363
|
- **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.
|
|
4364
|
+
- **0.121.0**: `lead-forms create` drops the `privacyPolicyText` field — LinkedIn's versioned lead-form API has no privacy-policy-text slot, so it was silently discarded on publish. Use `legalDisclaimer` (shown under the form) or `consents[]` (disclosure checkboxes) instead. (Companion backend fix: staged lead-form questions were serialized in a shape LinkedIn dropped — they now publish correctly, and the staged preview lists each question.)
|
|
4562
4365
|
- **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.
|
|
4563
4366
|
|
|
4564
4367
|
## Publishing
|