forgecad 0.9.4 → 0.9.6

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.
Files changed (90) hide show
  1. package/dist/assets/{AdminPage-jwoEgwE_.js → AdminPage-Da6hhpJx.js} +1 -1
  2. package/dist/assets/{BlogPage-Ck7g3ue2.js → BlogPage-Bl_sKeWb.js} +1 -1
  3. package/dist/assets/{DocsPage-9WaRC14b.js → DocsPage-Blz3Tp4j.js} +1 -6
  4. package/dist/assets/EditorApp-CuiPbtn5.js +12754 -0
  5. package/dist/assets/{EmbedViewer-37_PfMwv.js → EmbedViewer-BFG6-Ufm.js} +2 -2
  6. package/dist/assets/{LandingPageProofDriven-CO8WL0CY.js → LandingPageProofDriven-DB9fQd5P.js} +1 -1
  7. package/dist/assets/{PricingPage-DADKGuOa.js → PricingPage-BMxYT_F0.js} +1 -1
  8. package/dist/assets/{SettingsPage-DKKI4W49.js → SettingsPage-VVQNrCAg.js} +1 -1
  9. package/dist/assets/{app-CwI02pTA.js → app-Dl9ymBWC.js} +355 -36
  10. package/dist/assets/cli/{render-Kw5hLEcL.js → render-CFtwKCCY.js} +203 -862
  11. package/dist/assets/{sectionPlaneMath-C8N0w8o3.js → distance-BEC2RjJi.js} +4150 -801
  12. package/dist/assets/{evalWorker-D6ub3kfS.js → evalWorker-CRvbzTXm.js} +2611 -528
  13. package/dist/assets/{manifold-CwDdMKyc.js → manifold-B9QSr-qP.js} +1 -1
  14. package/dist/assets/{manifold-DTvmxSDf.js → manifold-DpBXFS2K.js} +1 -1
  15. package/dist/assets/{manifold-lru0jwVw.js → manifold-DzZ4VRPs.js} +2 -2
  16. package/dist/assets/{renderSceneState-tvtNKNRi.js → renderSceneState-BuAXF2jh.js} +1 -1
  17. package/dist/assets/{reportWorker-DeqktDGt.js → reportWorker-BNWEnRg1.js} +2606 -525
  18. package/dist/cli/render.html +1 -1
  19. package/dist/docs/index.html +2 -2
  20. package/dist/docs-raw/AI/usage.md +0 -1
  21. package/dist/docs-raw/API/core/concepts.md +11 -1
  22. package/dist/docs-raw/CLI.md +64 -13
  23. package/dist/docs-raw/beta-operations.md +4 -0
  24. package/dist/docs-raw/deployment.md +38 -23
  25. package/dist/docs-raw/generated/assembly.md +8 -3
  26. package/dist/docs-raw/generated/concepts.md +126 -46
  27. package/dist/docs-raw/generated/core.md +97 -47
  28. package/dist/docs-raw/generated/curves.md +113 -595
  29. package/dist/docs-raw/generated/lib.md +40 -3
  30. package/dist/docs-raw/generated/output.md +6 -1
  31. package/dist/docs-raw/generated/sdf.md +50 -4
  32. package/dist/docs-raw/generated/sketch.md +9 -1
  33. package/dist/docs-raw/generated/viewport.md +1 -9
  34. package/dist/docs-raw/guides/inspection-bundles.md +40 -9
  35. package/dist/docs-raw/runbook.md +3 -3
  36. package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -0
  37. package/dist/docs-raw/skills/forgecad-image-replicator.md +3 -1
  38. package/dist/docs-raw/skills/forgecad-make-a-model.md +48 -4
  39. package/dist/docs-raw/skills/forgecad-render-inspect.md +3 -1
  40. package/dist/docs-raw/skills/forgecad-visual-spec.md +2 -0
  41. package/dist/docs-raw/skills/forgecad.md +2 -1
  42. package/dist/docs-raw/skills/index.md +0 -1
  43. package/dist/index.html +1 -1
  44. package/dist/sitemap.xml +6 -6
  45. package/dist-cli/blender/render.py +43 -8
  46. package/dist-cli/forgecad.js +5729 -2015
  47. package/dist-cli/forgecad.js.map +1 -1
  48. package/dist-skill/CONTEXT.md +372 -667
  49. package/dist-skill/SKILL-dev.md +2 -1
  50. package/dist-skill/SKILL.md +2 -1
  51. package/dist-skill/docs/API/core/concepts.md +11 -1
  52. package/dist-skill/docs/CLI.md +64 -13
  53. package/dist-skill/docs/generated/assembly.md +8 -3
  54. package/dist-skill/docs/generated/core.md +97 -47
  55. package/dist-skill/docs/generated/curves.md +113 -595
  56. package/dist-skill/docs/generated/lib.md +40 -3
  57. package/dist-skill/docs/generated/output.md +6 -1
  58. package/dist-skill/docs/generated/sdf.md +50 -4
  59. package/dist-skill/docs/generated/sketch.md +9 -1
  60. package/dist-skill/docs/generated/viewport.md +1 -9
  61. package/dist-skill/docs/guides/inspection-bundles.md +40 -9
  62. package/dist-skill/docs-dev/API/core/concepts.md +11 -1
  63. package/dist-skill/docs-dev/CLI.md +64 -13
  64. package/dist-skill/docs-dev/generated/assembly.md +8 -3
  65. package/dist-skill/docs-dev/generated/core.md +97 -47
  66. package/dist-skill/docs-dev/generated/curves.md +113 -595
  67. package/dist-skill/docs-dev/generated/lib.md +40 -3
  68. package/dist-skill/docs-dev/generated/output.md +6 -1
  69. package/dist-skill/docs-dev/generated/sdf.md +50 -4
  70. package/dist-skill/docs-dev/generated/sketch.md +9 -1
  71. package/dist-skill/docs-dev/generated/viewport.md +1 -9
  72. package/dist-skill/docs-dev/guides/inspection-bundles.md +40 -9
  73. package/dist-skill/library/README.md +0 -1
  74. package/dist-skill/library/forgecad-blockout-model/SKILL.md +1 -0
  75. package/dist-skill/library/forgecad-image-replicator/SKILL.md +3 -1
  76. package/dist-skill/library/forgecad-make-a-model/SKILL.md +48 -4
  77. package/dist-skill/library/forgecad-render-inspect/SKILL.md +3 -1
  78. package/dist-skill/library/forgecad-visual-spec/SKILL.md +2 -0
  79. package/examples/api/drive-wheel-regions.forge.js +43 -0
  80. package/examples/api/guided-loft-olive-oil-bottle.forge.js +135 -0
  81. package/examples/api/sdf-circular-array-knurling.forge.js +19 -0
  82. package/examples/api/sdf-pattern2d-ceramic-ripple-set.forge.js +83 -0
  83. package/examples/api/sdf-pattern2d-grip-tread.forge.js +72 -0
  84. package/examples/api/sdf-pattern2d-orbital-jewelry.forge.js +62 -0
  85. package/examples/api/sdf-surface-basket-weave.forge.js +67 -0
  86. package/examples/api/sector-gear-body.forge.js +34 -0
  87. package/package.json +20 -2
  88. package/dist/assets/EditorApp-Dja2jMmW.js +0 -12509
  89. package/dist/docs-raw/skills/forgecad-api-dogfood.md +0 -130
  90. package/dist-skill/library/forgecad-api-dogfood/SKILL.md +0 -125
