@koda-sl/baker-cli 0.249.0-dev.e7a1a227e → 0.250.0-dev.5db6c10ee

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
@@ -1977,7 +1977,7 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
1977
1977
  |---|---|---|
1978
1978
  | `baker images library <q>` | Hybrid library search (replaces `search`) | n/a |
1979
1979
  | `baker images find <q>` | Fanout: library + opted-in providers | off |
1980
- | `baker images stock <q> [--type photo\|vector\|psd]` | Magnific (Freepik's dev API)photos, vectors, illustrations, PSDs (~250M assets) | off |
1980
+ | `baker images stock <q> [--type photo\|illustration\|vector]` | Free stock across two libraries Pexels photographs, Pixabay illustrations and vectors | off |
1981
1981
  | `baker images google <q>` | Google Images via the official Custom Search JSON API | off |
1982
1982
  | `baker images pinterest <q>` | Pinterest reference imagery via ScrapeCreators (photo-real mood boards) | off |
1983
1983
  | `baker images logo <domain>` | Brand logo via Brandfetch CDN | **on** (top 1) |
@@ -2002,7 +2002,7 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
2002
2002
 
2003
2003
  **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.
2004
2004
 
2005
- **Provider context biases the description.** When a hit carries human-readable text (Giphy `alt_text` / `title`, Magnific `title`, Brandfetch type+theme, etc.) it's surfaced on the hit as `descriptionContext` and forwarded to Gemini during auto-ingest as a hint — Gemini still trusts the pixels (e.g. it'll correct a wrong botanical name) but uses the hint for cultural/brand/scene awareness it can't infer from bytes alone.
2005
+ **Provider context biases the description.** When a hit carries human-readable text (Giphy `alt_text` / `title`, Pexels `alt`, Pixabay `tags`, Brandfetch type+theme, etc.) it's surfaced on the hit as `descriptionContext` and forwarded to Gemini during auto-ingest as a hint — Gemini still trusts the pixels (e.g. it'll correct a wrong botanical name) but uses the hint for cultural/brand/scene awareness it can't infer from bytes alone.
2006
2006
 
2007
2007
  **`--context` is available on every command that adds an image to the library** — `ingest`, `use`, `upload`, `find`, `extract`, `screenshot`, `logo`, `stock`, `google`, `icon`, `gif`, `sticker`. On auto-ingest paths it **overrides** the provider-derived `descriptionContext` for every hit that gets ingested. Especially valuable for brand-vs-competitor disambiguation — Gemini cannot tell from pixels alone whether an icon belongs to "Stripe (integration partner)" vs "Stripe (competitor)". Concrete cases:
2008
2008
 
@@ -2017,6 +2017,8 @@ baker images screenshot https://competitor.com/pricing --context "Competitor pri
2017
2017
 
2018
2018
  **`baker images search` is a deprecated alias** for `library` (stderr deprecation log, removed in next minor).
2019
2019
 
2020
+ **Migrating from Magnific:** `baker images stock` used to run on Magnific, Freepik's developer API. That provider is gone and the command now searches Pexels and Pixabay together. Consequences: it is free (no `image-magnific-search` credit line any more); `--type` survives as `photo|illustration|vector` (PSDs and mockups are the one thing genuinely lost); `--license`, `--ai`, `--people` and `--order` now fail with a fix naming the replacement rather than being silently dropped; and `--orientation` loses `panoramic` while `--size` and `--locale` are new. Library rows already ingested from Magnific keep `source: "magnific"`, stay searchable, and remain a valid `--source` filter; nothing writes that value any more.
2021
+
2020
2022
  **Migrating from Tenor:** the old `baker images meme` command and Tenor provider have been removed. Use `baker images gif` (Giphy) instead. Existing library rows ingested via Tenor remain stored with `source: "tenor"` but are no longer returned by `baker images find` and `--source tenor` is no longer a valid filter on `library`. Re-ingest via `baker images gif --auto-ingest N` if you need fresh equivalents.
2021
2023
 
2022
2024
  ### `baker images library <query>`
@@ -2026,7 +2028,7 @@ Search the company library (hybrid BM25 + vector + Cohere rerank). Use this FIRS
2026
2028
  ```bash
2027
2029
  baker images library "hero banner"
2028
2030
  baker images library "logo" --aspect-ratio 1:1 --tags logo
2029
- baker images library "office" --source magnific
2031
+ baker images library "office" --source pexels
2030
2032
  baker images library "pricing" --external-url-host competitor.com
2031
2033
  ```
2032
2034
 
@@ -2038,7 +2040,7 @@ baker images library "pricing" --external-url-host competitor.com
2038
2040
  | `--min-score` | Minimum relevance score, 0-1 |
