@clickraft/cli 0.11.2 → 0.13.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/CHANGELOG.md CHANGED
@@ -1,9 +1,16 @@
1
- ## [0.11.2](https://github.com/clickraft/cli/compare/v0.11.1...v0.11.2) (2026-06-21)
1
+ ## [0.13.0](https://github.com/clickraft/cli/compare/v0.12.0...v0.13.0) (2026-08-08)
2
+
3
+ ### Features
4
+
5
+ * **cli:** add product create ([fe46251](https://github.com/clickraft/cli/commit/fe4625100ae9af7571e0b97156d58eba59e9aea1))
6
+ * **cli:** request products:write at login and degrade when the server refuses it ([a8b6db2](https://github.com/clickraft/cli/commit/a8b6db24d2789df834bffdf6290cb1bebd41116c))
7
+ * **errors:** recognize the five product-create error codes ([9e0aef4](https://github.com/clickraft/cli/commit/9e0aef4a3eb0cf188b1016f70b7c326b14b7cd8b))
8
+ * **mcp:** add the product_create tool ([f725172](https://github.com/clickraft/cli/commit/f725172c9df13af80c244c93506036c178008284))
9
+ * **sdk:** add the product create request contract ([75ae3c7](https://github.com/clickraft/cli/commit/75ae3c78b011b5278a21da75d247e7452e2c630c))
2
10
 
3
11
  ### Bug Fixes
4
12
 
5
- * **sdk:** accept input.width/height in GenerateCreateRequestSchema ([6f92a22](https://github.com/clickraft/cli/commit/6f92a22f8152ce48bbb7ce95e1f4c3134fe81b5d)), closes [#3](https://github.com/clickraft/cli/issues/3)
6
- * **sdk:** widen declaredParams required (optional) + defaultValue (any-typed) to match server ([03eb961](https://github.com/clickraft/cli/commit/03eb961f9c05272c96cbb7de8667ef0222e08691)), closes [#5](https://github.com/clickraft/cli/issues/5) [#6](https://github.com/clickraft/cli/issues/6) [#N](https://github.com/clickraft/cli/issues/N) [5/#6](https://github.com/5/cli/issues/6)
13
+ * **cli:** point the insufficient-scope hint at login --force-reauth ([398abd3](https://github.com/clickraft/cli/commit/398abd3ba7928706faf7f505038c4b52361b4a68))
7
14
 
8
15
  # Changelog
9
16
 
@@ -11,6 +18,30 @@ All notable changes to the Clickraft CLI are documented here.
11
18
 
12
19
  ## Unreleased
13
20
 
21
+ ### Added
22
+
23
+ - **`generate create --start-frame <url|path>`** — sets the image-to-video start
24
+ frame. It is emitted as the scalar `referenceImageUrl`, which the server maps
25
+ to `start_image`. Accepts an http(s) URL or a local path (auto-uploaded, like
26
+ `--reference-image`).
27
+
28
+ ### Changed
29
+
30
+ - **BREAKING: `generate create --reference-image` now always routes to the
31
+ references category**, regardless of how many are supplied. Previously a
32
+ *single* `--reference-image` was collapsed into the scalar `referenceImageUrl`
33
+ (which the server treats as the image-to-video start frame), so it was rejected
34
+ by image models such as `gpt-image-2` that only accept references — while two
35
+ or more images worked. A single reference image is now sent as
36
+ `referenceImages: [{ url }]` and is accepted correctly.
37
+
38
+ **Migration (image-to-video users):** a lone `--reference-image <url>` no
39
+ longer sets the start frame. To set the start frame, use the new
40
+ `--start-frame <url>` flag. `--reference-image` remains for reference images
41
+ (repeatable, max 8). The same routing change applies to the `generate_create`
42
+ MCP tool: `referenceImages` is always references; the new `startFrame` input
43
+ sets the start frame.
44
+
14
45
  ### Fixed
15
46
 
16
47
  - **Workflow docs taught fictional node types and port names.** All examples in
package/README.md CHANGED
@@ -45,6 +45,50 @@ clickraft generate create --model-slug nano-banana-2 \
45
45
 
46
46
  > **Note:** `--brand-model` only works with reference-supporting models (nano-banana-2 recommended).
47
47
 
48
+ ### Products
49
+
50
+ Create a product from images you have already uploaded, then generate against it:
51
+
52
+ ```bash
53
+ # 1. Upload each image. Note the assetId that comes back.
54
+ clickraft upload ./mug-front.png
55
+ clickraft upload ./mug-side.png
56
+
57
+ # 2. Create the product. --image is repeatable (1-10) and takes
58
+ # <assetId>[:<altText>]; alt text may contain colons.
59
+ clickraft product create --name "Ceramic Mug" \
60
+ --description "Hand-glazed stoneware" \
61
+ --image "1f7c1e8e-2a4b-4c9d-8e5f-3b2a1c0d9e8f:Front view" \
62
+ --image "2a8d2f9f-3b5c-4d0e-9f6a-4c3b2d1e0f9a:Side view" \
63
+ --primary 1f7c1e8e-2a4b-4c9d-8e5f-3b2a1c0d9e8f
64
+
65
+ # 3. Use the returned product id in a generation.
66
+ clickraft generate create --model-slug nano-banana-2 \
67
+ --prompt "the mug on a marble worktop, morning light" \
68
+ --product <product-id>
69
+
70
+ clickraft product list
71
+ ```
72
+
73
+ Without `--primary`, the first `--image` becomes the primary image. That matters
74
+ downstream: `generate create --product <id>` resolves the primary image when no
75
+ image id is given.
76
+
77
+ Retries are safe. Each invocation sends an idempotency key, and it is reused
78
+ across the automatic retries within that invocation, so a transient storage
79
+ error cannot create the product twice. To make a retry safe **across**
80
+ invocations, for example in a shell loop of your own, pass the same
81
+ `--idempotency-key` each time. Reusing a key with a changed body is rejected
82
+ rather than silently creating a second product.
83
+
84
+ `product create` needs the `products:write` scope. Tokens minted before this
85
+ command shipped do not carry it, and the CLI will say so before making any
86
+ request:
87
+
88
+ ```bash
89
+ clickraft login --force-reauth
90
+ ```
91
+
48
92
  ### Workflows
49
93
 
50
94
  Create, inspect, and mutate visual workflows from your terminal:
@@ -93,6 +137,15 @@ The Clickraft CLI is designed to work with Claude Code, Cursor, Codex, and other
93
137
  npx skills add clickraft/skills
94
138
  ```
95
139
 
140
+ ### After upgrading: re-authorize for product creation
141
+
142
+ `product create` and the `product_create` MCP tool both require the
143
+ `products:write` scope, which is new. Existing credentials do not carry it.
144
+
145
+ - **CLI:** run `clickraft login --force-reauth`.
146
+ - **Clickraft MCP connector:** reconnect it, then confirm the tool works. If it
147
+ still reports a missing scope, remove the connector and add it again.
148
+
96
149
  ## Development
97
150
 
98
151
  ```bash