@koda-sl/baker-cli 0.184.0-dev.0155730c3 → 0.185.0-dev.423b46fd1
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 +13 -0
- package/dist/cli.js +19 -3
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -3011,6 +3011,19 @@ baker studio skills
|
|
|
3011
3011
|
|
|
3012
3012
|
Compact output per take is `{ slot, status, imageId | videoId, url, inLibrary, error }` alongside the batch's prompt, model, aspect ratio and status; `--full` adds the settings echo, the reference ids, the chat id and `createdAt`. `keep` stars an image (it was already in the library) and **ingests** a clip; `--undo` reverses either.
|
|
3013
3013
|
|
|
3014
|
+
**Craft presets.** `--skill <id>` appends ready-written art direction to your brief — camera, lens, light, plus a clean-plate rule (no text, logos or overlays in the picture; type is composited afterwards) and a preference for physical cause over adjective.
|
|
3015
|
+
|
|
3016
|
+
| `--skill` | Model it picks | Shape | Takes | Wants a reference |
|
|
3017
|
+
|---|---|---|---|---|
|
|
3018
|
+
| `product-pack-shot` | `openai/gpt-image-2` | `1:1` | 3 | **yes** |
|
|
3019
|
+
| `ugc-selfie-hook` | `openai/gpt-image-2` | `9:16` | 3 | **yes** |
|
|
3020
|
+
| `lifestyle-scene` | `openai/gpt-image-2` | `4:5` | 3 | **yes** |
|
|
3021
|
+
| `cinematic-still` | `google/gemini-3-pro-image-preview` | `16:9` | 3 | no |
|
|
3022
|
+
| `brand-icon` | `recraft/recraft-v4.1-pro-vector` | `1:1` | 4 | no |
|
|
3023
|
+
| `background-plate` | `google/gemini-3.1-flash-image-preview` | `4:5` | 3 | no |
|
|
3024
|
+
|
|
3025
|
+
A skill fills only what you did **not** pin — `--model`, `--aspect-ratio` and `--count` always win. Which means a skill can change the model, and the model decides what the rest of the flags may be: `--skill brand-icon` lands on Recraft, so it takes one reference image rather than fourteen, refuses `--image-size`, and writes SVG that cannot be fed back in as a reference. The CLI resolves the skill's model before checking the reference count, so an over-long `--reference` list is refused before anything is uploaded.
|
|
3026
|
+
|
|
3014
3027
|
## Creative Canvas
|
|
3015
3028
|
|
|
3016
3029
|
The creative canvas runs declarative JSON pipelines. You author a graph of nodes (text, image, video, audio, composition, control-flow), `baker canvas run` it, and every node's output drops to disk under `canvas/<run_id>/` so you can watch progress and consume the artifacts.
|
package/dist/cli.js
CHANGED
|
@@ -34671,6 +34671,12 @@ function projectBatch(generation, full) {
|
|
|
34671
34671
|
createdAt: generation.createdAt
|
|
34672
34672
|
};
|
|
34673
34673
|
}
|
|
34674
|
+
function slotArg(candidates) {
|
|
34675
|
+
return candidates.length === 1 ? `--slot ${candidates[0]?.slot}` : "--slot <n>";
|
|
34676
|
+
}
|
|
34677
|
+
function chooseFirst(candidates) {
|
|
34678
|
+
return candidates.length === 1 ? "" : " Look at the takes and pick one \u2014 do not default to the first.";
|
|
34679
|
+
}
|
|
34674
34680
|
function batchHints(generation) {
|
|
34675
34681
|
const id = generation.generationId;
|
|
34676
34682
|
if (generation.status === "running") {
|
|
@@ -34686,13 +34692,13 @@ function batchHints(generation) {
|
|
|
34686
34692
|
'Every rendered image is already in the media library and searchable \u2014 `baker images library "<what it shows>"` finds it, and you can use its image id straight away.'
|
|
34687
34693
|
);
|
|
34688
34694
|
hints.push(
|
|
34689
|
-
`Mark the take you are using: \`baker studio keep ${id}
|
|
34695
|
+
`Mark the take you are using: \`baker studio keep ${id} ${slotArg(ready)}\` stars it so the client reviews the right one.${chooseFirst(ready)}`
|
|
34690
34696
|
);
|
|
34691
34697
|
}
|
|
34692
34698
|
const unkeptClips = ready.filter((variant) => !variant.inLibrary);
|
|
34693
34699
|
if (generation.kind === "video" && unkeptClips.length > 0) {
|
|
34694
34700
|
hints.push(
|
|
34695
|
-
`A clip is not usable anywhere \u2014 canvas, landing, ad \u2014 until you keep it. \`baker studio keep ${id}
|
|
34701
|
+
`A clip is not usable anywhere \u2014 canvas, landing, ad \u2014 until you keep it. \`baker studio keep ${id} ${slotArg(unkeptClips)}\` puts it in the video library; takes nobody keeps are never ingested.${chooseFirst(unkeptClips)}`
|
|
34696
34702
|
);
|
|
34697
34703
|
}
|
|
34698
34704
|
if (generation.status === "partial" && failed.length > 0) {
|
|
@@ -35229,6 +35235,15 @@ function referenceLimitFor(model) {
|
|
|
35229
35235
|
refuse: (count) => max === 1 ? `${label} takes exactly one reference image \u2014 you passed ${count}. Pick the one that matters, or switch to a model that reads several.` : `${label} takes up to ${max} reference images \u2014 you passed ${count}. Drop the weakest ones.`
|
|
35230
35236
|
};
|
|
35231
35237
|
}
|
|
35238
|
+
async function effectiveModel(pinned, skillId, fetchSkills = () => apiGet("/api/studio/skills")) {
|
|
35239
|
+
if (pinned || !skillId) return pinned;
|
|
35240
|
+
try {
|
|
35241
|
+
const { skills } = await fetchSkills();
|
|
35242
|
+
return skills.find((skill) => skill.id === skillId)?.defaults.model;
|
|
35243
|
+
} catch {
|
|
35244
|
+
return void 0;
|
|
35245
|
+
}
|
|
35246
|
+
}
|
|
35232
35247
|
function buildGenerateBody(args, prompt) {
|
|
35233
35248
|
const body = { prompt };
|
|
35234
35249
|
if (args.model) body.model = args.model;
|
|
@@ -35293,7 +35308,8 @@ var generateCommand = defineCommand164({
|
|
|
35293
35308
|
}
|
|
35294
35309
|
const body = buildGenerateBody(args, prompt);
|
|
35295
35310
|
if (args.reference) {
|
|
35296
|
-
const
|
|
35311
|
+
const model = await effectiveModel(body.model, body.skillId);
|
|
35312
|
+
const { imageIds } = await resolveLibraryImageIds(args.reference, referenceLimitFor(model));
|
|
35297
35313
|
if (imageIds.length > 0) body.referenceImageIds = imageIds;
|
|
35298
35314
|
}
|
|
35299
35315
|
const start = await apiPost("/api/studio/generate", body);
|