2039
2041
  | `--aspect-ratio` | Filter by aspect ratio |
2040
2042
  | `--tags` | Comma-separated tag names |
2041
- | `--source` | Filter by source (uploaded, magnific, brandfetch, google_images, firecrawl, screenshotone, iconify, giphy, …) |
2043
+ | `--source` | Filter by source (uploaded, pexels, pixabay, brandfetch, google_images, firecrawl, screenshotone, iconify, giphy, …). `magnific` still filters the rows the retired stock provider left behind |
2042
2044
  | `--external-url-host` | Filter by host substring of `externalUrl` (e.g. competitor.com) |
2043
2045
  | `--output` | Output format: `json` \| `files` \| `md` |
2044
2046
  | `--fields` | Comma-separated field names to include |
@@ -2051,12 +2053,12 @@ baker images library "pricing" --external-url-host competitor.com
2051
2053
  Fanout image search: library first, then opted-in providers in parallel.
2052
2054
 
2053
2055
  ```bash
2054
- baker images find "office" --sources library,magnific --limit 20
2055
- baker images find "office" --sources library,magnific --fallback --threshold 0.4
2056
+ baker images find "office" --sources library,pexels,pixabay --limit 20
2057
+ baker images find "office" --sources library,pexels --fallback --threshold 0.4
2056
2058
  baker images find "celebration" --sources library,giphy --auto-ingest 3
2057
2059
  ```
2058
2060
 
2059
- Providers: `library`, `magnific`, `google`, `iconify`, `giphy`, `pinterest`. Brandfetch is not part of the fanout — it takes a domain, not a query, so it lives at `baker images logo <domain>`. (`pinterest` is photo-real/candid imagery — best for sourcing fresh people and sets, e.g. a recast creator or a pinned location in a video reproduction.) Response shape: `{ groups: { library, external }, ingested, meta: { counts, errors } }`. When `--auto-ingest` is used, `ingested[]` preserves successful external ingest order and matching external hits are enriched with the Baker-owned URL plus source provenance. Partial failures (one provider throws) return the successful providers plus a `meta.errors` array; the whole call never fails on a single provider error.
2061
+ Providers: `library`, `pexels`, `pixabay`, `google`, `iconify`, `giphy`, `pinterest`. Brandfetch is not part of the fanout — it takes a domain, not a query, so it lives at `baker images logo <domain>`. (`pinterest` is photo-real/candid imagery — best for sourcing fresh people and sets, e.g. a recast creator or a pinned location in a video reproduction.) Response shape: `{ groups: { library, external }, ingested, meta: { counts, errors } }`. When `--auto-ingest` is used, `ingested[]` preserves successful external ingest order and matching external hits are enriched with the Baker-owned URL plus source provenance. Partial failures (one provider throws) return the successful providers plus a `meta.errors` array; the whole call never fails on a single provider error.
2060
2062
 
2061
2063
  **Flags:**
2062
2064
 
@@ -2071,17 +2073,26 @@ Providers: `library`, `magnific`, `google`, `iconify`, `giphy`, `pinterest`. Bra
2071
2073
 
2072
2074
  ### `baker images stock <query>`
2073
2075
 
2074
- Stock search via **Magnific** Freepik's developer API (post-acquisition rebrand `api.magnific.com`, header `x-magnific-api-key`). One library, ~250M assets covering photos, vectors, illustrations, icon sets, mockups, PSDs.
2076
+ `stock` is **one verb over the free-stock class**, not one provider. It searches **Pexels** (`api.pexels.com`, raw key in `Authorization`, `PEXELS_API_KEY`) for photographs and **Pixabay** (`pixabay.com/api`, `key` query param, `PIXABAY_API_KEY`) for photographs plus illustrations and vector artwork, then interleaves and dedupes the two. Both APIs are free — the command costs nothing and reports no credit consumption.
2077
+
2078
+ They are one verb because they carry the same licence shape: everything either holds is free for commercial use, including a client's landing page and paid social, with no attribution required. They differ only in what they hold, and an agent should not have to know which library a picture lives in.
2075
2079
 
2076
2080
  ```bash
2077
2081
  baker images stock "minimalist office"
2078
- baker images stock "flat office workers" --type vector
2079
- baker images stock "hero photo of a kitchen" --type photo --orientation landscape --ai exclude
2080
- baker images stock "brand pattern" --color "#0a0a0a" --license freemium --auto-ingest 2
2081
- baker images stock "office reaction" --people only
2082
+ baker images stock "hero photo of a kitchen" --orientation landscape --size large
2083
+ baker images stock "flat office workers" --type illustration
2084
+ baker images stock "leaf outline mark" --type vector
2085
+ baker images stock "brand pattern" --color "#0a0a0a" --auto-ingest 2
2086
+ baker images stock "oficina luminosa" --locale es-ES
2082
2087
  ```
