forgecad 0.9.13 → 0.9.15

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 (216) hide show
  1. package/LICENSE +6 -4
  2. package/README.md +8 -4
  3. package/dist/assets/{AdminPage-DramHHDf.js → AdminPage-CDyGUinA.js} +2 -2
  4. package/dist/assets/{BenchmarkPage-Bjgkh5m9.js → BenchmarkPage-DfPMY_-d.js} +4 -15
  5. package/dist/assets/{BlogPage-n_HGP3Qm.js → BlogPage-kF0fkdJT.js} +2 -2
  6. package/dist/assets/{DocsPage-WCIkPmzC.js → DocsPage-B954L3YN.js} +9 -3
  7. package/dist/assets/EditorApp-Beb-IZ0y.js +14014 -0
  8. package/dist/assets/{EditorApp-BAnckbsk.css → EditorApp-CuDLxKqL.css} +698 -0
  9. package/dist/assets/{EmbedViewer-DEZKqdfW.js → EmbedViewer-C77B-TrF.js} +3 -3
  10. package/dist/assets/{LandingPageProofDriven-CeRIctuj.js → LandingPageProofDriven-Cr6fXMDj.js} +35 -37
  11. package/dist/assets/LegalPage-BRlScr9A.css +91 -0
  12. package/dist/assets/LegalPage-Dzklqmmg.js +39 -0
  13. package/dist/assets/{PricingPage-BMedqFef.css → PricingPage-BPF6HKyO.css} +25 -0
  14. package/dist/assets/{PricingPage-rIRa8p4Y.js → PricingPage-zWXkvlwl.js} +19 -19
  15. package/dist/assets/{SettingsPage-BqCUvEXM.js → SettingsPage-Bz0of4KQ.js} +2 -2
  16. package/dist/assets/app-CE3sYcV7.css +3890 -0
  17. package/dist/assets/{app-BUZqJvSO.js → app-D3kDkggg.js} +2305 -960
  18. package/dist/assets/cli/{render-lhGxj50Y.js → render-DSY3mMQa.js} +423 -30
  19. package/dist/assets/{constructionHistoryWorker-ipD1jcIv.js → constructionHistoryWorker-gpDo-uH2.js} +927 -243
  20. package/dist/assets/{evalWorker-CHXSe_-u.js → evalWorker-CU0Ke6DP.js} +7799 -4163
  21. package/dist/assets/{forgecad_geometry-BVnIeXMG.js → forgecad_geometry-Dgceylq9.js} +43 -1
  22. package/dist/assets/{forgecad_geometry_bg-DufhhCBV.wasm → forgecad_geometry_bg-dD4RNQF1.wasm} +0 -0
  23. package/dist/assets/{inspectWorker-DeRnMVv1.js → inspectWorker-COyp8XXA.js} +927 -243
  24. package/dist/assets/{javascript-70-4uGcz.js → javascript-1kQXfVaz.js} +1 -1
  25. package/dist/assets/landing-proof-driven-DiGqdtWa.js +18 -0
  26. package/dist/assets/{landing-proof-driven-oFYW6mjz.css → landing-proof-driven-ORyigZ6p.css} +13 -7
  27. package/dist/assets/legalContent-ZfFGMmi4.js +251 -0
  28. package/dist/assets/{manifold-D1LZIHqn.js → manifold-BRI5prcH.js} +1 -1
  29. package/dist/assets/{manifold-C2fwoTgd.js → manifold-C-3h2M7p.js} +2 -2
  30. package/dist/assets/{manifold-BTkzxi9V.js → manifold-DNkrUWpA.js} +1 -1
  31. package/dist/assets/{reportWorker-Cq1qGmg0.js → reportWorker-CdBz5bNg.js} +7537 -10856
  32. package/dist/assets/{scalar-sampling-budget-D9Qv_UlJ.js → scalar-sampling-budget-wJF98aY9.js} +6943 -4345
  33. package/dist/assets/{scanProxyWorker-Bs2TDgLw.js → scanProxyWorker-B-9VbLIs.js} +32 -1
  34. package/dist/assets/{renderSceneState-Dr0xPq1A.js → targets-B9sGB5nB.js} +27 -1
  35. package/dist/assets/{vendor-react-Da3A2QmU.js → vendor-react-6j1Kke-Y.js} +6 -5
  36. package/dist/cli/render.html +1 -1
  37. package/dist/docs/index.html +2 -2
  38. package/dist/docs-raw/AI/ai-native-cad.md +50 -0
  39. package/dist/docs-raw/AI/usage.md +9 -17
  40. package/dist/docs-raw/CLI.md +71 -21
  41. package/dist/docs-raw/component-model.md +27 -11
  42. package/dist/docs-raw/generated/assembly.md +301 -212
  43. package/dist/docs-raw/generated/concepts.md +238 -240
  44. package/dist/docs-raw/generated/core.md +283 -6
  45. package/dist/docs-raw/generated/curves.md +274 -361
  46. package/dist/docs-raw/generated/lib.md +7 -1
  47. package/dist/docs-raw/generated/output.md +19 -4
  48. package/dist/docs-raw/generated/runtime-names.md +41 -0
  49. package/dist/docs-raw/generated/sdf.md +31 -0
  50. package/dist/docs-raw/generated/sheet-metal.md +9 -0
  51. package/dist/docs-raw/generated/sketch.md +44 -1
  52. package/dist/docs-raw/generated/viewport.md +14 -6
  53. package/dist/docs-raw/guides/coordinate-system.md +20 -16
  54. package/dist/docs-raw/guides/geometry-conventions.md +2 -2
  55. package/dist/docs-raw/guides/inspection-bundles.md +2 -1
  56. package/dist/docs-raw/guides/joint-design.md +24 -0
  57. package/dist/docs-raw/guides/positioning.md +13 -3
  58. package/dist/docs-raw/legal/privacy.md +63 -0
  59. package/dist/docs-raw/legal/software-license.md +55 -0
  60. package/dist/docs-raw/legal/terms.md +87 -0
  61. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +3 -3
  62. package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -1
  63. package/dist/docs-raw/skills/forgecad-component-model.md +11 -2
  64. package/dist/docs-raw/skills/forgecad-high-level-spec.md +1 -1
  65. package/dist/docs-raw/skills/forgecad-image-replicator.md +8 -8
  66. package/dist/docs-raw/skills/forgecad-lld.md +1 -1
  67. package/dist/docs-raw/skills/forgecad-make-a-model.md +4 -4
  68. package/dist/docs-raw/skills/forgecad-model-grader.md +2 -2
  69. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +2 -2
  70. package/dist/docs-raw/skills/forgecad-project.md +1 -1
  71. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +4 -4
  72. package/dist/docs-raw/skills/forgecad-render-inspect.md +4 -2
  73. package/dist/docs-raw/skills/forgecad-visual-spec.md +1 -1
  74. package/dist/docs-raw/skills/forgecad.md +4 -3
  75. package/dist/index.html +40 -12
  76. package/dist/llms.txt +8 -0
  77. package/dist/site.webmanifest +1 -1
  78. package/dist/sitemap.xml +49 -13
  79. package/dist-cli/{check-compiler-LOXCPEOI.js → check-compiler-SDX5QIXI.js} +1 -2
  80. package/dist-cli/{check-query-propagation-BAKNVWXR.js → check-query-propagation-EAYEFT77.js} +1 -2
  81. package/dist-cli/{chunk-RY43WF46.js → chunk-N4O47JLF.js} +13772 -9938
  82. package/dist-cli/forgecad.js +2387 -899
  83. package/dist-cli/{forgecad_geometry-GYVNKPIE.js → forgecad_geometry-QOQIIP53.js} +42 -1
  84. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  85. package/dist-cli/{solver-46FFSK2U.js → solver-OK4HECRH.js} +0 -1
  86. package/dist-skill/CONTEXT.md +1120 -724
  87. package/dist-skill/SKILL.md +3 -2
  88. package/dist-skill/docs/API/core/concepts.md +64 -1
  89. package/dist-skill/docs/CLI.md +71 -21
  90. package/dist-skill/docs/generated/assembly.md +277 -229
  91. package/dist-skill/docs/generated/core.md +283 -6
  92. package/dist-skill/docs/generated/curves.md +272 -362
  93. package/dist-skill/docs/generated/lib.md +7 -1
  94. package/dist-skill/docs/generated/output.md +19 -4
  95. package/dist-skill/docs/generated/runtime-names.md +41 -0
  96. package/dist-skill/docs/generated/sdf.md +31 -0
  97. package/dist-skill/docs/generated/sheet-metal.md +9 -0
  98. package/dist-skill/docs/generated/sketch.md +44 -2
  99. package/dist-skill/docs/generated/viewport.md +5 -90
  100. package/dist-skill/docs/guides/coordinate-system.md +20 -16
  101. package/dist-skill/docs/guides/geometry-conventions.md +2 -2
  102. package/dist-skill/docs/guides/inspection-bundles.md +2 -1
  103. package/dist-skill/docs/guides/joint-design.md +24 -0
  104. package/dist-skill/docs/guides/positioning.md +13 -3
  105. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +2 -2
  106. package/dist-skill/library/forgecad-component-model/SKILL.md +10 -1
  107. package/dist-skill/library/forgecad-image-replicator/SKILL.md +6 -6
  108. package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.py +166 -0
  109. package/dist-skill/library/forgecad-make-a-model/SKILL.md +3 -3
  110. package/dist-skill/library/forgecad-model-grader/SKILL.md +1 -1
  111. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +1 -1
  112. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +3 -3
  113. package/dist-skill/library/forgecad-render-inspect/SKILL.md +3 -1
  114. package/examples/api/assembly-kinematics-foundation.forge.js +65 -0
  115. package/examples/api/assembly-kinematics-four-bar.forge.js +115 -0
  116. package/examples/api/assembly-kinematics-limb.forge.js +116 -0
  117. package/examples/api/connector-frame-rig-chain.forge.js +102 -0
  118. package/examples/api/exact-sheet-shell-assembly.forge.js +0 -2
  119. package/examples/api/exact-surface-studio.forge.js +6 -8
  120. package/examples/api/helix-basics.forge.js +6 -6
  121. package/examples/api/lean-foundations/README.md +12 -0
  122. package/examples/api/lean-foundations/curve-blend-exact.forge.js +22 -0
  123. package/examples/api/lean-foundations/curve-fit-interpolation.forge.js +18 -0
  124. package/examples/api/lean-foundations/curve-helix-canonicalization.forge.js +27 -0
  125. package/examples/api/lean-foundations/curve-route-canonicalization.forge.js +16 -0
  126. package/examples/api/lean-foundations/curve-trim-reverse.forge.js +24 -0
  127. package/examples/api/lean-foundations/exact-curve-arc.forge.js +36 -0
  128. package/examples/api/mixed-edge-finishes-proof.forge.js +8 -11
  129. package/examples/api/route3d-elbow.forge.js +68 -0
  130. package/examples/api/transition-curves.forge.js +44 -15
  131. package/examples/api/y-blend-corner-showcase.forge.js +0 -2
  132. package/examples/generative/coral-vase.forge.js +1 -1
  133. package/examples/nurbs-tube.forge.js +1 -1
  134. package/package.json +14 -18
  135. package/dist/assets/EditorApp-CP9Za6tm.js +0 -13630
  136. package/dist/assets/app-CsHnaBWt.css +0 -1789
  137. package/dist/docs-raw/API/README.md +0 -16
  138. package/dist/docs-raw/API/core/concepts.md +0 -118
  139. package/dist/docs-raw/INDEX.md +0 -138
  140. package/dist/docs-raw/RELEASING.md +0 -87
  141. package/dist/docs-raw/agent-native-api.md +0 -27
  142. package/dist/docs-raw/beta-deployment.md +0 -304
  143. package/dist/docs-raw/beta-operations.md +0 -325
  144. package/dist/docs-raw/blueprint-first.md +0 -145
  145. package/dist/docs-raw/cli-monetization.md +0 -112
  146. package/dist/docs-raw/coding-best-practices.md +0 -120
  147. package/dist/docs-raw/coding.md +0 -340
  148. package/dist/docs-raw/deployment.md +0 -374
  149. package/dist/docs-raw/guides/skill-maintenance.md +0 -161
  150. package/dist/docs-raw/guides/surface-members.md +0 -82
  151. package/dist/docs-raw/internals/backend-vocabulary.md +0 -35
  152. package/dist/docs-raw/internals/compiler.md +0 -307
  153. package/dist/docs-raw/internals/constraint-solver-quality.md +0 -161
  154. package/dist/docs-raw/internals/constraint-solver.md +0 -176
  155. package/dist/docs-raw/internals/shape-from-slices.md +0 -152
  156. package/dist/docs-raw/internals/sketch-2d-pipeline.md +0 -108
  157. package/dist/docs-raw/platform/admin.md +0 -45
  158. package/dist/docs-raw/platform/architecture.md +0 -82
  159. package/dist/docs-raw/platform/auth.md +0 -139
  160. package/dist/docs-raw/platform/email.md +0 -67
  161. package/dist/docs-raw/platform/google-oauth-setup.md +0 -88
  162. package/dist/docs-raw/platform/observability.md +0 -197
  163. package/dist/docs-raw/platform/projects.md +0 -111
  164. package/dist/docs-raw/platform/sharing.md +0 -90
  165. package/dist/docs-raw/product/README.md +0 -39
  166. package/dist/docs-raw/product/api-as-product-language.md +0 -13
  167. package/dist/docs-raw/product/business-model.md +0 -15
  168. package/dist/docs-raw/product/competitive-positioning.md +0 -17
  169. package/dist/docs-raw/product/creative-manufacturing.md +0 -15
  170. package/dist/docs-raw/product/founder-story.md +0 -11
  171. package/dist/docs-raw/product/manufacturing-workflows.md +0 -15
  172. package/dist/docs-raw/product/onboarding-first-experience.md +0 -256
  173. package/dist/docs-raw/product/product-loop.md +0 -17
  174. package/dist/docs-raw/product/strategic-decisions.md +0 -22
  175. package/dist/docs-raw/product/user-outreach-email-templates.md +0 -161
  176. package/dist/docs-raw/product/user-segments.md +0 -15
  177. package/dist/docs-raw/product/vision.md +0 -26
  178. package/dist/docs-raw/rl-environments.md +0 -508
  179. package/dist/docs-raw/runbook.md +0 -611
  180. package/dist-cli/check-compiler-LOXCPEOI.js.map +0 -1
  181. package/dist-cli/check-query-propagation-BAKNVWXR.js.map +0 -1
  182. package/dist-cli/chunk-RY43WF46.js.map +0 -1
  183. package/dist-cli/forgecad.js.map +0 -1
  184. package/dist-cli/forgecad_geometry-GYVNKPIE.js.map +0 -1
  185. package/dist-cli/solver-46FFSK2U.js.map +0 -1
  186. package/dist-skill/SKILL-dev.md +0 -145
  187. package/dist-skill/docs-dev/API/core/concepts.md +0 -118
  188. package/dist-skill/docs-dev/CLI.md +0 -647
  189. package/dist-skill/docs-dev/agent-native-api.md +0 -27
  190. package/dist-skill/docs-dev/blueprint-first.md +0 -145
  191. package/dist-skill/docs-dev/coding-best-practices.md +0 -120
  192. package/dist-skill/docs-dev/coding.md +0 -340
  193. package/dist-skill/docs-dev/component-model.md +0 -164
  194. package/dist-skill/docs-dev/generated/assembly.md +0 -794
  195. package/dist-skill/docs-dev/generated/core.md +0 -2117
  196. package/dist-skill/docs-dev/generated/curves.md +0 -2583
  197. package/dist-skill/docs-dev/generated/lib.md +0 -169
  198. package/dist-skill/docs-dev/generated/output.md +0 -247
  199. package/dist-skill/docs-dev/generated/sdf.md +0 -446
  200. package/dist-skill/docs-dev/generated/sheet-metal.md +0 -504
  201. package/dist-skill/docs-dev/generated/sketch.md +0 -1811
  202. package/dist-skill/docs-dev/generated/viewport.md +0 -585
  203. package/dist-skill/docs-dev/generated/wood.md +0 -108
  204. package/dist-skill/docs-dev/guides/coordinate-system.md +0 -46
  205. package/dist-skill/docs-dev/guides/geometry-conventions.md +0 -52
  206. package/dist-skill/docs-dev/guides/inspection-bundles.md +0 -485
  207. package/dist-skill/docs-dev/guides/joint-design.md +0 -78
  208. package/dist-skill/docs-dev/guides/modeling-recipes.md +0 -78
  209. package/dist-skill/docs-dev/guides/positioning.md +0 -161
  210. package/dist-skill/docs-dev/guides/skill-maintenance.md +0 -161
  211. package/dist-skill/docs-dev/internals/backend-vocabulary.md +0 -35
  212. package/dist-skill/docs-dev/internals/compiler.md +0 -307
  213. package/dist-skill/docs-dev/internals/constraint-solver-quality.md +0 -161
  214. package/dist-skill/docs-dev/internals/constraint-solver.md +0 -176
  215. package/dist-skill/docs-dev/internals/sketch-2d-pipeline.md +0 -108
  216. package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.mjs +0 -289