@@ -213,7 +213,6 @@ For the full command reference, see [ForgeCAD CLI](../CLI.md).
213
213
  | `forgecad-blockout-model` | Making rough concept geometry to explore proportions, layout, motion envelope, or spatial intuition before detailed modeling. |
214
214
  | `forgecad-image-replicator` | Recreating an object from reference images as real ForgeCAD geometry through camera-calibrated render/compare/iterate loops. |
215
215
  | `forgecad-render-inspect` | Generating and interpreting `forgecad render inspect` bundles for collision, wall thickness, connectivity, masks, depth, normals, and sections. |
216
- | `forgecad-api-dogfood` | Building a real model while recording API friction and concrete improvement proposals. |
217
216
  | `forgecad-visual-spec` | Producing builder-honest image prompts from a concrete model, HLD, LLD, or build brief. |
218
217
  | `forgecad-project` | Managing forgecad.io projects from the CLI: init, clone, pull, push, file commands, members, publish, and shares. |
219
218
 
@@ -34,7 +34,7 @@ Top-level declarations such as `const bom = ...`, `let scene = ...`, or `class S
34
34
 
35
35
  - Scripts re-execute on every parameter change (400ms debounce)
36
36
  - Geometry operations are **immutable** — shapes, sketches, groups, imported assemblies, and wood boards return new values instead of modifying in place
37
- - Must return one of: `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, `SdfShape`, `Array` of renderables, `Array` of `{ name, shape?, sketch?, group?, color? }`, or a **metadata object** (see below)
37
+ - Must return one of: `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, `SdfShape`, `Array` of renderables, `Array` of `{ name, tags?, shape?, sketch?, group?, color? }`, or a **metadata object** (see below)
38
38
 
39
39
  Top-level assembly scripts can return an unsolved `Assembly` directly; ForgeCAD solves it at default joint values for display. Return `assembly.solve(state)` when you want a specific pose. Do not call `.toGroup()` just to make an assembly render — use `.toGroup()` only when you specifically need `ShapeGroup` composition, group-style transforms, or named-child lookup.
40
40
 
@@ -67,6 +67,16 @@ return {
67
67
  };
68
68
  ```
