@koda-sl/baker-cli 0.192.2 → 0.195.0-dev.6d2f498f5
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 +82 -2
- package/dist/{chunk-ISZWNERZ.js → chunk-IDRQDUBA.js} +4 -4
- package/dist/chunk-IDRQDUBA.js.map +1 -0
- package/dist/cli.js +3058 -1652
- package/dist/cli.js.map +1 -1
- package/dist/engine/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ISZWNERZ.js.map +0 -1
package/README.md
CHANGED
|
@@ -1391,13 +1391,62 @@ baker research web "What is the pricing of monday.com?" --output md
|
|
|
1391
1391
|
|
|
1392
1392
|
---
|
|
1393
1393
|
|
|
1394
|
+
### `baker research fetch "https://url"`
|
|
1395
|
+
|
|
1396
|
+
Read one named page that an ordinary web fetch could not. Bot walls and JavaScript-rendered pages are resolved by Firecrawl on your behalf, so there is no escalation ladder to hand-roll: no retry loop, no waiting, no browser.
|
|
1397
|
+
|
|
1398
|
+
```bash
|
|
1399
|
+
baker research fetch "https://competitor.com/pricing"
|
|
1400
|
+
baker research fetch "https://competitor.com/pricing" --full
|
|
1401
|
+
baker research fetch "https://app.competitor.com/blog/post" --wait-for 5000
|
|
1402
|
+
baker research fetch "https://competitor.com" --format html --whole-page
|
|
1403
|
+
```
|
|
1404
|
+
|
|
1405
|
+
**Response:**
|
|
1406
|
+
|
|
1407
|
+
```json
|
|
1408
|
+
{
|
|
1409
|
+
"ok": true,
|
|
1410
|
+
"data": {
|
|
1411
|
+
"url": "https://competitor.com/pricing",
|
|
1412
|
+
"final_url": "https://www.competitor.com/pricing",
|
|
1413
|
+
"title": "Pricing — Competitor",
|
|
1414
|
+
"content_chars": 48213,
|
|
1415
|
+
"content_shown": 20000,
|
|
1416
|
+
"truncated": false,
|
|
1417
|
+
"provider": "firecrawl",
|
|
1418
|
+
"content": "# Pricing\n\n## Starter\n..."
|
|
1419
|
+
},
|
|
1420
|
+
"hints": ["Showing the first 20,000 of 48,213 characters. Re-run the same command with `--full` ..."]
|
|
1421
|
+
}
|
|
1422
|
+
```
|
|
1423
|
+
|
|
1424
|
+
**Flags:**
|
|
1425
|
+
|
|
1426
|
+
| Flag | Description |
|
|
1427
|
+
|----------------|--------------------------------------------------------------------------|
|
|
1428
|
+
| `--format` | `markdown` (default) or `html` |
|
|
1429
|
+
| `--wait-for` | Extra ms (0–30000) to let late content settle |
|
|
1430
|
+
| `--whole-page` | Include nav, footer and sidebars (default: main content only) |
|
|
1431
|
+
| `--full` | Return the whole page instead of the first 20,000 characters |
|
|
1432
|
+
|
|
1433
|
+
- `truncated: true` means the page is longer than one read returns, so its tail is missing.
|
|
1434
|
+
- Only Firecrawl is contacted — the target host is never re-requested directly, so a site that is rate-limiting or walling you is not hit again.
|
|
1435
|
+
- Each URL is cached server-side for 24 hours, so a follow-up `--full` call costs no extra credit.
|
|
1436
|
+
- Failures carry `error.fix` with `action: "continue_without"` for pages that will not open — finish the rest of the job and report the gap rather than retrying.
|
|
1437
|
+
|
|
1438
|
+
---
|
|
1439
|
+
|
|
1394
1440
|
### `baker research advertisers "keyword"`
|
|
1395
1441
|
|
|
1396
|
-
|
|
1442
|
+
Returns a ranked list of **domains** competing for one keyword in Google, with average SERP position, relevance rating, estimated traffic value and visibility — domain economics, **NOT ad copy**. Despite the name it returns no headlines, descriptions or creative of any kind; for a competitor's actual ad copy use `baker winning-ads content <adId>` (Meta/LinkedIn only — Google SERP ad copy is not available anywhere in Baker).
|
|
1443
|
+
|
|
1444
|
+
Defaults to `--location us` and `--language en` when omitted; the response carries a `query_context` showing which pair was used, so always set both for non-US or non-English markets.
|
|
1397
1445
|
|
|
1398
1446
|
```bash
|
|
1399
1447
|
baker research advertisers "running shoes"
|
|
1400
1448
|
baker research advertisers "crm software" --location uk --limit 10
|
|
1449
|
+
baker research advertisers "zapatos" --location es --language spanish
|
|
1401
1450
|
```
|
|
1402
1451
|
|
|
1403
1452
|
**Response:**
|
|
@@ -1744,6 +1793,7 @@ Research data is cached server-side (shared across all callers). No local cache
|
|
|
1744
1793
|
| keyword-gap | 6 hours | Same |
|
|
1745
1794
|
| relevant-pages | 6 hours | Traffic data updates weekly |
|
|
1746
1795
|
| lighthouse | 24 hours| Page performance stable day-to-day |
|
|
1796
|
+
| fetch | 24 hours| Page content rarely changes within a day |
|
|
1747
1797
|
|
|
1748
1798
|
---
|
|
1749
1799
|
|
|
@@ -1775,6 +1825,7 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
|
|
|
1775
1825
|
| `baker images upscale <imageId>` | Real-ESRGAN super-resolution via backend ($0.05/image, cost-tracked) | n/a (operates on library image) |
|
|
1776
1826
|
| `baker images crop <file>` | Coordinate-based rectangular extract — local file or URL | n/a |
|
|
1777
1827
|
| `baker images dimensions <file\|url>` | Read width / height / aspect / format without decoding | n/a |
|
|
1828
|
+
| `baker images download <targets>` | Remote URLs and/or library ids → local files, so the local transforms can read them | n/a (writes to disk, no upload) |
|
|
1778
1829
|
| `baker images tags` | List available image tag names (defaults + company custom tags) | n/a |
|
|
1779
1830
|
|
|
1780
1831
|
**Auto-ingest** runs the full `processImage` pipeline (Gemini describe + Voyage multimodal embed + OpenRouter text embed) on every hit. Override with `--auto-ingest N` (turn on) or `--no-auto-ingest` (turn off where default is on). When auto-ingest succeeds, the matching returned hit uses the Baker-owned URL and keeps the original provider URL as `sourceUrl`. After auto-ingest the next `baker images library` query for the same concept hits the local row.
|
|
@@ -2314,6 +2365,30 @@ Response:
|
|
|
2314
2365
|
}
|
|
2315
2366
|
```
|
|
2316
2367
|
|
|
2368
|
+
### `baker images download <targets...> [--out <dir-or-file>]`
|
|
2369
|
+
|
|
2370
|
+
Remote image URLs and/or library image ids → local files. The missing first half of `source → download → normalize → place`: `normalize` refuses URLs and takes no library ids, so without this the only route to disk was `curl`. Local-only, like `normalize` / `crop` / `dimensions` — bytes go straight to disk, never through the backend.
|
|
2371
|
+
|
|
2372
|
+
Targets are space- or comma-separated and may mix both kinds. `--out` is a directory (which must exist) or, with a single target, an exact file path; it defaults to the working directory. Names that would collide are disambiguated, and the extension is derived from the response content type.
|
|
2373
|
+
|
|
2374
|
+
```bash
|
|
2375
|
+
baker images download https://media.withbaker.com/…/logo.webp
|
|
2376
|
+
baker images download j57abc123 j57def456 --out src/pages/pricing/_images/
|
|
2377
|
+
baker images download https://…/hero.png --out ./hero.png
|
|
2378
|
+
```
|
|
2379
|
+
|
|
2380
|
+
Response lists what landed and what didn't — a partial failure is still `ok: true`, with the failures in `failed[]` and a hint saying so. Every target failing is `DOWNLOAD_FAILED`. Passing a path that is already on disk is a `VALIDATION_ERROR` whose `fix` points at using the local transforms directly.
|
|
2381
|
+
|
|
2382
|
+
```json
|
|
2383
|
+
{
|
|
2384
|
+
"ok": true,
|
|
2385
|
+
"data": {
|
|
2386
|
+
"downloaded": [{ "input": "j57abc123", "output": "hero.png", "bytes": 84213, "contentType": "image/png" }],
|
|
2387
|
+
"failed": []
|
|
2388
|
+
}
|
|
2389
|
+
}
|
|
2390
|
+
```
|
|
2391
|
+
|
|
2317
2392
|
### `baker videos search <query>`
|
|
2318
2393
|
|
|
2319
2394
|
Semantic search videos.
|
|
@@ -2709,12 +2784,15 @@ baker actions unlink --blocker <id> --blocked <id>
|
|
|
2709
2784
|
|
|
2710
2785
|
# Review and edit the ops staged in THIS chat before publish
|
|
2711
2786
|
baker actions draft # show every staged op + footgun warnings
|
|
2787
|
+
baker actions draft --output md # one row per staged op (json default | md | files)
|
|
2788
|
+
baker actions draft --output md --fields kind,name,ref,tags # pick the columns
|
|
2789
|
+
baker actions draft --output md --full # add each op's payload (description, note, reason, blocker)
|
|
2712
2790
|
baker actions draft remove temp_hero # drop a staged create (cascades its complete/link ops)
|
|
2713
2791
|
baker actions draft remove <id> --op complete # drop a staged op on a real action (--op update|complete|discard)
|
|
2714
2792
|
baker actions draft clear # drop everything staged in this chat
|
|
2715
2793
|
```
|
|
2716
2794
|
|
|
2717
|
-
`baker actions draft` is the detailed, op-by-op view of staged (pre-publish) ops plus footgun `warnings`, and the place to edit the draft (`draft remove`/`clear`). The bucketed `list` and a chat-scoped `status` also surface this chat's draft (staged creates, `draftStatus` markers, `draft` ref status), so `draft` is mainly for the full changelog and edits. Do not stage `complete` to cancel an unwanted action — that publishes it as an already-completed item; remove the staged create (or `discard` a published action) instead.
|
|
2795
|
+
`baker actions draft` is the detailed, op-by-op view of staged (pre-publish) ops plus footgun `warnings`, and the place to edit the draft (`draft remove`/`clear`). It takes the same `--output json|md|files` / `--fields` / `--full` trio as the other list commands: `json` (the default) keeps the full envelope with status, count and warnings, while `md` and `files` render one row per op — `kind`, `name`, `ref`, `tags` by default, where `ref` is the handle the next command needs (the tempId for a staged create, the real action id for an op against a published one). An unrecognized `--output` is rejected rather than silently printing nothing. The bucketed `list` and a chat-scoped `status` also surface this chat's draft (staged creates, `draftStatus` markers, `draft` ref status), so `draft` is mainly for the full changelog and edits. Do not stage `complete` to cancel an unwanted action — that publishes it as an already-completed item; remove the staged create (or `discard` a published action) instead.
|
|
2718
2796
|
|
|
2719
2797
|
`baker actions status <ref...>` resolves refs in one request to `/api/actions/status`. It works without `BAKER_CHAT_ID`, but when the CLI has a chat id it includes it so a temp still staged in **that** chat resolves to `status: "draft"` instead of `not_found` (only the caller's own chat draft is consulted). It preserves the backend JSON envelope:
|
|
2720
2798
|
|
|
@@ -5146,6 +5224,7 @@ baker landing inspiration search "pricing with a monthly/annual toggle" --scope
|
|
|
5146
5224
|
baker landing inspiration view <section id> # full DNA + screenshots + motion filmstrip
|
|
5147
5225
|
baker landing inspiration code <section id> # the standalone bundle
|
|
5148
5226
|
baker landing inspiration page <source id> # a whole page as a section sequence
|
|
5227
|
+
baker landing inspiration sequences "b2b saas pricing page" --scope all # what follows what, across many pages
|
|
5149
5228
|
baker landing inspiration add https://linear.app --note "client likes this density"
|
|
5150
5229
|
baker landing inspiration favorites # what this company has saved
|
|
5151
5230
|
baker landing inspiration scrape <url> --out <dir> # capture any page now, synchronously
|
|
@@ -5159,6 +5238,7 @@ baker landing inspiration scrape <url> --out <dir> # capture any page now, syn
|
|
|
5159
5238
|
- **`add` refuses a page Baker already serves**, along with preview and private addresses. For our own pages the source is in the workspace, so a capture would file a screenshot and reconstructed markup next to the real thing — and because the corpus is shared, a live client page admitted here would be readable by every other company.
|
|
5160
5239
|
- **`add` and `favorite` are recorded on the chat as a "Reference page" change, marked already applied.** The save and the study both happen immediately; there is nothing left for publish to apply and nothing a discard takes back.
|
|
5161
5240
|
- **Compact by default, `--full` when you have chosen something.** Every list command returns what you need to *pick* a row; the 600-character "why it works" paragraph, the classification facets and the markup ride behind `--full` on `search`, `view`, `page`, `favorites` and `code`. A default `favorites` used to cost more than a default search for a question — "what does this client keep saving?" — that the facets alone answer.
|
|
5241
|
+
- **`sequences` answers the ordering question search structurally can't.** Search ranks individual sections and caps each site at three, so a page's top-to-bottom order never survives its results, and `page` recovers exactly one page's order. `sequences` counts adjacency across many pages at once and returns `openers`, `transitions` (`{ from, to, count }`, most frequent first) and `closers`, filtered by `--scope --domain --section-type --limit`. It returns page **ids only** — `page` stays the one way to read a single page — and always reports `pages_considered` alongside `pages_returned`, because a frequency over an unstated denominator is not evidence. `--full` counts over every matching page and prints the whole table.
|
|
5162
5242
|
- **`page_id` on every search row** is what `page <id>` takes, so "how does this page sequence its sections?" is reachable from a result rather than only right after `add`. `favorites --limit` is capped at 100.
|
|
5163
5243
|
- **`add` studies in the background; `scrape` returns with the page on disk.** `add` grows the shared library and takes minutes, so it can never answer "build our page like this one" within the same turn. `scrape` runs the identical capture locally and blocks until it finishes, writing section screenshots, standalone markup, a whole-page reproduction and `report.html`. `--no-motion` is the single biggest lever on runtime; `--no-mobile`, `--no-code` and `--no-report` skip further passes.
|
|
5164
5244
|
- **Filming is the expensive pass, and it runs three sections at a time.** Every moving section is filmed in its own fresh page load — the only way to catch an entrance animation before it fires — so a page with ten moving sections pays for ten full loads. Measured on one heavy page, filming was 74% of the capture. The takes are independent, so they overlap; a page that cannot be captured inside the library's budget now says so instead of timing out silently.
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
__toESM
|
|
8
8
|
} from "./chunk-YL3HDEIJ.js";
|
|
9
9
|
|
|
10
|
-
//
|
|
10
|
+
// ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
|
|
11
11
|
var require_safe_stable_stringify = __commonJS({
|
|
12
|
-
"
|
|
12
|
+
"../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
|
|
13
13
|
"use strict";
|
|
14
14
|
var { hasOwnProperty } = Object.prototype;
|
|
15
15
|
var stringify = configure2();
|
|
@@ -1083,7 +1083,7 @@ function resolveAdaptFormats(params) {
|
|
|
1083
1083
|
return params.formats ?? [];
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
|
-
//
|
|
1086
|
+
// ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
|
|
1087
1087
|
var import__ = __toESM(require_safe_stable_stringify(), 1);
|
|
1088
1088
|
var configure = import__.default.configure;
|
|
1089
1089
|
var wrapper_default = import__.default;
|
|
@@ -8376,4 +8376,4 @@ export {
|
|
|
8376
8376
|
defaultRegistry,
|
|
8377
8377
|
createEngineFromEnv
|
|
8378
8378
|
};
|
|
8379
|
-
//# sourceMappingURL=chunk-
|
|
8379
|
+
//# sourceMappingURL=chunk-IDRQDUBA.js.map
|