@koda-sl/baker-cli 0.68.0 → 0.70.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 CHANGED
@@ -1587,6 +1587,8 @@ Each external source is its own subcommand. Pick the verb that matches the sourc
1587
1587
  | `baker images find <q>` | Fanout: library + opted-in providers | off |
1588
1588
  | `baker images stock <q> [--type photo\|vector\|psd]` | Magnific (Freepik's dev API) — photos, vectors, illustrations, PSDs (~250M assets) | off |
1589
1589
  | `baker images google <q>` | Google Images via the official Custom Search JSON API | off |
1590
+ | `baker images pinterest <q>` | Pinterest reference imagery via ScrapeCreators (photo-real mood boards) | off |
1591
+ | `baker images generate <prompt>` | AI image generation via OpenRouter image models (cost-tracked) | **always on** (the bytes are the artifact) |
1590
1592
  | `baker images logo <domain>` | Brand logo via Brandfetch CDN | **on** (top 1) |
1591
1593
  | `baker images icon <name>` | Iconify (200+ icon sets, no API key) | off (CDN URL is stable) |
1592
1594
  | `baker images gif <q>` | Reaction GIFs / memes via Giphy (paid-social creative) | off |
@@ -1726,6 +1728,69 @@ Requires both `GOOGLE_CUSTOM_SEARCH_API_KEY` and `GOOGLE_CUSTOM_SEARCH_ENGINE_ID
1726
1728
  | `--auto-ingest` | Ingest top N (0–20, default 0) and return Baker-owned URLs on ingested hits |
1727
1729
  | `--context` | Free-text hint passed to Gemini describe to bias the generated description and tags (overrides provider-derived context on auto-ingest paths) |
1728
1730
 
1731
+ ### `baker images pinterest <query>`
1732
+
1733
+ Pinterest image search via ScrapeCreators. The best source for **photo-real reference and mood imagery** — interiors, fashion, food, product styling, lifestyle. ⚠ Unverified, trademark-bearing web content — use for *reference*, not republishing. Strongest paired with `generate --reference` (find the look on Pinterest, then generate an owned, on-brand image from it). Auto-ingest is opt-in.
1734
+
1735
+ ```bash
1736
+ baker images pinterest "scandinavian living room"
1737
+ baker images pinterest "minimalist skincare product photography" --limit 20
1738
+ baker images pinterest "cozy coffee shop interior" --auto-ingest 2 --context "Mood reference for hero photography"
1739
+ ```
1740
+
1741
+ **Flags:**
1742
+
1743
+ | Flag | Description |
1744
+ |-----------------|----------------------------------------------------------------------------|
1745
+ | `--limit` | Max results (1–20, default 5) |
1746
+ | `--auto-ingest` | Ingest top N (0–20, default 0) and return Baker-owned URLs on ingested hits |
1747
+ | `--context` | Free-text hint passed to Gemini describe on auto-ingest (overrides the pin title) |
1748
+
1749
+ Endpoint `api.scrapecreators.com/v1/pinterest/search` (`SCRAPE_CREATORS_API_KEY`), $0.00188/request, 1-day cache.
1750
+
1751
+ ### `baker images generate <prompt>`
1752
+
1753
+ Generate an image with AI (OpenRouter image models) and ingest it into the library. The generated bytes **are** the artifact, so the result is always auto-ingested (described + embedded) — the next `baker images library` query finds it. Cost is tracked per request via OpenRouter's reported usage. Models and defaults mirror the Baker canvas.
1754
+
1755
+ ```bash
1756
+ baker images generate "a friendly golden retriever in a bright modern living room" --aspect-ratio 16:9
1757
+ baker images generate "hero shot of a matte black water bottle on wet marble, studio light" \
1758
+ --model google/gemini-3-pro-image-preview --image-size 2K --aspect-ratio 4:5
1759
+ baker images generate "home office hero, warm minimalist, natural light, 35mm photo" \
1760
+ --reference "https://i.pinimg.com/…/pin1.jpg,https://…/brand-product.png"
1761
+ baker images generate "put this product on a marble countertop in soft daylight" \
1762
+ --reference "./src/brand/logos/product.png,./refs/kitchen-mood.jpg" # local sandbox files
1763
+ baker images generate "flat geometric mascot, brand palette" \
1764
+ --model recraft/recraft-v4.1-pro-vector --rgb-colors "[[10,10,10],[255,80,0]]" --bg-rgb "[255,255,255]"
1765
+ ```
1766
+
1767
+ **Models** (`--model`, default `openai/gpt-5.4-image-2`):
1768
+
1769
+ | Model | Best for | Aspect ratios | Sizes |
1770
+ |---|---|---|---|
1771
+ | `openai/gpt-5.4-image-2` **(default)** | Photoreal + cleanest in-image text — ad/landing reproduction | standard set | `1K` `2K` `4K` |
1772
+ | `google/gemini-3-pro-image-preview` | Highest fidelity (Nano Banana Pro) | standard set | `1K` `2K` `4K` |
1773
+ | `google/gemini-3.5-flash` | Fast; extreme aspect ratios | standard **+** `1:4` `4:1` `1:8` `8:1` | `0.5K`–`4K` |
1774
+ | `google/gemini-3.1-flash-image-preview` | Same as 3.5 flash (preview) | extreme set | `0.5K`–`4K` |
1775
+ | `recraft/recraft-v4.1-pro-vector` | Vector/flat/SVG-style with palette control | standard set | `1K` `2K` `4K` |
1776
+
1777
+ Standard aspect ratios: `1:1` `2:3` `3:2` `3:4` `4:3` `4:5` `5:4` `9:16` `16:9` `21:9`.
1778
+
1779
+ **Flags:**
1780
+
1781
+ | Flag | Description |
1782
+ |---|---|
1783
+ | `--model` | Model id (default `openai/gpt-5.4-image-2`) |
1784
+ | `--aspect-ratio` | Output aspect ratio (default `1:1`) |
1785
+ | `--image-size` | Resolution: `1K` (default) `2K` `4K` (Gemini flash also `0.5K`) |
1786
+ | `--reference` | Comma-separated visual references, each either a **public image URL** (Pinterest / stock / library `imageUrl`) **or a local file path** (a sandbox image — brand logo, product shot, cropped photo, screenshot). Local files are downscaled (≤1536px) and inlined automatically — no manual upload. Applied in order; the biggest quality lever for photographed, on-brand output. Split is on `,`, so a URL containing a literal comma in its query string would be torn in two (rare for image CDNs — pass it alone if it occurs); a single `data:` URL is taken whole. |
1787
+ | `--strength` | Recraft only: vectorization strength 0–1 |
1788
+ | `--rgb-colors` | Recraft only: JSON palette `[[r,g,b],…]` |
1789
+ | `--bg-rgb` | Recraft only: JSON background `[r,g,b]` |
1790
+ | `--context` | Describe-hint override for the ingested row (defaults to the prompt) |
1791
+
1792
+ Returns `{ images: [{ imageId, imageUrl, deduped, width, height }], model, costUsd }`. `imageUrl` is library-owned and ready to place. Requires `OPENROUTER_API_KEY` on the Convex deployment. No `seed` (OpenRouter image_config has no seed slot). Identical re-generations dedup by content hash.
1793
+
1729
1794
  ### `baker images logo <domain>`
1730
1795
 
1731
1796
  Brand logo via Brandfetch CDN (`fallback/404`). Probes all 5 logo variants in parallel and returns whichever ones the domain actually publishes. Auto-ingests the first by default.
@@ -917,6 +917,13 @@ var FAL_IMAGE_MIMES = ["image/png", "image/jpeg", "image/webp"];
917
917
  var FAL_VIDEO_MIMES = ["video/mp4", "video/webm", "video/quicktime"];
918
918
  var DECONSTRUCT_VIDEO_MIMES = ["video/mp4", "video/webm", "video/quicktime"];
919
919
  var FAL_AUDIO_MIMES = ["audio/wav", "audio/mpeg", "audio/mp3"];
920
+ var IMAGE_GENERATE_MODELS = [
921
+ "openai/gpt-5.4-image-2",
922
+ "google/gemini-3.5-flash",
923
+ "google/gemini-3.1-flash-image-preview",
924
+ "google/gemini-3-pro-image-preview",
925
+ "recraft/recraft-v4.1-pro-vector"
926
+ ];
920
927
  var MODEL_REGISTRY = {
921
928
  text_generate: {
922
929
  "~google/gemini-flash-latest": {
@@ -4813,7 +4820,7 @@ var dialogueNode = delegated({
4813
4820
 
4814
4821
  // src/engine/nodes/remote/image.ts
4815
4822
  import { z as z15 } from "zod";
4816
- var IMAGE_GENERATE_MODELS = [
4823
+ var IMAGE_GENERATE_MODELS2 = [
4817
4824
  "openai/gpt-5.4-image-2",
4818
4825
  "google/gemini-3.5-flash",
4819
4826
  "google/gemini-3.1-flash-image-preview",
@@ -4821,7 +4828,7 @@ var IMAGE_GENERATE_MODELS = [
4821
4828
  "recraft/recraft-v4.1-pro-vector"
4822
4829
  ];
4823
4830
  var ImageGenerateParams = z15.object({
4824
- model: z15.enum(IMAGE_GENERATE_MODELS),
4831
+ model: z15.enum(IMAGE_GENERATE_MODELS2),
4825
4832
  prompt: z15.string().min(1),
4826
4833
  aspect_ratio: z15.enum(["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "4:5", "5:4", "21:9", "1:4", "4:1", "1:8", "8:1"]).optional(),
4827
4834
  image_size: z15.enum(["0.5K", "1K", "2K", "4K"]).optional(),
@@ -5648,6 +5655,7 @@ function createEngineFromEnv(opts = {}) {
5648
5655
  export {
5649
5656
  SEEDANCE_DURATIONS,
5650
5657
  ELEVENLABS_MAX_MUSIC_LENGTH_MS,
5658
+ IMAGE_GENERATE_MODELS,
5651
5659
  MODEL_REGISTRY,
5652
5660
  BackendClient2 as BackendClient,
5653
5661
  Engine2 as Engine,
@@ -5659,4 +5667,4 @@ export {
5659
5667
  defaultRegistry,
5660
5668
  createEngineFromEnv
5661
5669
  };
5662
- //# sourceMappingURL=chunk-K6LHXCKD.js.map
5670
+ //# sourceMappingURL=chunk-XFDZVKLF.js.map