69
69
 
70
+ Named return objects and named `group(...)` children can include `tags`. Tags are viewport metadata: they do not affect geometry, exports, face labels, or BOM rows, but the command palette can hide, show only, or focus every object with a selected tag.
71
+
72
+ ```javascript
73
+ return [
74
+ { name: 'Base Plate', tags: ['printed', 'structural'], shape: base },
75
+ { name: 'M4 Bolt A', tags: 'fastener', shape: boltA },
76
+ { name: 'M4 Bolt B', tags: 'fastener', shape: boltB },
77
+ ];
78
+ ```
79
+
70
80
  ## Coordinate System
71
81
 
72
82
  Z-up right-handed: X = left/right, Y = forward/back, Z = up/down.
@@ -113,12 +113,14 @@ forgecad run examples/constraints/06-complex-spectrogram.forge.js --solver-debug
113
113
 
114
114
  ### `forgecad render`
115
115
 
116
- Render a Forge scene. Use a subcommand — `3d`, `inspect`, `section`, `wireframe`, `sketch`, or `hq`.
116
+ Render a Forge scene. Use a subcommand — `3d`, `inspect`, `views`, `section`, `wireframe`, `sketch`, or `hq`.
117
117
 
118
118
  `forgecad render` is a group of rendering subcommands. Pick one based on what you want:
119
119
 
120
120
  - `render 3d` — standard viewport PNG, the usual way to visually verify geometry
121
121
  - `render inspect` — machine-readable inspection bundle with geometry channels and a manifest
122
+ - `render inspect channels` — list supported inspection channels
123
+ - `render views` — list named cameras declared with `scene({ views })`
122
124
  - `render wireframe` — edges only, no shading
123
125
  - `render section` — 2D cross-section cut by a plane (SVG or PNG)
124
126
  - `render sketch` — 2D sketch script to PNG
@@ -127,6 +129,8 @@ Render a Forge scene. Use a subcommand — `3d`, `inspect`, `section`, `wirefram
127
129
  ```bash
128
130
  forgecad render 3d examples/cup.forge.js
129
131
  forgecad render inspect examples/api/static-assembly-connectors.forge.js --channels rgb,mask
132
+ forgecad render inspect channels
133
+ forgecad render views examples/cup.forge.js
130
134
  forgecad render wireframe examples/cup.forge.js
131
135
  forgecad render section examples/furniture/01-table.forge.js --plane XZ
132
136
  forgecad render hq examples/cup.forge.js --preset dramatic
@@ -138,7 +142,7 @@ Render a Forge scene to PNG using the real viewport renderer.
138
142
 
139
143
  Launches a headless Chrome instance, renders the scene with the same WebGL viewport as the editor, and saves a PNG. The output path defaults to `<script-name>.png` next to the input file.
140
144
 
141
- Use `--focus` to isolate specific parts (hides everything else) or `--hide` to remove clutter like mock objects. The `--view` flag selects a named camera declared in `scene({ views })`. The `--camera` flag accepts built-in views (`front`, `top`, `iso`), `azimuth:elevation` angles, or an exact `proj/pos/target/up/fov` camera spec — pass `--camera` multiple times to render several viewpoints in one run.
145
+ Use `--focus` to isolate specific parts (hides everything else) or `--hide` to remove clutter like mock objects. The `--view` flag selects a named camera declared in `scene({ views })`. The `--camera` flag accepts built-in views (`front`, `top`, `iso`), `azimuth:elevation` angles, or an exact `proj/pos/target/up/fov` camera spec — pass `--camera` multiple times to render several viewpoints in one run. Use `--camera-json <file>` or `--scene <file>` for exact reproducible viewport cameras without shell escaping.
142
146
 