@@ -1,647 +0,0 @@
1
- ---
2
- skill-group: cli
3
- skill-order: 1
4
- ---
5
-
6
- # ForgeCAD CLI
7
-
8
- Create projects, open local studios, run, inspect, export, publish, and sync `.forge.js` models from your terminal. Core workflows are included with a free ForgeCAD account; advanced exports and rendering are Pro.
9
-
10
- ## Quick Start
11
-
12
- ```bash
13
- # 1. Install
14
- npm install -g forgecad
15
-
16
- # 2. Sign in and create a dedicated project folder
17
- forgecad login
18
- mkdir spool-adapter
19
- cd spool-adapter
20
- forgecad project init "Spool Adapter" --visibility private
21
-
22
- # 3. Create a first model file
23
- forgecad new adapter --template part
24
-
25
- # 4. Open the local editor
26
- forgecad studio .
27
-
28
- # 5. Validate, export, and push to the browser
29
- forgecad run adapter.forge.js
30
- forgecad export stl adapter.forge.js
31
- forgecad project push
32
- forgecad project open
33
- ```
34
-
35
- Most CLI commands require a ForgeCAD account. Run `forgecad login` and choose email/password or API token when prompted. Use `FORGECAD_TOKEN=fc_pat_... forgecad <command>` only for CI/CD and one-off automation. `forgecad studio` always requires an explicit project path; use `.` for the current project.
36
-
37
- You can also start from the hosted starter project with `forgecad project clone start-here`, then `cd start-here` and `forgecad studio .`.
38
-
39
- ## Editor
40
-
41
- ForgeCAD includes a local editor. Open it around a dedicated project folder, edit a `.forge.js` file, save, and the 3D view updates — parameters become interactive sliders.
42
-
43
- | Command | Description |
44
- |---------|-------------|
45
- | `studio <project-path> [project-path ...]` | Open the installed local editor around one or more project folders. |
46
- | `dev <project-path> [project-path ...]` | Start the Vite dev server for ForgeCAD source development. |
47
- | `web` | Start a local dev server in web/playground mode (no filesystem, localStorage only). |
48
-
49
- `forgecad studio <project-path>` is the normal installed-CLI command for users. `forgecad dev <project-path>` starts the Vite dev server and is mainly for ForgeCAD source development.
50
-
51
- <details>
52
- <summary>Common flags for studio / dev</summary>
53
-
54
- | Option | Description |
55
- |--------|-------------|
56
- | `--port <n>` | Bind to a specific port |
57
- | `--host [host]` | Expose the server on the network |
58
- | `--open` | Open a browser window automatically |
59
- | `--strict-port` | Fail instead of selecting another port |
60
-
61
- </details>
62
-
63
- ## Run & Render
64
-
65
- Execute scripts and produce images headless — no browser window. Renders use Chrome under the hood.
66
-
67
- ### `forgecad run`
68
-
69
- Execute a Forge script quickly and print the inner-loop build summary: returned objects, verification results, parameters, and timing.
70
-
71
- The fast validation command. Runs your script with the real geometry kernel (no browser needed) and reports whether it built, which objects came back, any `verify.*` results, parameter values, script logs, and elapsed script time. This is the command agents should run frequently while editing a model.
72
-
73
- **Fast by default** — a bare `forgecad run model.forge.js` does not compute per-object volumes, bounding boxes, construction history, feature tallies, spatial relationships, collision intersections, or solver profiles. Those diagnostics are useful, but they are no longer part of the hot path.
74
-
75
- **Opt-in diagnostics** — use `--details` for volume/bounding-box/object geometry summaries, `--history` for the construction tree, `--features` for feature tallies, or `--solver-profile` for constraint solver timing. Use `--spatial bounded|exact` only when you want directional relationships and collision intersections from the run command itself.
76
-
77
- **Verification results** — runs any `verify.*` checks in the script and reports pass/fail with expected vs actual values. Verification failures remain non-fatal so the model can still render and be inspected.
78
-
79
- **Physical connectivity** — pass `--connectivity` to list physically connected components across visible objects. Overlapping bbox candidates are checked with exact geometry by default, while bbox-only contact is treated as evidence rather than proof of one connected component. This helps answer whether the model is one continuous assembly or several separate islands.
80
-
81
- **Quality preset** — pass `--quality live|default|high` to select the same geometry quality profile used by the editor and export tools. `live` is the fastest preset for large audit models.
82
-
83
- **Direct CAD inputs** — pass `.stl`, `.obj`, `.3mf`, `.step`, or `.stp` directly when you just want to inspect an external asset. Mesh files are imported with `importMesh(...)`; STEP/STP files are imported with `importStep(...)` and auto-select OCCT unless you pass `--backend`.
84
-
85
- For deeper confidence gates, prefer `forgecad inspect mechanical-integrity`, `forgecad check print`, or targeted evidence commands such as `forgecad inspect fit interference` instead of turning `run` back into a catch-all audit command.
86
-
87
- ```bash
88
- forgecad run examples/api/static-assembly-connectors.forge.js
89
- forgecad run examples/api/static-assembly-connectors.forge.js --focus
90
- forgecad run examples/api/static-assembly-connectors.forge.js --focus "Bench.Slat*"
91
- forgecad run examples/api/static-assembly-connectors.forge.js --hide "Bench.Slat0,Bench.Slat1"
92
- forgecad run examples/api/static-assembly-connectors.forge.js --details --history
93
- forgecad run examples/api/static-assembly-connectors.forge.js --spatial bounded
94
- forgecad run examples/products/cup.forge.js --connectivity
95
- forgecad run examples/products/cup.forge.js --journeys
96
- forgecad run examples/products/cup.forge.js --backend occt
97
- forgecad run examples/products/cup.forge.js --backend truck --quality live
98
- forgecad run examples/products/cup.forge.js --debug-imports
99
- forgecad run examples/products/cup.forge.js -p "Wall Thickness=3" -p "Body Height=200"
100
- forgecad run examples/constraints/06-complex-spectrogram.forge.js --solver-debug-out tmp/spectrogram-debug
101
- ```
102
-
103
- ### Object Filtering: `--focus` and `--hide`
104
-
105
- Several CLI commands can filter the visible object set without changing model code: `run`, `render 3d`, `render wireframe`, `inspect <family> <mode>`, `capture`, and `check print`.
106
-
107
- Use `forgecad run model.forge.js --quality live` to list returned object names quickly, then pass those names to `--focus` or `--hide`.
108
-
109
- ```bash
110
- forgecad run examples/api/static-assembly-connectors.forge.js --quality live
111
- forgecad render 3d examples/api/static-assembly-connectors.forge.js bench.png --focus "Bench.*"
112
- forgecad render 3d examples/api/static-assembly-connectors.forge.js slats.png --focus "Bench.Slat*"
113
- forgecad inspect fit interference examples/api/static-assembly-connectors.forge.js --focus "Bench.*"
114
- forgecad inspect visual objects examples/api/static-assembly-connectors.forge.js --hide "Bench.Slat0,Bench.Slat1" --camera iso
115
- ```
116
-
117
- Rules:
118
-
119
- - A bare `--focus` hides mock objects and keeps real objects.
120
- - `--focus name1,name2` renders only matching objects.
121
- - `--hide name1,name2` removes matching objects from the visible scene.
122
- - Matching is case-insensitive and supports `*` / `?` globs.
123
- - `--focus` and `--hide` are mutually exclusive.
124
- - Filtering happens after the script runs; it does not avoid evaluating the full model.
125
- - Filtering works on returned object names. For grouped children, use concrete child names or globs like `Bench.*`.
126
- - If a model unions many parts into one returned shape, the original parts cannot be isolated by CLI filtering.
127
- - Filtered renders fail when no renderable objects remain, and exact cameras report visible objects that are partially or fully outside the camera frame.
128
-
129
- ### `forgecad inspect`
130
-
131
- Inspect a model by asking for one explicit kind of evidence.
132
-
133
- `forgecad inspect` is the evidence-first inspection surface. Pick the job you want to verify, then choose the view like you would with `render 3d`.
134
-
135
- - `inspect history` — final-object feature recipes and feedback anchors
136
- - `inspect design-trace` — raw construction DAG, source spans, and cache diagnostics
137
- - `inspect section` — agent-native one-off section probe with optional ray rulers and replay JSON
138
- - `inspect replay` — rerun a saved section probe on the same or another source
139
- - `inspect visual image|cutaway|depth|normals|objects` — visual context, clipped 3D cutaways, depth, normals, and identity evidence
140
- - `inspect surface zebra|roughness` — surface continuity and roughness evidence
141
- - `inspect physical components|floating|gaps` — physical component graph evidence
142
- - `inspect fit interference` — positive-volume overlap evidence
143
- - `inspect manufacture thickness` — wall-thickness evidence
144
- - `inspect compare overlay` — candidate-vs-reference visual mismatch evidence
145
- - `inspect sections at|stack|sample` — exact section evidence for precise cuts, dense scans, or sparse samples
146
- - `inspect mechanical-integrity` — model-focused integrity audit for generated assemblies
147
-
148
- ```bash
149
- forgecad inspect history main.forge.js --object "Left Leg" --level object
150
- forgecad inspect design-trace main.forge.js --query feature:hole
151
- forgecad inspect fit interference main.forge.js --camera iso
152
- forgecad inspect visual cutaway main.forge.js --plane yz
153
- forgecad inspect visual objects main.forge.js --camera front --camera right
154
- forgecad inspect manufacture thickness main.forge.js --min 1.6 --warn 2.4
155
- forgecad inspect section main.forge.js --plane yz --ray bore:-20,0:20,0
156
- forgecad inspect replay outputs/inspect/<probe>/result.json --source candidate.forge.js
157
- forgecad inspect sections at main.forge.js --plane yz --offset 12.5
158
- forgecad inspect sections stack main.forge.js --plane yz --every 1
159
- forgecad inspect compare overlay candidate.forge.js --with reference.3mf
160
- ```
161
-
162
- | Command | Description |
163
- |---------|-------------|
164
- | `inspect visual image` | Capture standard shaded viewport evidence. |
165
- | `inspect visual objects` | Capture object identity evidence. |
166
- | `inspect section` | Run one exact section probe with optional ray rulers. |
167
- | `inspect replay` | Replay a saved section inspection result on a source model. |
168
- | `inspect fit interference` | Capture positive-volume interference evidence. |
169
- | `inspect manufacture thickness` | Capture wall-thickness evidence. |
170
- | `inspect sections at` | Capture one exact section at a plane offset. |
171
- | `inspect sections stack` | Capture periodic physical section slices. |
172
- | `inspect sections sample` | Capture a fixed number of representative section slices. |
173
- | `inspect compare overlay` | Capture candidate-vs-reference comparison evidence. |
174
- | `inspect evidence` | List available inspect commands. |
175
-
176
- ### `forgecad render`
177
-
178
- Render a Forge scene. Use a subcommand — `3d`, `views`, `section`, `wireframe`, `sketch`, or `hq`.
179
-
180
- `forgecad render` is a group of rendering subcommands. Pick one based on what you want:
181
-
182
- - `render 3d` — standard viewport PNG, the usual way to visually verify geometry
183
- - `render views` — list named cameras declared with `scene({ views })`
184
- - `render wireframe` — edges only, no shading
185
- - `render section` — 2D cross-section cut by a plane (SVG or PNG)
186
- - `render sketch` — 2D sketch script to PNG
187
- - `render hq` — path-traced via Blender Cycles, for documentation and marketing shots
188
-
189
- ```bash
190
- forgecad render 3d examples/products/cup.forge.js
191
- forgecad inspect fit interference examples/api/static-assembly-connectors.forge.js --camera iso
192
- forgecad render views examples/products/cup.forge.js
193
- forgecad render wireframe examples/products/cup.forge.js
194
- forgecad render section examples/furniture/01-table.forge.js --plane XZ
195
- forgecad render hq examples/products/cup.forge.js --preset dramatic
196
- ```
197
-
198
- ### `forgecad render 3d`
199
-
200
- Render a Forge scene to PNG using the real viewport renderer.
201
-
202
- 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.
203
-
204
- The input can be a `.forge.js` script or a direct `.stl`, `.obj`, `.3mf`, `.step`, or `.stp` asset. Direct STEP/STP rendering auto-selects OCCT unless you pass `--backend`.
205
-
206
- 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. Filtered renders report any visible objects whose bounding boxes are partially or fully outside the camera frame; exact cameras fail when they frame none of the visible objects.
207
-
208
- Use `--edges=<off|thin|bold>` to control the edge overlay. For a pure wireframe look, use `render wireframe` instead.
209
-
210
- This is the standard way to visually verify geometry from the CLI or in agent workflows. For higher quality (path-traced, materials, HDRI lighting), use `render hq` instead.
211
-
212
- ```bash
213
- forgecad render 3d examples/products/cup.forge.js
214
- forgecad render 3d examples/api/static-assembly-connectors.forge.js --focus
215
- forgecad render 3d examples/api/static-assembly-connectors.forge.js --focus "Bench.Slat*"
216
- forgecad render 3d examples/api/static-assembly-connectors.forge.js --hide "Bench.Slat0,Bench.Slat1"
217
- forgecad render 3d model.forge.js --view hero
218
- forgecad render 3d model.forge.js --camera 45:30
219
- forgecad render 3d model.forge.js --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38"
220
- forgecad render 3d model.forge.js --camera-json camera.json
221
- forgecad render 3d model.forge.js --scene scene.json
222
- forgecad render 3d model.forge.js --camera front --camera side
223
- forgecad render 3d model.forge.js -p "Wall Thickness=3"
224
- forgecad render 3d model.forge.js --edges bold
225
- forgecad render 3d model.forge.js --edges off
226
- forgecad render 3d bracket.3mf bracket.png
227
- ```
228
-
229
- ### `forgecad render views`
230
-
231
- List named camera views declared by a model with `scene({ views })`.
232
-
233
- 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`.
234
-
235
- ```bash
236
- forgecad render views model.forge.js
237
- forgecad render views model.forge.js --json
238
- ```
239
-
240
- ### `forgecad render wireframe`
241
-
242
- Render a Forge scene as a wireframe (edges only, no shading).
243
-
244
- Same as `render 3d` but renders only the edge geometry — no shaded surfaces. Useful for construction-style documentation or highlighting structural features without material detail.
245
-
246
- ```bash
247
- forgecad render wireframe examples/products/cup.forge.js
248
- forgecad render wireframe examples/products/cup.forge.js --camera iso
249
- ```
250
-
251
- ### `forgecad render hq` **\[Pro\]**
252
-
253
- High-quality render via Blender Cycles — path-traced, HDRI, material presets.
254
-
255
- Exports the scene to Blender and renders with Cycles (path tracer). Requires Blender installed and on PATH.
256
-
257
- 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).
258
-
259
- Output defaults to `<script-name>-hq.png`. Great for documentation, marketing renders, and social media.
260
-
261
- ```bash
262
- forgecad render hq examples/products/cup.forge.js
263
- forgecad render hq examples/products/cup.forge.js hero.png --preset dramatic --samples 1024
264
- forgecad render hq examples/products/cup.forge.js hero.png --view hero
265
- forgecad render hq examples/products/cup.forge.js hero.png --camera-json camera.json
266
- forgecad render hq examples/products/cup.forge.js --preset clay --size 2048
267
- forgecad render hq examples/products/cup.forge.js --transparent --preset glass
268
- ```
269
-
270
- ### `forgecad capture gif|mp4` **\[Pro\]**
271
-
272
- Animated orbit or joint playback.
273
-
274
- 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.
275
-
276
- ```bash
277
- forgecad capture gif examples/products/cup.forge.js
278
- forgecad capture gif examples/3d-printer.forge.js out/section.gif --cut-plane "Front Section"
279
- forgecad capture gif model.forge.js out/raw.gif --param "Output=raw-sdf"
280
- forgecad capture gif model.forge.js out/front.gif --camera front
281
- forgecad capture gif model.forge.js out/hero.gif --view hero
282
- forgecad capture gif examples/3d-printer.forge.js out/sweep.gif --capture section-sweep --sweep-plane YZ
283
- forgecad capture mp4 examples/products/cup.forge.js
284
- forgecad capture mp4 examples/api/runtime-joints-view.forge.js out/step.mp4 --capture animation --animation Step
285
- forgecad capture mp4 model.forge.js out/raw.mp4 --param "Output=raw-sdf"
286
- forgecad capture mp4 model.forge.js out/front.mp4 --camera front
287
- forgecad capture mp4 model.forge.js out/hero.mp4 --view hero
288
- forgecad capture mp4 examples/3d-printer.forge.js out/sweep.mp4 --capture section-sweep --sweep-plane YZ --sweep-frames 180
289
- ```
290
-
291
- ### `forgecad render section`
292
-
293
- Render a 2D cross-section of a 3D model (cut by a plane) to SVG or PNG.
294
-
295
- Cuts all shapes in the scene with an axis-aligned plane and produces a 2D cross-section drawing. The default plane is XY at Z=0. Use `--plane XZ` or `--plane YZ` for other orientations, and `--offset` to shift the cut position.
296
-
297
- Output format is determined by the file extension: `.svg` (default, vector) or `.png` (rasterized at `--size` pixels). Use `--edges=<off|thin|bold>` to control the outline stroke on cut shapes.
298
-
299
- Useful for verifying internal geometry, wall thicknesses, and fit checks that aren't visible in 3D renders.
300
-
301
- ```bash
302
- forgecad render section examples/furniture/01-table.forge.js
303
- forgecad render section examples/furniture/01-table.forge.js out/section.svg --plane XZ --offset 10
304
- forgecad render section examples/furniture/01-table.forge.js out/section.png --size 2048
305
- forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edges bold
306
- ```
307
-
308
- | Command | Description |
309
- |---------|-------------|
310
- | `render sketch` | Render a 2D sketch .forge.js to PNG. |
311
-
312
- <details>
313
- <summary>All render / capture flags</summary>
314
-
315
- | Option | Description |
316
- |--------|-------------|
317
- | `--param <Key=Value>` | Override a parameter value (Key=Value). Repeatable. |
318
- | `-p <Key=Value>` | Shorthand for --param |
319
- | `--focus <names>` | Focus: no arg hides mocks; comma-separated names/globs show only those |
320
- | `--hide <names>` | Hide comma-separated object names/globs |
321
- | `--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. |
322
- | `--camera-json <file>` | Exact viewport camera JSON file |
323
- | `--view <name>` | Named camera view declared by the model with scene({ views }) |
324
- | `--size <px>` | Image size in pixels |
325
- | `--scene <json\|file>` | Viewport scene state JSON or JSON file |
326
- | `--background <color>` | Canvas background override |
327
- | `--render-mode <solid\|wireframe>` | Shaded solid (default) or wireframe only |
328
- | `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: off) |
329
- | `--render-style <classic\|studio\|fast\|glass\|inspection\|precision\|hybrid\|scan>` | Visual render style (render default: classic; inspect default: inspection) |
330
- | `--scan-granularity <12-72>` | Scan cells across the scene longest axis |
331
- | `--port <n>` | Vite dev server port |
332
- | `--fresh-server` | Start a fresh renderer instead of reusing an existing one |
333
- | `--chrome-path <path>` | Chrome or Chromium executable path |
334
- | `--output <path>` | Output file path |
335
- | `--json` | Print machine-readable JSON |
336
- | `--quality <default\|live\|high>` | Mesh quality preset |
337
- | `--backend <manifold\|occt\|truck>` | Geometry backend (default: manifold) |
338
- | `--preset <name>` | Material/lighting preset |
339
- | `--width <px>` | Output width in pixels |
340
- | `--height <px>` | Output height in pixels |
341
- | `--samples <n>` | Render samples (more = higher quality, slower) |
342
- | `--engine <cycles\|eevee>` | Render engine |
343
- | `--transparent` | Transparent background (RGBA) |
344
- | `--no-denoise` | Disable denoising |
345
- | `--hdri <path.hdr>` | Custom HDRI environment map path |
346
- | `--video` | Render orbit turntable video (MP4) |
347
- | `--frames <n>` | Video frames per revolution |
348
- | `--fps <n>` | Video frame rate |
349
- | `--pitch <deg>` | Camera pitch angle in degrees |
350
- | `--format <gif\|mp4>` | Output format |
351
- | `--capture <orbit\|animation\|section-sweep>` | Capture preset |
352
- | `--animation <name>` | Named jointsView animation clip |
353
- | `--animation-loops <n>` | Repeat the selected animation clip |
354
- | `--cut-plane <name>` | Enable a named cut plane |
355
- | `--sweep-plane <XY\|XZ\|YZ>` | Moving plane for section-sweep |
356
- | `--sweep-normal <x,y,z>` | Custom section-sweep normal |
357
- | `--sweep-from <min\|max\|offset>` | Section-sweep start offset |
358
- | `--sweep-to <min\|max\|offset>` | Section-sweep end offset |
359
- | `--sweep-padding <n>` | Auto sweep range padding in model units |
360
- | `--sweep-frames <n>` | Moving frames for section-sweep |
361
- | `--sweep-ease <linear\|smoothstep>` | Section-sweep interpolation |
362
- | `--section-style <hatched\|clean>` | Section cap style for sweep captures |
363
- | `--wireframe-pass` | Enable an extra wireframe pass (off by default) |
364
- | `--no-wireframe-pass` | Disable the extra wireframe pass |
365
- | `--pixel-ratio <n>` | Render supersampling factor |
366
- | `--frames-per-turn <n>` | Frames for one orbit turn |
367
- | `--hold-frames <n>` | Freeze frames before each pass |
368
- | `--encoder <auto\|ffmpeg\|js>` | GIF encoder strategy |
369
- | `--crf <n>` | ffmpeg/libx264 quality |
370
- | `--ffmpeg-path <path>` | ffmpeg executable path |
371
- | `--list` | Print available animations and cut planes |
372
-
373
- </details>
374
-
375
- ## Export
376
-
377
- Export to every format you need. Export actions are free to run for personal non-commercial use; Pro covers human-operated commercial CAD work, and Enterprise covers backend or embedded application usage.
378
-
379
- | Command | Format | Use case |
380
- |---------|--------|----------|
381
- | `cut-list` **\[Production\]** | Terminal | Grouped sheet-material cut list from `sheetStock()` |
382
- | `export svg` | SVG | 2D vector output from sketches |
383
- | `export sketch-pdf` **\[Production\]** | PDF | Sketch with dimensions and constraints |
384
- | `export step` **\[Production\]** | STEP | CAD interchange (exact geometry) |
385
- | `export brep` **\[Production\]** | BREP | Boundary representation |
386
- | `export 3mf` | 3MF | 3D printing (color, multi-part) |
387
- | `export stl` | STL | 3D printing |
388
- | `export gcode` **\[Production\]** | G-code | Toolpath (scripted, not sliced) |
389
- | `export sdf` **\[Production\]** | SDF package | Gazebo robot simulation |
390
- | `export urdf` **\[Production\]** | URDF package | ROS / PyBullet / MuJoCo |
391
- | `export report` **\[Production\]** | PDF report | Multi-view report with BOM and dimensions |
392
- | `export cutting-layout` **\[Production\]** | PDF/DXF | Sheet cutting layout with cut sequence |
393
- | `link` | URL | Generate a ForgeCAD share link from a GitHub Gist URL or ID and copy it to clipboard. |
394
-
395
- ```bash
396
- # Sheet material
397
- forgecad cut-list examples/api/sheet-stock-cut-list.forge.js
398
- forgecad export cutting-layout examples/api/sheet-stock-cut-list.forge.js --sheet-width 420 --sheet-height 594 --kerf 3
399
- forgecad export cutting-layout examples/api/sheet-stock-cut-list.forge.js out/layout.dxf
400
-
401
- # 3D printing
402
- forgecad check print bracket.forge.js
403
- forgecad export stl bracket.forge.js
404
- forgecad export 3mf bracket.forge.js --quality high
405
-
406
- # CAD interchange
407
- forgecad export step bracket.forge.js
408
-
409
- # Technical drawings
410
- forgecad export report bracket.forge.js out/report.pdf
411
-
412
- # Robot simulation
413
- forgecad export sdf rover.forge.js --output out/forge_scout
414
- ```
415
-
416
- <details>
417
- <summary>Export flags</summary>
418
-
419
- | Option | Description |
420
- |--------|-------------|
421
- | `--output <path>` | Output STEP path |
422
- | `--quality <default\|live\|high>` | Forge quality preset |
423
- | `--backend <manifold\|occt\|truck>` | Geometry backend (default: manifold) |
424
- | `-o <path>` | Shorthand for --output |
425
- | `--dim-angle-tol <deg>` | Dimension routing tolerance in degrees |
426
- | `--format <pdf\|dxf>` | Output format |
427
- | `--sheet-width <mm>` | Stock sheet width in mm |
428
- | `--sheet-height <mm>` | Stock sheet height in mm |
429
- | `--kerf <mm>` | Cutting clearance (saw blade width) in mm |
430
-
431
- </details>
432
-
433
- ## Projects & Publishing
434
-
435
- ForgeCAD has a hosted platform at [forgecad.io](https://forgecad.io). The CLI connects a dedicated local project folder to it.
436
-
437
- A project is a local folder linked to the hosted app by `forgecad.json`. Use `forgecad project clone <slug>` to download an existing hosted project into a local folder, or run `forgecad project init` inside a folder that should become a new ForgeCAD project. Open local projects with `forgecad studio <project-path>`.
438
-
439
- Keep the project root small and intentional. Do not run the editor from `~`, downloads, desktop, or a huge source tree. ForgeCAD scans project files such as `.forge.js`, `.js`, `.svg`, and `.dxf`; broad roots make local workflows and AI-agent context slow and confusing.
440
-
441
- ### Get started
442
-
443
- ```bash
444
- forgecad login
445
- mkdir spool-adapter
446
- cd spool-adapter
447
- forgecad project init "Spool Adapter"
448
- forgecad new adapter --template part
449
- forgecad studio .
450
-
451
- # or clone an existing hosted project:
452
- forgecad project clone start-here
453
- cd start-here
454
- forgecad studio .
455
- ```
456
-
457
- `forgecad login` asks how you want to sign in, then prompts for either email/password or an API token. If your account was created through GitHub or Google, create an API token in Settings > API Tokens, run `forgecad login`, and choose API token. Use `FORGECAD_TOKEN=fc_pat_...` only for CI/CD and one-off automation. See [Platform authentication](platform/auth.md#cli-auth-for-oauth-accounts) for details.
458
-
459
- `forgecad project init` creates the remote project, writes `forgecad.json`, pushes any existing local source files, and records server file IDs. `forgecad project push` syncs an already initialized project; it does not create a remote project from an arbitrary folder.
460
-
461
- ### Sync
462
-
463
- ```bash
464
- forgecad project push # Upload local changes
465
- forgecad project pull # Download remote changes
466
- forgecad project status # See what's different
467
- ```
468
-
469
- ### Publish
470
-
471
- ```bash
472
- forgecad project publish adapter.forge.js --title "AMS Lite Adapter"
473
- ```
474
-
475
- Shares are live references — always the current version, not a snapshot.
476
-
477
- <details>
478
- <summary>All project commands</summary>
479
-
480
- **Authentication**
481
-
482
- | Command | Description |
483
- |---------|-------------|
484
- | `login` | Authenticate with ForgeCAD interactively. |
485
- | `logout` | Clear stored authentication credentials. |
486
- | `whoami` | Show the current user, server, and license status. |
487
-
488
- **Projects**
489
-
490
- | Command | Description |
491
- |---------|-------------|
492
- | `project init` | Initialize the current directory as a ForgeCAD project and create it on the server. |
493
- | `project clone` | Download a remote project into a new local directory. |
494
- | `project pull` | Download remote changes into the current project. |
495
- | `project push` | Upload local changes to the remote project. |
496
- | `project status` | Show differences between local and remote project files. |
497
- | `project list` | List your remote projects. |
498
- | `project open` | Open the current project in the browser. |
499
- | `project info` | Show details of the current project (name, visibility, files, URL). |
500
- | `project rename` | Rename the current project. |
501
- | `project set-visibility` | Change project visibility. |
502
- | `project delete` | Permanently delete the current project and all its files on the server. |
503
-
504
- **Members**
505
-
506
- | Command | Description |
507
- |---------|-------------|
508
- | `project members` | List members of the current project. |
509
- | `project add-member` | Add a member to the current project. |
510
- | `project remove-member` | Remove a member from the current project. |
511
- | `project set-role` | Change a member's role. |
512
-
513
- **Remote files**
514
-
515
- | Command | Description |
516
- |---------|-------------|
517
- | `project file list` | List remote files in the current project. |
518
- | `project file read` | Read a remote file and print its contents. |
519
- | `project file save` | Create or update a remote file. Reads from local file, --content, or --stdin. |
520
- | `project file delete` | Delete a remote file. |
521
- | `project file rename` | Rename or move a remote file. |
522
- | `project file mkdir` | Create a directory in the remote project. |
523
- | `project file copy` | Copy a file from another project into the current one. |
524
-
525
- **Shares**
526
-
527
- | Command | Description |
528
- |---------|-------------|
529
- | `project publish` | Publish a model and get a shareable link. Auto-syncs project if inside one. |
530
- | `project shares list` | List your published models. |
531
- | `project shares delete` | Unpublish a shared model. |
532
-
533
- **API Tokens**
534
-
535
- | Command | Description |
536
- |---------|-------------|
537
- | `token create` | Create a new API token for CLI and CI/CD access. |
538
- | `token list` | List your API tokens. |
539
- | `token revoke` | Revoke an API token. |
540
-
541
- **Scaffolding**
542
-
543
- | Command | Description |
544
- |---------|-------------|
545
- | `new` | Create a new .forge.js file from a template. |
546
-
547
- </details>
548
-
549
- ## AI Integration
550
-
551
- ForgeCAD files are plain JavaScript. AI coding agents should work inside an initialized project folder, write and iterate on local files, and use the CLI for evidence. See [AI Usage](AI/usage.md) for approved models, project-first setup, installable skills, quality prompts, and completion criteria.
552
-
553
- ```bash
554
- # Install the full public ForgeCAD skill library
555
- forgecad skill install
556
-
557
- # Target a specific local agent skill directory when needed
558
- forgecad skill install --target claude
559
- forgecad skill install --target opencode
560
-
561
- # Or export a single context file for chat UIs (Claude.ai, ChatGPT, ...)
562
- forgecad skill one-file ~/Desktop/forgecad-context.md
563
-
564
- # Or export one flattened Markdown file per bundled skill
565
- forgecad skill flattened-files ~/Desktop/forgecad-skills
566
- ```
567
-
568
- > **Workflow:** Agent writes the model -> `forgecad run` validates it -> `forgecad inspect mechanical-integrity` catches disconnected AI-slop patterns -> `forgecad check print` catches printability risks -> `forgecad inspect fit interference` or another targeted inspection command produces visual evidence -> export ships the result. All in the terminal.
569
-
570
- ## Validation
571
-
572
- Check printability and run focused model integrity reviews.
573
-
574
- ### `forgecad compare 3d`
575
-
576
- Score geometric similarity between two ForgeCAD scripts or imported 3D assets.
577
-
578
- Runs both inputs headlessly, samples their triangle surfaces, feature edges, bounds, and volume. Use this to grade a reconstructed `.forge.js` model against a reference `.stl`, `.obj`, `.3mf`, `.step`, or `.stp` file. The overall 0-100 score uses multi-threshold bidirectional surface F-scores, sharp/boundary feature-edge F-scores, dimension agreement, volume IoU, and hard caps; JSON output includes threshold, feature, cap, and distance metrics for automation.
579
-
580
- ```bash
581
- forgecad compare 3d reference.stl reconstruction.forge.js
582
- forgecad compare 3d reference.step reconstruction.forge.js --json --samples 3000
583
- forgecad compare 3d source.3mf candidate.3mf --align center --tolerance-mm 0.5 --fail-under 90
584
- ```
585
-
586
- ### `forgecad check print`
587
-
588
- Run fast 3D-print readiness checks for collisions, mesh health, walls, overhangs, and bed contact.
589
-
590
- 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.
591
-
592
- 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.
593
-
594
- ```bash
595
- forgecad check print examples/api/attachTo-basics.forge.js
596
- forgecad check print examples/api/verification-demo.forge.js --json
597
- forgecad check print model.forge.js --min-wall 1.2 --warn-wall 2
598
- forgecad check print model.forge.js --expect-components 1 -p "Wall Thickness=3"
599
- ```
600
-
601
- ### `forgecad inspect mechanical-integrity`
602
-
603
- Inspect generated ForgeCAD models for mechanical integrity failures.
604
-
605
- Scans a Forge script or a folder of generated projects and runs a mechanical integrity inspection. The inspection flags timeouts, runtime errors, missing `verify.*` checks, missing executed mechanical-interface checks, fragmented named groups, uncontracted manual assemblies, optional positive-volume object collisions, and excessive physical component counts when requested. Markdown details include suggested repair patterns such as connector-authored mates, bolted service covers, pinned levers, captured slides, hinges, clevis joints, retained shafts, and seated bearings. When `--collisions` is enabled, the Markdown details list the largest overlapping object pairs by volume so agents can repair the highest-risk interfaces first. Exact collision checks use a default 40-pair bbox-overlap budget and 30s exact-check time budget; exhausting either budget fails the file instead of silently passing a partial check. Script-authored `console.warn()` diagnostics are reported as warnings; use `verify.*` checks or `console.error()` for gate-failing contracts. Script-side joint sweeps use a separate validation step budget so the gate can keep default geometry quality while failing truncated validation explicitly.
606
-
607
- ```bash
608
- forgecad inspect mechanical-integrity path/to/generated-models
609
- forgecad inspect mechanical-integrity path/to/model/main.forge.js --min-verifications 2
610
- forgecad inspect mechanical-integrity path/to/model/main.forge.js --collisions
611
- forgecad inspect mechanical-integrity path/to/generated-models --collisions --collision-pair-limit 250
612
- forgecad inspect mechanical-integrity path/to/generated-models --json --timeout-ms 40000 --jobs 4
613
- ```
614
-
615
- <details>
616
- <summary>Debug commands (ForgeCAD development)</summary>
617
-
618
- | Command | Description |
619
- |---------|-------------|
620
- | `debug compiler` | Inspect compiler routes, lowered plans, and runtime snapshots for a script. |
621
- | `debug dimensions` | Inspect report-dimension routing for a script. |
622
- | `debug faces` | Inspect face transformation histories for a script. |
623
-
624
- </details>
625
-
626
- ## Setup & Licensing
627
-
628
- | Command | Description |
629
- |---------|-------------|
630
- | `completion` | Generate shell completion scripts for bash, zsh, or fish. |
631
- | `whoami` | Show the current user, server, and license status. |
632
- | `new` | Create a new .forge.js file from a template. |
633
- | `doctor` | Check system dependencies for all CLI features. |
634
-
635
- ### Licensing
636
-
637
- The CLI is free for personal non-commercial use. Pro covers human-operated commercial CAD work, including designing models for customers. Enterprise covers backend, hosted, embedded, or application workflows that call ForgeCAD automatically.
638
-
639
- | Free | Production outputs | Pro | Enterprise |
640
- |------|--------------------|-----|------------|
641
- | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `compare 3d`, `check print`, `inspect fit interference`, `inspect mechanical-integrity` for personal non-commercial use | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export sdf`, `export urdf`, `export report`, `export cutting-layout` are free to run for personal non-commercial use; Pro covers human-operated commercial CAD work | `render hq`, `capture gif`, `capture mp4` plus commercial coverage for client/customer work | Backend, hosted, embedded, or application workflows that call ForgeCAD automatically |
642
-
643
- ```bash
644
- forgecad license # Check signed-in account status
645
- forgecad license activate # Activate Pro for the signed-in account
646
- forgecad license deactivate # Remove license
647
- ```