2083
2088
 
2084
- Free tier exists but watermarks previewspass `--license freemium` to filter to clean free assets explicitly.
2089
+ **A filter only one library understands narrows the search to that library** rather than being dropped `convex/imageProviders/stock/plan.ts` resolves this once. `--type illustration|vector` and a *named* `--color` are Pixabay-only; `--orientation square` and a *hex* `--color` are Pexels-only. Querying a library without a filter it cannot honour would return an unfiltered result against a filtered request, which reads as a right answer.
2090
+
2091
+ **A partial result says so.** If one library fails the other still answers, and the response carries `errors[]` plus a `hints` entry naming the library that dropped out — so a thin result reads as unproven rather than as "stock does not have this".
2092
+
2093
+ Credits ride on each hit's `providerMeta`: Pexels `photographer` / `photographerUrl`, Pixabay `contributor`. Neither licence requires attribution, but both ask that the source be shown where results are displayed, and `externalUrl` is that link.
2094
+
2095
+ **Two caveats worth knowing.** Pixabay's full-resolution raster (`imageURL`) and source SVG (`vectorURL`) need "full API access", requested free from Pixabay; without it a hit falls back to the 1280px file, which is thin for a hero. And Pixabay's terms require results to be cached 24h — the provider's `DAY` action cache is what satisfies that, so don't shorten it.
2085
2096
 
2086
2097
  An empty result comes back with `hints` naming the filters that narrowed the search plus the fallbacks (`baker images find --sources …`, `baker studio generate`); a provider failure returns an `error.fix` pointing at the same exits. `baker images google` does the same, minus the cross-provider fallback (it is the last-resort provider).
2087
2098
 
@@ -2089,14 +2100,12 @@ An empty result comes back with `hints` naming the filters that narrowed the sea
2089
2100
 
2090
2101
  | Flag | Description |
2091
2102
  |------------------|--------------------------------------------------------------------------------------------|
2092
- | `--type` | Content type: `photo \| vector \| psd` |
2093
- | `--orientation` | `landscape \| portrait \| square \| panoramic` |
2094
- | `--license` | `freemium` (free with attribution) or `premium` (paid, watermark-free) |
2095
- | `--color` | Hex color filter (`#0a0a0a` or `0a0a0a`) |
2096
- | `--ai` | AI-generated filter: `exclude` or `only` (default: no filter) |
2097
- | `--people` | People-in-image filter: `include` \| `exclude` \| `only` |
2098
- | `--order` | `relevance` (default) or `recent` |
2099
- | `--limit` | Max results (1–50, default 10) |
2103
+ | `--type` | `photo` (default, both libraries) \| `illustration` \| `vector` (Pixabay only) |
2104
+ | `--orientation` | `landscape \| portrait \| square` (`square` is Pexels only) |
2105
+ | `--size` | Minimum resolution: `large` (24MP) \| `medium` (12MP) \| `small` (4MP) |
2106
+ | `--color` | Colour name (`red`, `turquoise`, `black`, …; both libraries) or hex (`#0a0a0a`; Pexels only) |
2107
+ | `--locale` | Locale of the search terms, e.g. `es-ES`, `de-DE` Pexels matches translated tags |
2108
+ | `--limit` | Max results (1–80, default 10) |
2100
2109
  | `--page` | Page number for pagination |
2101
2110
  | `--auto-ingest` | Ingest top N hits (0–20, default 0) and return Baker-owned URLs on ingested hits |
2102
2111
  | `--context` | Free-text hint passed to Gemini describe to bias the generated description and tags (overrides provider-derived context on auto-ingest paths) |