143
147
  Use `--edges=<off|thin|bold>` to control the edge overlay. For a pure wireframe look, use `render wireframe` instead.
144
148
 
@@ -152,16 +156,29 @@ forgecad render 3d examples/cup.forge.js --hide "wall,bolt"
152
156
  forgecad render 3d model.forge.js --view hero
153
157
  forgecad render 3d model.forge.js --camera 45:30
154
158
  forgecad render 3d model.forge.js --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38"
159
+ forgecad render 3d model.forge.js --camera-json camera.json
160
+ forgecad render 3d model.forge.js --scene scene.json
155
161
  forgecad render 3d model.forge.js --camera front --camera side
156
162
  forgecad render 3d model.forge.js --edges bold
157
163
  forgecad render 3d model.forge.js --edges off
158
164
  ```
159
165
 
166
+ ### `forgecad render views`
167
+
168
+ List named camera views declared by a model with `scene({ views })`.
169
+
170
+ Runs the script headlessly and prints every named render view with an exact camera spec that can be passed back to `render 3d`, `render hq`, or `capture`.
171
+
172
+ ```bash
173
+ forgecad render views model.forge.js
174
+ forgecad render views model.forge.js --json
175
+ ```
176
+
160
177
  ### `forgecad render inspect`
161
178
 
162
179
  Render a machine-readable inspection bundle with geometry channels and a manifest.
163
180
 
164
- Launches the headless viewport renderer and writes a directory bundle for agent and automation workflows. Every channel is opt-in with `--channels`; there is no default bundle. Selected channels emit canonical `front`, `right`, `top`, and `iso` views for RGB, depth, normals, object masks, physical connectivity, rooted component distance, collisions, and wall thickness, or a principal-plane section atlas, plus a root `manifest.json` with scene metadata, filters, object visibility, and relative file paths.
181
+ Launches the headless viewport renderer and writes a directory bundle for agent and automation workflows. Every channel is opt-in with `--channels`; there is no default bundle. Selected channels emit canonical `front`, `right`, `top`, and `iso` views for RGB, depth, normals, surface roughness, object masks, physical connectivity, rooted component distance, collisions, and wall thickness, or a principal-plane section atlas, plus a root `manifest.json` with scene metadata, filters, object visibility, and relative file paths.
165
182
 
166
183
  Use `--focus` to isolate specific parts or hide mocks, and `--hide` to remove named clutter. Output defaults to `<script-name>-inspect/` next to the input file.
167
184
 
@@ -173,6 +190,15 @@ forgecad render inspect examples/api/static-assembly-connectors.forge.js out/ben
173
190
  forgecad render inspect examples/api/static-assembly-connectors.forge.js --channels rgb,mask,collisions --hide "Bench.Slat0" --force
174
191
  ```
175
192
 
193
+ ### `forgecad render inspect channels`
194
+
195
+ List supported inspection bundle channels.
196
+
197
+ ```bash
198
+ forgecad render inspect channels
199
+ forgecad render inspect channels --json
200
+ ```
201
+
176
202
  ### `forgecad render wireframe`
177
203
 
178
204
  Render a Forge scene as a wireframe (edges only, no shading).
@@ -190,13 +216,15 @@ High-quality render via Blender Cycles — path-traced, HDRI, material presets.
190
216
 
191
217
  Exports the scene to Blender and renders with Cycles (path tracer). Requires Blender installed and on PATH.
192
218
 
193
- Choose a `--preset` for the look: `studio` (neutral product shot), `dramatic` (high-contrast), `clay` (matte, no color), `glass`, `metallic`, `toon`, `xray`, `normals`, `silhouette`, and more. Control quality vs speed with `--samples` (default 256). Use `--transparent` for a transparent background (compositing-ready).
219
+ Choose a `--preset` for the look: `studio` (neutral product shot), `dramatic` (high-contrast), `clay` (matte, no color), `glass`, `metallic`, `toon`, `xray`, `normals`, `silhouette`, and more. Control quality vs speed with `--samples` (default 256). Use `--view`, `--camera`, `--camera-json`, or `--scene <file>` for still camera control, matching `render 3d`. Use `--transparent` for a transparent background (compositing-ready).
194
220
 
195
221
  Output defaults to `<script-name>-hq.png`. Great for documentation, marketing renders, and social media.
196
222
 
