@clickraft/cli 0.12.0 → 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,15 +1,16 @@
1
- ## [0.12.0](https://github.com/clickraft/cli/compare/v0.11.2...v0.12.0) (2026-07-02)
1
+ ## [0.13.0](https://github.com/clickraft/cli/compare/v0.12.0...v0.13.0) (2026-08-08)
2
2
 
3
- ### ⚠ BREAKING CHANGES
3
+ ### Features
4
4
 
5
- * **generate:** a lone --reference-image no longer sets the
6
- image-to-video start frame. To set the start frame, use the new
7
- --start-frame flag. --reference-image remains for reference images
8
- (repeatable, max 8).
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))
9
10
 
10
- ### Features
11
+ ### Bug Fixes
11
12
 
12
- * **generate:** route --reference-image to references and add --start-frame for i2v start frame ([b37ffee](https://github.com/clickraft/cli/commit/b37ffee452f97cbac99b9e1166d69124c101fc7b))
13
+ * **cli:** point the insufficient-scope hint at login --force-reauth ([398abd3](https://github.com/clickraft/cli/commit/398abd3ba7928706faf7f505038c4b52361b4a68))
13
14
 
14
15
  # Changelog
15
16
 
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