@@ -2326,11 +2335,11 @@ If the target page is unreachable or returns a non-2xx status (e.g. a 404 path o
2326
2335
  Download a remote URL and store it in the library. Byte-exact deduped via sha256 + externalId, then queued for describe + embed.
2327
2336
 
2328
2337
  ```bash
2329
- baker images ingest https://img.freepik.com/free-photo/xyz.jpg --source magnific --external-id 12345
2338
+ baker images ingest https://images.pexels.com/photos/13219418/pexels-photo-13219418.jpeg --source pexels --external-id 13219418
2330
2339
  baker images ingest https://acme.com/hero.png --source firecrawl --external-url https://acme.com/pricing --context "competitor pricing hero"
2331
2340
  ```
2332
2341
 
2333
- `--source` is a closed set, validated before the request so a wrong value costs nothing: `uploaded`, `website`, `google_testimonial`, `trustpilot_testimonial`, `instagram`, `magnific`, `brandfetch`, `google_images`, `firecrawl`, `screenshotone`, `iconify`, `giphy`, `pinterest`, `ai_generated`, `layer_edit`. Use `website` for an asset pulled off a company's own site.
2342
+ `--source` is a closed set, validated before the request so a wrong value costs nothing: `uploaded`, `website`, `google_testimonial`, `trustpilot_testimonial`, `instagram`, `pexels`, `pixabay`, `magnific` (retired provider, kept for existing rows), `brandfetch`, `google_images`, `firecrawl`, `screenshotone`, `iconify`, `giphy`, `pinterest`, `ai_generated`, `layer_edit`. Use `website` for an asset pulled off a company's own site.
2334
2343
 
2335
2344
  Returns `{ imageId, deduped, contentHash }`. When `deduped: true`, an existing library row is returned — no new bytes are stored. Max ingest size 25MB.
2336
2345
 
@@ -2338,7 +2347,7 @@ Returns `{ imageId, deduped, contentHash }`. When `deduped: true`, an existing l
2338
2347
 
2339
2348
  | Flag | Description |
2340
2349
  |------------------|--------------------------------------------------------------------------------------------|
2341
- | `--source` | **Required.** Source enum (`uploaded`, `magnific`, `brandfetch`, `google_images`, `firecrawl`, `screenshotone`, `iconify`, `giphy`, `instagram`, …) |
2350
+ | `--source` | **Required.** Source enum (`uploaded`, `pexels`, `pixabay`, `brandfetch`, `google_images`, `firecrawl`, `screenshotone`, `iconify`, `giphy`, `instagram`, …) |
2342
2351
  | `--external-id` | Provider asset id — enables per-source dedup before bytes are fetched |
2343
2352
  | `--external-url` | Canonical page URL (parent page for scraped/Google hits, provider page for stock) |
2344
2353
  | `--context` | Free-text hint passed to Gemini describe to bias the generated description and tags |
@@ -2402,7 +2411,7 @@ Local-mode supported extensions: `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.svg
2402
2411
 
2403
2412
  | Flag | Mode | Description |
2404
2413
  |------------------|--------|--------------------------------------------------------------------------------------------|
2405
- | `--source` | both | Source enum (default `uploaded`). For remote URLs prefer `firecrawl`, `magnific`, etc. to match the origin |
2414
+ | `--source` | both | Source enum (default `uploaded`). For remote URLs prefer `firecrawl`, `pexels`, etc. to match the origin |
2406
2415
  | `--content-type` | local | MIME type override (default: inferred from file extension). Ignored for URLs |
2407
2416
  | `--external-id` | remote | Provider asset id — enables per-source dedup before bytes are fetched |
2408
2417
  | `--external-url` | remote | Canonical page URL (parent page for scraped/Google hits, provider page for stock) |
@@ -16,9 +16,9 @@ import {
16
16
  shouldEscalate
17
17
  } from "./chunk-DZUVUGEP.js";
18
18
 
19
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js
19
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js
20
20
  var require_safe_stable_stringify = __commonJS({
21
- "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/index.js"(exports, module) {
21
+ "../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/index.js"(exports, module) {
22
22
  "use strict";
23
23
  var { hasOwnProperty } = Object.prototype;
24
24
  var stringify = configure2();
@@ -1092,7 +1092,7 @@ function resolveAdaptFormats(params) {
1092
1092
  return params.formats ?? [];
1093
1093
  }
1094
1094
 
1095
- // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/810146e81bae4e3a061fe487864f2fde80c4b03b886877dc0f1fffbc6480b67e/node_modules/safe-stable-stringify/esm/wrapper.js
1095
+ // ../../.pnpm-store/v10/links/@/safe-stable-stringify/2.5.0/509a695c9237c6e3727f1f1f99169917f329e3ff3f7877be290b684e24bf153d/node_modules/safe-stable-stringify/esm/wrapper.js
1096
1096
  var import__ = __toESM(require_safe_stable_stringify(), 1);
1097
1097
  var configure = import__.default.configure;
1098
1098
  var wrapper_default = import__.default;
@@ -9154,4 +9154,4 @@ export {
9154
9154
  defaultRegistry,
9155
9155
  createEngineFromEnv
9156
9156
  };
9157
- //# sourceMappingURL=chunk-VLNO5AUC.js.map
9157
+ //# sourceMappingURL=chunk-77OP3PDC.js.map