197
223
  ```bash
198
224
  forgecad render hq examples/cup.forge.js
199
225
  forgecad render hq examples/cup.forge.js hero.png --preset dramatic --samples 1024
226
+ forgecad render hq examples/cup.forge.js hero.png --view hero
227
+ forgecad render hq examples/cup.forge.js hero.png --camera-json camera.json
200
228
  forgecad render hq examples/cup.forge.js --preset clay --size 2048
201
229
  forgecad render hq examples/cup.forge.js --transparent --preset glass
202
230
  ```
@@ -205,16 +233,20 @@ forgecad render hq examples/cup.forge.js --transparent --preset glass
205
233
 
206
234
  Animated orbit or joint playback.
207
235
 
208
- Renders an animated sequence by either orbiting the camera around the model or playing back a `jointsView` animation. Use `--capture orbit` (default) for a turntable rotation, `--capture animation --animation <name>` to play a named joints clip, or `--capture section-sweep` to move a clipping plane through the model. Supports `--cut-plane` to animate with a static cross-section visible.
236
+ Renders an animated sequence by either orbiting the camera around the model or playing back a `jointsView` animation. Use `--capture orbit` (default) for a turntable rotation, `--capture animation --animation <name>` to play a named joints clip, or `--capture section-sweep` to move a clipping plane through the model. Supports `--cut-plane` to animate with a static cross-section visible. Use `--view`, `--camera`, `--camera-json`, or `--scene <file>` to choose the orbit base camera or the fixed camera for animations and section sweeps.
209
237
 
210
238
  ```bash
211
239
  forgecad capture gif examples/cup.forge.js
212
240
  forgecad capture gif examples/3d-printer.forge.js out/section.gif --cut-plane "Front Section"
213
241
  forgecad capture gif model.forge.js out/raw.gif --param "Output=raw-sdf"
242
+ forgecad capture gif model.forge.js out/front.gif --camera front
243
+ forgecad capture gif model.forge.js out/hero.gif --view hero
214
244
  forgecad capture gif examples/3d-printer.forge.js out/sweep.gif --capture section-sweep --sweep-plane YZ
215
245
  forgecad capture mp4 examples/cup.forge.js
216
246
  forgecad capture mp4 examples/api/runtime-joints-view.forge.js out/step.mp4 --capture animation --animation Step
217
247
  forgecad capture mp4 model.forge.js out/raw.mp4 --param "Output=raw-sdf"
248
+ forgecad capture mp4 model.forge.js out/front.mp4 --camera front
249
+ forgecad capture mp4 model.forge.js out/hero.mp4 --view hero
218
250
  forgecad capture mp4 examples/3d-printer.forge.js out/sweep.mp4 --capture section-sweep --sweep-plane YZ --sweep-frames 180
219
251
  ```
220
252
 
@@ -247,18 +279,22 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
247
279
  | `--focus <names>` | Focus: no arg hides mocks; comma-separated names shows only those |
248
280
  | `--hide <names>` | Hide comma-separated object names |
249
281
  | `--camera <front\|back\|side\|right\|top\|iso\|az:el\|az:el:dist\|spec>` | Camera preset, spherical (az:el), or full spec such as `proj=perspective;pos=x,y,z;target=x,y,z;up=x,y,z;fov=45`. Repeatable. |
282
+ | `--camera-json <file>` | Exact viewport camera JSON file |
250
283
  | `--view <name>` | Named camera view declared by the model with scene({ views }) |
251
284
  | `--size <px>` | Image size in pixels |
252
- | `--scene <json>` | Viewport scene state JSON |
285
+ | `--scene <json\|file>` | Viewport scene state JSON or JSON file |
253
286
  | `--background <color>` | Canvas background override |
254
287
  | `--render-mode <solid\|wireframe>` | Shaded solid (default) or wireframe only |
255
- | `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: thin) |
288
+ | `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: off) |
256
289
  | `--render-style <classic\|studio\|fast\|glass>` | Visual render style (default: classic) |
257
290
  | `--port <n>` | Vite dev server port |
291
+ | `--fresh-server` | Start a fresh renderer instead of reusing an existing one |
258
292
  | `--chrome-path <path>` | Chrome or Chromium executable path |
259
293
  | `--output <path>` | Output file path |
260
- | `--channels <rgb,depth,normals,mask,connectivity,distance,collisions,thickness,section>` | Required inspection channels to emit; no default |
261
- | `--quality <default\|live\|high>` | Mesh/render quality |
294
+ | `--json` | Print machine-readable JSON |
295
+ | `--quality <default\|live\|high>` | Mesh quality preset |
296
+ | `--backend <manifold\|occt\|truck>` | Geometry backend |
297
+ | `--channels <rgb,depth,normals,roughness,mask,connectivity,distance,collisions,thickness,section>` | Required inspection channels to emit; no default |
262
298
  | `--force` | Replace an existing bundle directory |
263
299
  | `--min-thickness <mm>` | Critical thickness threshold in model units |
264
300
  | `--warn-thickness <mm>` | Warning thickness threshold in model units |
@@ -276,7 +312,6 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
276
312
  | `--frames <n>` | Video frames per revolution |
277
313
  | `--fps <n>` | Video frame rate |
278
314
  | `--pitch <deg>` | Camera pitch angle in degrees |
279
- | `--backend <manifold\|occt\|truck>` | Geometry backend |
280
315
  | `--format <gif\|mp4>` | Output format |
281
316
  | `--capture <orbit\|animation\|section-sweep>` | Capture preset |
282
317
  | `--animation <name>` | Named jointsView animation clip |
@@ -330,6 +365,7 @@ forgecad cut-list examples/api/sheet-stock-cut-list.forge.js
330
365
  forgecad export cutting-layout examples/api/sheet-stock-cut-list.forge.js --sheet-width 420 --sheet-height 594 --kerf 3
331
366
 
332
367
  # 3D printing
368
+ forgecad check print bracket.forge.js
333
369
  forgecad export stl bracket.forge.js
334
370
  forgecad export 3mf bracket.forge.js --quality high
335
371
 
@@ -494,11 +530,26 @@ forgecad skill one-file ~/Desktop/forgecad-context.md
494
530
  forgecad skill flattened-files ~/Desktop/forgecad-skills
495
531
  ```
496
532
 
497
- > **Workflow:** Agent writes the model -> `forgecad run` validates it -> `forgecad render inspect` produces evidence -> `forgecad check params` sweeps the parameter range -> export ships the result. All in the terminal.
533
+ > **Workflow:** Agent writes the model -> `forgecad run` validates it -> `forgecad check print` catches printability risks -> `forgecad render inspect` produces visual evidence -> `forgecad check params` sweeps parameter robustness -> export ships the result. All in the terminal.
498
534
 
499
535
  ## Validation
500
536
 
501
- Test parameter ranges and run invariant suites.
537
+ Check printability, test parameter ranges, and run invariant suites.
538
+
539
+ ### `forgecad check print`
540
+
541
+ Run fast 3D-print readiness checks for collisions, mesh health, walls, overhangs, and bed contact.
542
+
543
+ Runs a Forge script with the headless kernel and emits a slicer-adjacent printability report without launching a browser. The check is designed for agents: JSON is stable, failures name the specific print risk, and the default profile is conservative for FDM PLA on a 0.4mm nozzle.
544
+
545
+ Checks include script `verify.*` results, exact positive-volume object collisions, physical component count, mesh topology, sampled wall thickness, unsupported overhang budget, and bed-contact area. Use `--json` for automation and `--output` to save the full report while keeping the readable terminal summary.
546
+
547
+ ```bash
548
+ forgecad check print examples/api/attachTo-basics.forge.js
549
+ forgecad check print examples/api/verification-demo.forge.js --json
550
+ forgecad check print model.forge.js --min-wall 1.2 --warn-wall 2
551
+ forgecad check print model.forge.js --expect-components 1 -p "Wall Thickness=3"
552
+ ```
502
553
 
503
554
  ### `forgecad check params`
504
555
 
@@ -566,7 +617,7 @@ The CLI is free for core workflows and exports. Production outputs are free to r
566
617
 
567
618
  | Free | Production outputs | Pro |
568
619
  |------|--------------------|-----|
569
- | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `check params`, `check suite` | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export sdf`, `export urdf`, `export report`, `export cutting-layout` are free to run; Pro covers commercial use. | `render hq`, `capture gif`, `capture mp4` |
620
+ | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `check print`, `check params`, `check suite` | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export sdf`, `export urdf`, `export report`, `export cutting-layout` are free to run; Pro covers commercial use. | `render hq`, `capture gif`, `capture mp4` |
570
621
 
571
622
  ```bash
572
623
  forgecad license # Check signed-in account status
@@ -36,6 +36,10 @@ All of these are thin wrappers around `scripts/beta.sh` /
36
36
  `scripts/beta-local.sh`. They exist for operator ergonomics only; regular
37
37
  ForgeCAD users never see them in the public product CLI.
38
38
 
39
+ Production has the matching `npm run prod:*` shortcuts in `scripts/prod.sh`
40
+ for the same reason: muscle memory should be environment-prefixed, even though
41
+ production is normally deployed by GitHub Actions on `mainline`.
42
+
39
43
  **Useful overrides**:
40
44
  - `FORGE_BETA_DEPLOY_CONFIG` — alternate Kamal config path
41
45
  - `FORGE_BETA_DESTINATION` — alternate Kamal destination name (default `beta`)
@@ -55,26 +55,25 @@ All containers share the `kamal` Docker network. The web container reaches the b
55
55
 
56
56
  ```bash
57
57
  # Deploy prod web app (zero-downtime rolling update)
58
- kamal deploy
58
+ npm run prod:deploy
59
59
 
60
60
  # Deploy prod backend compute server
61
- kamal deploy -c config/deploy.backend.yml
61
+ npm run prod:deploy:backend
62
62
 
63
63
  # Deploy both prod services
64
- kamal deploy && kamal deploy -c config/deploy.backend.yml
64
+ npm run prod:deploy:all
65
65
 
66
66
  # Deploy the same commit to beta (run BEFORE prod)
67
- kamal deploy -d beta
68
-
69
- # Same flow via the beta operator wrapper
70
67
  npm run beta:deploy
68
+
69
+ # Open the environment after a deploy
71
70
  npm run beta:smoke
71
+ npm run prod:smoke
72
72
  ```
73
73
 
74
- Recommended flow for a change: merge to `mainline` → `kamal deploy -d beta`
75
- → verify on `beta.forgecad.io` → `kamal deploy`
76
- (prod). See [beta-operations.md](beta-operations.md) for the full beta
77
- runbook.
74
+ Recommended flow for a change: merge to `mainline` → `npm run beta:deploy`
75
+ → verify on `beta.forgecad.io` → `npm run prod:deploy`.
76
+ See [beta-operations.md](beta-operations.md) for the full beta runbook.
78
77
 
79
78
  Kamal builds the Docker image on the server via SSH (`builder: remote:`), pushes to GHCR, pulls on the server, starts the new container, waits for healthcheck, switches traffic, stops old container. Zero downtime.
80
79
 
@@ -90,16 +89,16 @@ Push to `mainline` triggers `.github/workflows/deploy.yml` which runs `kamal dep
90
89
  ssh hetzner 'docker ps -a --format "{{.Names}}\t{{.Status}}" | grep "^forgecad-web-" | sed -E "s/^forgecad-web-([a-f0-9]+)(_replaced_[^[:space:]]+)?\t/\1\t/"'
91
90
 
92
91
  # Roll the web app back to the last known-good version:
93
- kamal rollback <VERSION>
92
+ npm run prod:rollback -- <VERSION>
94
93
 
95
94
  # Backend rollback:
96
- kamal rollback -c config/deploy.backend.yml <VERSION>
95
+ npm run prod:rollback:backend -- <VERSION>
97
96
  ```
98
97
 
99
98
  Example:
100
99
 
101
100
  ```bash
102
- kamal rollback db9c49b058aaa379d9d622456cb249f9b0ddc335
101
+ npm run prod:rollback -- db9c49b058aaa379d9d622456cb249f9b0ddc335
103
102
  ```
104
103
 
105
104
  Use the most recent healthy version from the `docker ps -a` output above. The
@@ -126,10 +125,22 @@ version is the hex suffix in the Kamal container name, e.g.
126
125
 
127
126
  ## Operator Shortcuts
128
127
 
129
- Routine beta admin work is wrapped by repo-local scripts so the flow stays
130
- safe and memorable without changing the public ForgeCAD user CLI:
128
+ Routine production and beta admin work is wrapped by repo-local scripts so the
129
+ flow stays safe and memorable without changing the public ForgeCAD user CLI:
131
130
 
132
131
  ```bash
132
+ npm run prod:deploy
133
+ npm run prod:smoke
134
+ npm run prod:deploy:backend
135
+ npm run prod:deploy:all
136
+ npm run prod:rollback -- <VERSION>
137
+ npm run prod:logs
138
+ npm run prod:logs:backend
139
+ npm run prod:shell
140
+ npm run prod:db
141
+ npm run prod:health
142
+ npm run prod:errors -- web 1000
143
+
133
144
  npm run beta:setup
134
145
  npm run beta:deploy
135
146
  npm run beta:smoke
@@ -142,6 +153,10 @@ npm run beta:local
142
153
  `FORGE_ENVIRONMENT=beta` backend on localhost, so you can open the browser and
143
154
  judge the UX without touching Cloudflare.
144
155
 
156
+ These package scripts are thin wrappers around `scripts/prod.sh`,
157
+ `scripts/beta.sh`, and Kamal. Use raw Kamal commands when debugging Kamal
158
+ itself; otherwise prefer the environment-prefixed shortcuts.
159
+
145
160
  ---
146
161
 
147
162
  ## Environment Variables
@@ -267,10 +282,10 @@ Use the observability stack first for incidents:
267
282
  SSH access: `ssh hetzner` (see `~/.ssh/config`).
268
283
 
269
284
  ```bash
270
- # Kamal commands (run from project root locally)
271
- kamal app logs # web app logs
272
- kamal app logs -c config/deploy.backend.yml # backend logs
273
- kamal app exec -i bash # shell into web container
285
+ # Kamal-backed commands (run from project root locally)
286
+ npm run prod:logs # web app logs
287
+ npm run prod:logs:backend # backend logs
288
+ npm run prod:shell # shell into web container
274
289
  kamal proxy details # proxy routing info
275
290
 
276
291
  # Direct SSH
@@ -281,10 +296,10 @@ ssh hetzner "df -h / && free -h"
281
296
  ### Production scripts
282
297
 
283
298
  ```bash
284
- bash scripts/prod/health.sh # containers, disk, memory
285
- bash scripts/prod/logs.sh [lines] [pattern] # app logs
286
- bash scripts/prod/errors.sh [lines] # error logs only
287
- bash scripts/prod/db.sh "SELECT ..." # run SQL query
299
+ npm run prod:health # containers, disk, memory
300
+ npm run prod:errors -- web 1000 # error logs only
301
+ npm run prod:db # interactive psql via Kamal
302
+ bash scripts/prod/db.sh "SELECT ..." # one-shot SQL query
288
303
  ```
289
304
 
290
305
  ### Email not delivered
@@ -29,7 +29,12 @@ bomToCsv(rows: BomRow[]): string
29
29
 
30
30
  **`BomRow`**: `part: string`, `qty: number`, `material?: string`, `process?: string`, `tolerance?: string`, `notes?: string`, `metadata?: PartMetadata`
31
31
 
32
- **`PartMetadata`**: `material?: string`, `process?: string`, `tolerance?: string`, `qty?: number`, `notes?: string`, `densityKgM3?: number`, `massKg?: number`
32
+ **`PartMetadata`**
33
+
34
+ | Option | Type | Description |
35
+ |--------|------|-------------|
36
+ | `tags?` | `string \| readonly string[]` | Viewport organization tags applied to scene objects produced from this part. |
37
+ | `material?`, `process?`, `tolerance?`, `qty?`, `notes?`, `densityKgM3?`, `massKg?` | | — |
33
38
 
34
39
  #### `assembly()` — Create an assembly container with named parts and joints for kinematic mechanisms.
35
40
 
@@ -670,13 +675,13 @@ toGroup(): ShapeGroup
670
675
  Each part becomes `{ name, shape }` or `{ name, group: [...] }` if the part is a [`ShapeGroup`](/docs/core#shapegroup). Top-level scripts should normally return the `SolvedAssembly` directly. Use `toGroup()` when you need [`ShapeGroup`](/docs/core#shapegroup) behavior; use this method only for advanced scene-graph control where you need access to the flat per-part array with metadata.
671
676
 
672
677
  ```ts
673
- toSceneObjects(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; }>; metadata?: PartMetadata; }>
678
+ toSceneObjects(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; tags?: string[]; }>; metadata?: PartMetadata; }>
674
679
  ```
675
680
 
676
681
  #### `toScene()` — Backward-compatible alias for `toSceneObjects()`.
677
682
 
678
683
  ```ts
679
- toScene(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; }>; metadata?: PartMetadata; }>
684
+ toScene(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; tags?: string[]; }>; metadata?: PartMetadata; }>
680
685
  ```
681
686
 
682
687
  #### [`bom()`](/docs/output#bom) — Generate a bill of materials for all parts in the solved assembly.