copperflow 0.3.4 → 0.4.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.
Files changed (295) hide show
  1. package/README.md +107 -13
  2. package/dist/app/THIRD_PARTY_LICENSES.txt +5 -0
  3. package/dist/app/assets/NewPartDialog-BBJaZFCo.js +160 -0
  4. package/dist/app/assets/VerifyPartDialog-BHLqD_WJ.css +1 -0
  5. package/dist/app/assets/VerifyPartDialog-Ey6xpQ_U.js +2 -0
  6. package/dist/app/assets/index-BKoIKo22.css +1 -0
  7. package/dist/app/assets/index-DPmr2dR1.js +20 -0
  8. package/dist/app/assets/texture-worker-CyI_g_XZ.js +1 -0
  9. package/dist/app/index.html +2 -2
  10. package/dist/cli-commands.js +120 -16
  11. package/dist/cli-commands.js.map +1 -1
  12. package/dist/cli-impedance.d.ts +4 -0
  13. package/dist/cli-impedance.js +56 -0
  14. package/dist/cli-impedance.js.map +1 -0
  15. package/dist/cli-simulate.d.ts +3 -0
  16. package/dist/cli-simulate.js +54 -0
  17. package/dist/cli-simulate.js.map +1 -0
  18. package/dist/core/analyze.js +5 -2
  19. package/dist/core/analyze.js.map +1 -1
  20. package/dist/core/bom.d.ts +6 -1
  21. package/dist/core/bom.js +23 -4
  22. package/dist/core/bom.js.map +1 -1
  23. package/dist/core/case-results.d.ts +4 -0
  24. package/dist/core/case-results.js +9 -0
  25. package/dist/core/case-results.js.map +1 -0
  26. package/dist/core/change-files.d.ts +31 -0
  27. package/dist/core/change-files.js +67 -0
  28. package/dist/core/change-files.js.map +1 -0
  29. package/dist/core/change-render.d.ts +18 -0
  30. package/dist/core/change-render.js +48 -0
  31. package/dist/core/change-render.js.map +1 -0
  32. package/dist/core/change-view.d.ts +33 -0
  33. package/dist/core/change-view.js +73 -0
  34. package/dist/core/change-view.js.map +1 -0
  35. package/dist/core/change-words.d.ts +39 -0
  36. package/dist/core/change-words.js +214 -0
  37. package/dist/core/change-words.js.map +1 -0
  38. package/dist/core/checklist-text.d.ts +21 -0
  39. package/dist/core/checklist-text.js +59 -0
  40. package/dist/core/checklist-text.js.map +1 -0
  41. package/dist/core/edit.js +5 -2
  42. package/dist/core/edit.js.map +1 -1
  43. package/dist/core/fabrication.d.ts +9 -2
  44. package/dist/core/fabrication.js +29 -10
  45. package/dist/core/fabrication.js.map +1 -1
  46. package/dist/core/library.d.ts +46 -0
  47. package/dist/core/library.js +54 -16
  48. package/dist/core/library.js.map +1 -1
  49. package/dist/core/modules.d.ts +1 -0
  50. package/dist/core/modules.js +17 -0
  51. package/dist/core/modules.js.map +1 -1
  52. package/dist/core/order-report.d.ts +10 -0
  53. package/dist/core/order-report.js +93 -0
  54. package/dist/core/order-report.js.map +1 -0
  55. package/dist/core/pin-header.d.ts +5 -0
  56. package/dist/core/pin-header.js +77 -0
  57. package/dist/core/pin-header.js.map +1 -0
  58. package/dist/core/pin-map.d.ts +46 -0
  59. package/dist/core/pin-map.js +101 -0
  60. package/dist/core/pin-map.js.map +1 -0
  61. package/dist/core/render.d.ts +24 -4
  62. package/dist/core/render.js +16 -6
  63. package/dist/core/render.js.map +1 -1
  64. package/dist/core/sheet-card.d.ts +4 -0
  65. package/dist/core/sheet-card.js +46 -1
  66. package/dist/core/sheet-card.js.map +1 -1
  67. package/dist/core/sheet-files.js +10 -3
  68. package/dist/core/sheet-files.js.map +1 -1
  69. package/dist/core/simulate.d.ts +19 -0
  70. package/dist/core/simulate.js +72 -0
  71. package/dist/core/simulate.js.map +1 -0
  72. package/dist/core/step-export.d.ts +17 -0
  73. package/dist/core/step-export.js +35 -0
  74. package/dist/core/step-export.js.map +1 -0
  75. package/dist/core/supplier-prop.d.ts +6 -0
  76. package/dist/core/supplier-prop.js +21 -0
  77. package/dist/core/supplier-prop.js.map +1 -0
  78. package/dist/core/workspace.d.ts +2 -1
  79. package/dist/core/workspace.js +2 -1
  80. package/dist/core/workspace.js.map +1 -1
  81. package/dist/engine/board.js +3 -1
  82. package/dist/engine/board.js.map +1 -1
  83. package/dist/engine/checks/fast-lines.d.ts +60 -0
  84. package/dist/engine/checks/fast-lines.js +209 -0
  85. package/dist/engine/checks/fast-lines.js.map +1 -0
  86. package/dist/engine/checks/index.js +2 -0
  87. package/dist/engine/checks/index.js.map +1 -1
  88. package/dist/engine/design-diff.d.ts +120 -0
  89. package/dist/engine/design-diff.js +249 -0
  90. package/dist/engine/design-diff.js.map +1 -0
  91. package/dist/engine/design.d.ts +3 -0
  92. package/dist/engine/design.js +7 -2
  93. package/dist/engine/design.js.map +1 -1
  94. package/dist/engine/fab/export.d.ts +17 -1
  95. package/dist/engine/fab/export.js +26 -4
  96. package/dist/engine/fab/export.js.map +1 -1
  97. package/dist/engine/fab/names.d.ts +2 -2
  98. package/dist/engine/fab/names.js +4 -2
  99. package/dist/engine/fab/names.js.map +1 -1
  100. package/dist/engine/fab/picture/board-picture.d.ts +52 -0
  101. package/dist/engine/fab/picture/board-picture.js +102 -0
  102. package/dist/engine/fab/picture/board-picture.js.map +1 -0
  103. package/dist/engine/fab/picture/board-view.d.ts +20 -0
  104. package/dist/engine/fab/picture/board-view.js +50 -0
  105. package/dist/engine/fab/picture/board-view.js.map +1 -0
  106. package/dist/engine/fab/picture/compose.d.ts +50 -0
  107. package/dist/engine/fab/picture/compose.js +208 -0
  108. package/dist/engine/fab/picture/compose.js.map +1 -0
  109. package/dist/engine/fab/picture/layer-images.d.ts +9 -0
  110. package/dist/engine/fab/picture/layer-images.js +67 -0
  111. package/dist/engine/fab/picture/layer-images.js.map +1 -0
  112. package/dist/engine/fab/picture/looks.d.ts +152 -0
  113. package/dist/engine/fab/picture/looks.js +53 -0
  114. package/dist/engine/fab/picture/looks.js.map +1 -0
  115. package/dist/engine/fab/picture/png.d.ts +31 -0
  116. package/dist/engine/fab/picture/png.js +47 -0
  117. package/dist/engine/fab/picture/png.js.map +1 -0
  118. package/dist/engine/fab/picture/raster.d.ts +46 -0
  119. package/dist/engine/fab/picture/raster.js +170 -0
  120. package/dist/engine/fab/picture/raster.js.map +1 -0
  121. package/dist/engine/fab/zip.d.ts +2 -1
  122. package/dist/engine/fab/zip.js +1 -1
  123. package/dist/engine/fab/zip.js.map +1 -1
  124. package/dist/engine/impedance.d.ts +72 -0
  125. package/dist/engine/impedance.js +133 -0
  126. package/dist/engine/impedance.js.map +1 -0
  127. package/dist/engine/line-length.d.ts +15 -0
  128. package/dist/engine/line-length.js +116 -0
  129. package/dist/engine/line-length.js.map +1 -0
  130. package/dist/engine/model.d.ts +2 -0
  131. package/dist/engine/model.js.map +1 -1
  132. package/dist/engine/pcb-place/roles.d.ts +3 -1
  133. package/dist/engine/pcb-place/roles.js +5 -0
  134. package/dist/engine/pcb-place/roles.js.map +1 -1
  135. package/dist/engine/rules/impedance-widths.d.ts +20 -0
  136. package/dist/engine/rules/impedance-widths.js +57 -0
  137. package/dist/engine/rules/impedance-widths.js.map +1 -0
  138. package/dist/engine/rules/load.js +11 -2
  139. package/dist/engine/rules/load.js.map +1 -1
  140. package/dist/engine/rules/pairs.d.ts +27 -0
  141. package/dist/engine/rules/pairs.js +86 -0
  142. package/dist/engine/rules/pairs.js.map +1 -0
  143. package/dist/engine/rules/profiles.js +16 -0
  144. package/dist/engine/rules/profiles.js.map +1 -1
  145. package/dist/engine/rules/schema.d.ts +44 -0
  146. package/dist/engine/rules/schema.js +16 -1
  147. package/dist/engine/rules/schema.js.map +1 -1
  148. package/dist/engine/sim/answer.d.ts +13 -0
  149. package/dist/engine/sim/answer.js +101 -0
  150. package/dist/engine/sim/answer.js.map +1 -0
  151. package/dist/engine/sim/cases.d.ts +29 -0
  152. package/dist/engine/sim/cases.js +63 -0
  153. package/dist/engine/sim/cases.js.map +1 -0
  154. package/dist/engine/sim/devices.d.ts +109 -0
  155. package/dist/engine/sim/devices.js +137 -0
  156. package/dist/engine/sim/devices.js.map +1 -0
  157. package/dist/engine/sim/elements.d.ts +49 -0
  158. package/dist/engine/sim/elements.js +2 -0
  159. package/dist/engine/sim/elements.js.map +1 -0
  160. package/dist/engine/sim/from-circuit.d.ts +52 -0
  161. package/dist/engine/sim/from-circuit.js +354 -0
  162. package/dist/engine/sim/from-circuit.js.map +1 -0
  163. package/dist/engine/sim/limits.d.ts +12 -0
  164. package/dist/engine/sim/limits.js +79 -0
  165. package/dist/engine/sim/limits.js.map +1 -0
  166. package/dist/engine/sim/linear.d.ts +2 -0
  167. package/dist/engine/sim/linear.js +49 -0
  168. package/dist/engine/sim/linear.js.map +1 -0
  169. package/dist/engine/sim/model-schema.d.ts +246 -0
  170. package/dist/engine/sim/model-schema.js +115 -0
  171. package/dist/engine/sim/model-schema.js.map +1 -0
  172. package/dist/engine/sim/part-models.d.ts +47 -0
  173. package/dist/engine/sim/part-models.js +102 -0
  174. package/dist/engine/sim/part-models.js.map +1 -0
  175. package/dist/engine/sim/run.d.ts +14 -0
  176. package/dist/engine/sim/run.js +13 -0
  177. package/dist/engine/sim/run.js.map +1 -0
  178. package/dist/engine/sim/solve.d.ts +42 -0
  179. package/dist/engine/sim/solve.js +294 -0
  180. package/dist/engine/sim/solve.js.map +1 -0
  181. package/dist/engine/sim/spice.d.ts +5 -0
  182. package/dist/engine/sim/spice.js +66 -0
  183. package/dist/engine/sim/spice.js.map +1 -0
  184. package/dist/engine/sim/values.d.ts +4 -0
  185. package/dist/engine/sim/values.js +40 -0
  186. package/dist/engine/sim/values.js.map +1 -0
  187. package/dist/engine/solid/heights.d.ts +29 -0
  188. package/dist/engine/solid/heights.js +87 -0
  189. package/dist/engine/solid/heights.js.map +1 -0
  190. package/dist/engine/solid/limits.d.ts +7 -0
  191. package/dist/engine/solid/limits.js +20 -0
  192. package/dist/engine/solid/limits.js.map +1 -0
  193. package/dist/engine/solid/model.d.ts +54 -0
  194. package/dist/engine/solid/model.js +147 -0
  195. package/dist/engine/solid/model.js.map +1 -0
  196. package/dist/engine/solid/step.d.ts +5 -0
  197. package/dist/engine/solid/step.js +164 -0
  198. package/dist/engine/solid/step.js.map +1 -0
  199. package/dist/engine/solid/thickness.d.ts +11 -0
  200. package/dist/engine/solid/thickness.js +10 -0
  201. package/dist/engine/solid/thickness.js.map +1 -0
  202. package/dist/library/kicad/board.d.ts +26 -0
  203. package/dist/library/kicad/board.js +96 -0
  204. package/dist/library/kicad/board.js.map +1 -0
  205. package/dist/library/kicad/copper.d.ts +44 -0
  206. package/dist/library/kicad/copper.js +106 -0
  207. package/dist/library/kicad/copper.js.map +1 -0
  208. package/dist/library/kicad/footprints.d.ts +62 -0
  209. package/dist/library/kicad/footprints.js +184 -0
  210. package/dist/library/kicad/footprints.js.map +1 -0
  211. package/dist/library/kicad/geometry.d.ts +36 -0
  212. package/dist/library/kicad/geometry.js +84 -0
  213. package/dist/library/kicad/geometry.js.map +1 -0
  214. package/dist/library/kicad/import.d.ts +58 -0
  215. package/dist/library/kicad/import.js +240 -0
  216. package/dist/library/kicad/import.js.map +1 -0
  217. package/dist/library/kicad/plan.d.ts +40 -0
  218. package/dist/library/kicad/plan.js +139 -0
  219. package/dist/library/kicad/plan.js.map +1 -0
  220. package/dist/library/kicad/read.d.ts +30 -0
  221. package/dist/library/kicad/read.js +105 -0
  222. package/dist/library/kicad/read.js.map +1 -0
  223. package/dist/library/kicad/sexpr.d.ts +36 -0
  224. package/dist/library/kicad/sexpr.js +153 -0
  225. package/dist/library/kicad/sexpr.js.map +1 -0
  226. package/dist/library/kicad/tally.d.ts +32 -0
  227. package/dist/library/kicad/tally.js +55 -0
  228. package/dist/library/kicad/tally.js.map +1 -0
  229. package/dist/library/kicad/write.d.ts +37 -0
  230. package/dist/library/kicad/write.js +146 -0
  231. package/dist/library/kicad/write.js.map +1 -0
  232. package/dist/library/new-part.d.ts +2 -0
  233. package/dist/library/new-part.js +1 -0
  234. package/dist/library/new-part.js.map +1 -1
  235. package/dist/mcp/board-import-tool.d.ts +1 -1
  236. package/dist/mcp/board-import-tool.js +14 -4
  237. package/dist/mcp/board-import-tool.js.map +1 -1
  238. package/dist/mcp/copper-summary.d.ts +2 -0
  239. package/dist/mcp/copper-summary.js +4 -2
  240. package/dist/mcp/copper-summary.js.map +1 -1
  241. package/dist/mcp/create-part.d.ts +23 -0
  242. package/dist/mcp/create-part.js +1 -0
  243. package/dist/mcp/create-part.js.map +1 -1
  244. package/dist/mcp/fast-summary.d.ts +3 -0
  245. package/dist/mcp/fast-summary.js +46 -0
  246. package/dist/mcp/fast-summary.js.map +1 -0
  247. package/dist/mcp/render-tool.d.ts +33 -2
  248. package/dist/mcp/render-tool.js +21 -5
  249. package/dist/mcp/render-tool.js.map +1 -1
  250. package/dist/mcp/server.js +18 -8
  251. package/dist/mcp/server.js.map +1 -1
  252. package/dist/mcp/sheet-card-tools.d.ts +3 -1
  253. package/dist/mcp/sheet-card-tools.js +3 -1
  254. package/dist/mcp/sheet-card-tools.js.map +1 -1
  255. package/dist/mcp/simulate-tool.d.ts +10 -0
  256. package/dist/mcp/simulate-tool.js +12 -0
  257. package/dist/mcp/simulate-tool.js.map +1 -0
  258. package/dist/render/render.js +8113 -108
  259. package/dist/studio/change-route.d.ts +18 -0
  260. package/dist/studio/change-route.js +24 -0
  261. package/dist/studio/change-route.js.map +1 -0
  262. package/dist/studio/http-error.d.ts +5 -0
  263. package/dist/studio/http-error.js +9 -0
  264. package/dist/studio/http-error.js.map +1 -0
  265. package/dist/studio/live.d.ts +2 -0
  266. package/dist/studio/live.js.map +1 -1
  267. package/dist/studio/server.js +43 -15
  268. package/dist/studio/server.js.map +1 -1
  269. package/dist/studio/verify-routes.d.ts +42 -0
  270. package/dist/studio/verify-routes.js +110 -0
  271. package/dist/studio/verify-routes.js.map +1 -0
  272. package/dist/version.d.ts +1 -1
  273. package/dist/version.js +1 -1
  274. package/library/modules/CanNode/CanNode.sheet.tsx +1 -1
  275. package/library/modules/CanNode/parts/MCP2515-I-SO/MCP2515_I_SO.tsx +1 -0
  276. package/library/modules/CanNode/parts/MCP2515-I-SO/part.yaml +2 -0
  277. package/library/modules/CanNode/parts/MCP2515-I-SO/verification.md +2 -1
  278. package/library/modules/CanNode/parts/TJA1051T-3/TJA1051T_3.tsx +1 -0
  279. package/library/modules/CanNode/parts/TJA1051T-3/part.yaml +2 -0
  280. package/library/modules/CanNode/parts/TJA1051T-3/verification.md +2 -1
  281. package/library/modules/DigitalInput24V/DigitalInput24V.sheet.tsx +7 -7
  282. package/library/modules/RelayDriver/RelayDriver.sheet.tsx +3 -3
  283. package/library/modules/RelayDriver/parts/AO3400A/part.yaml +34 -0
  284. package/library/modules/RelayDriver/parts/AO3400A/verification.md +11 -1
  285. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/SRD_12VDC_SL_C.tsx +1 -0
  286. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/part.yaml +14 -0
  287. package/library/modules/RelayDriver/parts/SRD-12VDC-SL-C/verification.md +4 -1
  288. package/package.json +1 -1
  289. package/skills/copperflow/references/copper.md +8 -0
  290. package/skills/copperflow/references/design-rules.md +48 -0
  291. package/skills/copperflow/references/modules.md +26 -0
  292. package/skills/copperflow/references/writing-circuits.md +3 -0
  293. package/dist/app/assets/NewPartDialog-C4sKWnGI.js +0 -160
  294. package/dist/app/assets/index-BgzJedaB.css +0 -1
  295. package/dist/app/assets/index-C_U9me2P.js +0 -19
package/README.md CHANGED
@@ -14,8 +14,8 @@ its own engine. You and your agent work on them together:
14
14
  Everything runs locally. There is no chat inside copperflow: use the agent you already use,
15
15
  for example Claude Code, through MCP.
16
16
 
17
- > **Status: 0.3, early.** The core, the MCP server, the CLI, the visual editor and the parts
18
- > library work. The project hierarchy for large boards is next; see [docs/design.md](docs/design.md).
17
+ > **Status: 0.4, early.** The core, the MCP server, the CLI, the visual editor, the parts library,
18
+ > placement, routing and the fabrication export work. Expect rough edges; see [docs/design.md](docs/design.md).
19
19
 
20
20
  ## Quick start
21
21
 
@@ -95,8 +95,8 @@ that way stops by itself an hour after the last tab closes; `copperflow studio s
95
95
 
96
96
  The schematic and the PCB are drawn from the design copperflow's engine builds, with
97
97
  copperflow's own footprints and schematic symbols. The PCB shows the ratsnest, a straight line
98
- for each connection still to be made, until routing arrives: hand routing in stage 4 and the
99
- router in stage 5 of [the engine design](docs/engine-design.md#stages).
98
+ for each connection still to be made, until it is routed by hand or by the router. A third tab,
99
+ 3D, shows the board as it will be made with its parts on it (see [Pictures and 3D](#beyond-drawing)).
100
100
 
101
101
  The window is laid out like a desktop EDA editor:
102
102
 
@@ -200,6 +200,50 @@ is no `--build` option.
200
200
  who made it. `copperflow undo` reverts the newest change; the agent can undo only its own.
201
201
  The agent sees what you undid and does not repeat it.
202
202
 
203
+ ## Beyond drawing
204
+
205
+ **Checking a part against its datasheet.** Verify on a library part opens a screen in the Studio: the
206
+ footprint drawn with its dimensions, each pin as a row to tick, and the recorded datasheet beside them.
207
+ The part can be marked verified only when every item is ticked, and only a person can do it.
208
+
209
+ **What a change did.** `copperflow history <id>` (the agent's `recent_changes { id }`) says what one
210
+ change did: parts added, removed and moved, nets and copper; `--since <id>` covers everything after
211
+ it. `copperflow render <file> --change <id>` draws it on the board, and each row of the Studio's Log
212
+ has Show.
213
+
214
+ **Ready to order.** `copperflow bom` ends with whether the board is ready to order bare and ready for
215
+ assembly, and names the lines with no supplier part number. No price or stock is checked.
216
+
217
+ **Pin map for firmware.** `copperflow pins <file>` lists which net is on each pin of the chips and
218
+ connectors, as a table, CSV or a C header (`--format c`); `copperflow package` writes them too.
219
+
220
+ **Fabrication files.** `copperflow export <file>` writes the Gerbers, drills, pick-and-place file and
221
+ BOM for JLCPCB into `<name>-fab/` and a zip, with `<name>.step` for a mechanical CAD program and a
222
+ picture of each side of the board. A circuit with errors is refused.
223
+
224
+ **Pictures and 3D.** `copperflow render <file> --view board` draws the bare board as made: every
225
+ fabrication layer is drawn by itself, from the same data the Gerbers are written from, and they are
226
+ put together as mask, finish, print and holes, in the maker's usual colours (`--mask`, `--finish`,
227
+ `--silk`). `--view 3d` and the Studio's 3D tab lay that picture on the board and stand the parts on
228
+ it. The parts are simple shapes, not their real models, in the 3D view and in the STEP file; a part's
229
+ height comes from its `height` in `part.yaml`, else a typical figure for its package, else 1 mm, and
230
+ the view says which.
231
+
232
+ **Fast lines.** Net classes in `rules.yaml` take an impedance, a differential pair with its gap and
233
+ skew, a longest length and length-matched groups; the checks report a pair that runs apart or differs
234
+ in length, and `copperflow impedance` gives widths and gaps for the board's stack. The figures are
235
+ estimates, and the router does not route pairs together or tune lengths yet. See
236
+ [design-rules.md](skills/copperflow/references/design-rules.md).
237
+
238
+ **Simulation.** `copperflow simulate` (the agent's `simulate`) finds the DC operating point from ideal
239
+ sources and simple part models: no time, no frequency, no temperature, no tolerance, and chips are not
240
+ modelled. A sheet's card can hold cases ("at 24 V in, the output is between 3.0 and 3.5 V") that it
241
+ runs; `copperflow spice` writes the same circuit as a SPICE netlist for another simulator.
242
+
243
+ **A board from KiCad.** `copperflow import kicad board.kicad_pcb` (the agent's `import_board`, or
244
+ File, Import board in the Studio) makes a new circuit from a KiCad 6 or newer board: its outline,
245
+ parts, nets, tracks, vias and pours. The parts arrive as library parts, not verified.
246
+
203
247
  ## MCP tools
204
248
 
205
249
  | Tool | What it does |
@@ -213,7 +257,14 @@ The agent sees what you undid and does not repeat it.
213
257
  | `new_circuit` | Writes a whole new circuit from a netlist in one call: parts (a built-in `kind` or a library `part`, `value`, `footprint`, `props` such as `pinCount` or a `pinLabels` object to name pins, no positions) and `nets` (`{ GND: ["R1.pin2", "U1.GND"] }`, no wire corners). Pins are checked first (a wrong one is refused with the part's real pin names); an existing file needs `replace: true`; one history entry, and undo removes the file. It then places the board (`autoplace`, a second entry; the board is fitted when no `board` size is given) unless `place: false` |
214
258
  | `autoplace` | Places the parts nobody placed or locked (or only `parts`, or one `instance`) by their connections, as one change: answers "Placed 12 parts; wire length 184 mm (was 412); board 42 × 28 mm; 0 overlaps", then the parts it found no room for and its notes; `fit: true` fits the board too; `budgetSeconds` (20 s by default); `connectors: "ahead"` tries each connector beside the part it serves (route and compare before keeping it) |
215
259
  | `fit_board` | Shrinks or grows a rectangular board to the parts' courtyards plus `margin` (2 mm by default), as one change |
216
- | `import_board` | Sets the board's outline, mounting holes and keepouts from a DXF drawing in the project folder, as one change |
260
+ | `import_board` | Sets the board's outline, mounting holes and keepouts from a DXF drawing in the project folder, as one change; a `.kicad_pcb` file makes a new circuit from a KiCad board |
261
+ | `autoroute` / `unroute` | Routes the unrouted connections (the whole board, some nets, some parts or one instance) and names each one it could not route with the reason; or removes the router's copper |
262
+ | `add_pour` / `remove_pour` / `add_hole` / `remove_hole` | A copper pour of a net on one layer, or a non-plated mounting hole, each as one change |
263
+ | `simulate` | The DC operating point of a circuit or a sheet: set nets to volts, close switches, energise relay coils; with a sheet and no values it runs the sheet's cases |
264
+ | `make_sheet` / `describe_sheet` | Moves parts into a sub-sheet with ports, and writes a sheet's card: what it does, its ports and its cases |
265
+ | `list_modules` / `module_info` / `use_module` / `save_module` | The shelf of modules and the libraries: read one, bring one into the project, save a described sheet |
266
+ | `export_fabrication` | Writes the fabrication files, the STEP model and the board's pictures; refused when the circuit has errors |
267
+ | `attach_datasheet` / `guide` | Records the datasheet a part came from; and the copperflow skill's texts for an agent that has no skills |
217
268
  | `edit_circuit` | Several edits in one call, applied as one change (one history entry); stops at the first refused edit and writes nothing |
218
269
  | `connect_nets` | Connects many pins to named nets in one call, e.g. `{ "GND": ["R1.pin2", "C1.pin2"] }` |
219
270
  | `route_track` | Draws one track of a net by hand from a pad, track or via of that net, as one change; refused when a point lands on another net's copper; the answer lists the copper violations it introduced |
@@ -222,13 +273,13 @@ The agent sees what you undid and does not repeat it.
222
273
  | `copper_summary` | Per net: tracks, vias, length and unrouted connections, then copper violations by rule (at most 60 lines) |
223
274
  | `board_summary` / `project_status` / `note_decision` / `set_project` | The board in about 60 lines (size, one line per part, longest connections with both pads' places, overlaps, edge, pours; `detail: "full"` for the rest); and the project memory `PROJECT.md` (Intent, Blocks, Decisions, Open) with each circuit's counts and last changes, a dated decision, or rewritten sections, each write one change |
224
275
  | `open_studio` | Starts the Studio for the project if none runs, opens it in your browser and answers with the address |
225
- | `render` | A PNG of the board or of one schematic page, drawn by the Studio's own code; `parts` zooms to some parts (needs the optional package `@napi-rs/canvas`) |
276
+ | `render` | A PNG of the board or of one schematic page, drawn by the Studio's own code; `view: "board"` is the bare board as made: mask, finish, print and holes drawn from the fabrication layers, either side, in the maker's usual colours; `view: "3d"` is that board with its parts as simple shapes, at an angle; `change` or `since` draws what a change did; `parts` zooms to some parts (needs the optional package `@napi-rs/canvas`) |
226
277
  | `list_parts` / `part_info` | Shows the parts library and a part's data and checklist |
227
278
  | `create_part` | Adds a part from a datasheet: pins, footprint string or footprint file, MPN, suppliers |
228
279
  | `import_part` | Fetches one part by its LCSC number from EasyEDA into `parts/<id>/`, unverified, for personal, non-commercial use only (see [licences](docs/licences.md)) |
229
280
  | `place_part` | Adds a library or built-in part to a circuit, with its import |
230
- | `bom` / `export_package` | Bill of materials; folder with BOM, datasheets and part status |
231
- | `recent_changes` | Recent changes by you and the agent, including undos |
281
+ | `bom` / `export_package` | Bill of materials, with whether the board is ready to order; folder with BOM, datasheets, part status and pin maps |
282
+ | `recent_changes` | Recent changes by you and the agent, including undos; `id` says what one change did, `since` everything after it |
232
283
  | `undo_change` | Undoes one of the agent's own changes |
233
284
 
234
285
  There is no unlock tool and no verify tool on purpose.
@@ -237,8 +288,12 @@ There is no unlock tool and no verify tool on purpose.
237
288
 
238
289
  ```text
239
290
  copperflow mcp start the MCP server on stdio
240
- copperflow studio [--port n] open the visual editor at http://127.0.0.1:4777
241
- copperflow skill [--global] copy the copperflow skills into .claude/skills
291
+ copperflow studio [--port n] [--idle-minutes n]
292
+ open the visual editor at http://127.0.0.1:4777 (or a free port);
293
+ with --idle-minutes it stops after n minutes with no tab open
294
+ copperflow studio stop stop the Studio of this folder
295
+ copperflow skill [--global] copy the copperflow skills into .claude/skills of this folder
296
+ (or of your home folder), for agents that read skills
242
297
  copperflow summary <file> print a circuit summary
243
298
  copperflow check <file> list the errors and warnings of copperflow's own rule checks
244
299
  copperflow lock <file> <part...> lock parts so the agent cannot change them
@@ -253,19 +308,55 @@ copperflow parts verify <id> --by <name> --against <datasheet, page>
253
308
  copperflow parts import <C-number> [--id <id>] [--replace]
254
309
  fetch a part by its LCSC number from EasyEDA into parts/,
255
310
  not verified (needs the internet; see docs/licences.md)
311
+ copperflow modules list the shelf of modules (COPPERFLOW_MODULES, default ~/.copperflow/modules)
312
+ copperflow modules verify <name> --by <name>
313
+ mark a module (or <library>/<name>) as checked by you
314
+ copperflow modules remove <name> take a module off the shelf
315
+ copperflow library list the libraries of modules: built in, git and folders
316
+ copperflow library add <name> <address or folder> [--ref <branch or tag>]
317
+ add a library from git (https://, ssh:// or user@host:path)
318
+ or a folder; its modules read NOT verified until you verify them
319
+ copperflow library update [name] bring git libraries to the newest commit of their ref
320
+ copperflow library remove <name> forget a library (a clone is deleted, a folder never)
256
321
  copperflow place <file> <part> <name> [key=value ...]
257
322
  add a library or built-in part to a circuit
258
323
  copperflow bom <file> [--csv] print the bill of materials
259
324
  copperflow package <file> [--out dir]
260
- write BOM, datasheets and part status to a folder
261
- copperflow render <file> [--view pcb|schematic] [--page <name>] [--parts U1,C3] [--width n] [--out file.png]
325
+ write BOM, datasheets, part status and pin maps to a folder
326
+ copperflow pins <file> [--part <name>] [--format md|csv|c]
327
+ which net is on each pin of the library chips and connectors
328
+ copperflow export <file> [--out dir] write the fabrication files for JLCPCB: Gerbers, drills,
329
+ pick-and-place and BOM in <name>-fab/ and <name>-fab.zip
330
+ beside the circuit (or in the project folder --out), with <name>.step
331
+ copperflow step <file> [--out file.step] write the board and its parts (as boxes) as a STEP file for CAD,
332
+ <name>.step beside the circuit
333
+ copperflow render <file> [--view pcb|schematic|board|3d] [--page <name>] [--parts U1,C3] [--width n] [--out file.png]
334
+ board: the bare board as made [--side bottom] [--mask black] [--finish hasl] [--silk black] [--background #rrggbb]
335
+ 3d: the board as made with its parts as simple shapes [--angle top|bottom|front|iso] and the same look options
336
+ [--change <id> | --since <id>]
262
337
  draw the board or a schematic page to a PNG, as the Studio shows it
338
+ (<name>-pcb.png or <name>-schematic-<page>.png beside the circuit)
339
+ copperflow simulate <file> --set V12=12 --set CTRL=3.3 [--sheet <name>] [--closed SW1,J2] [--coil K1] [--all]
340
+ the DC operating point from ideal sources and simple models: no time,
341
+ no frequency, no temperature, no tolerance; chips are not modelled.
342
+ With --sheet and no --set it runs the sheet's cases
343
+ copperflow spice <file> [--sheet <name>] [--set net=volts ...] [--out file.cir]
344
+ write the same circuit as a SPICE3 netlist for another simulator
263
345
  copperflow board <file> --dxf <path> [--layer <name>] [--units mm|inch] [--origin keep] [--replace]
264
346
  set the board's outline, holes and keepouts from a DXF drawing
347
+ copperflow import kicad <board.kicad_pcb> [--name <circuit name>] [--replace] [--origin keep]
348
+ make a new circuit from a KiCad board: its outline, parts (as
349
+ library parts, not verified), nets, tracks, vias and pours
350
+ copperflow impedance [--single 50] [--pair 90] [--gap 0.2] [--width 0.3]
351
+ line widths and gaps for an impedance on the board's stack (rules.yaml);
352
+ an estimate: the router does not route pairs together or tune lengths
265
353
  copperflow history [--limit n] list recent changes
354
+ copperflow history <id> | --since <id> what one change did, or everything after it
266
355
  copperflow undo [id] undo the newest change, or the given one
267
356
  ```
268
357
 
358
+ Every command accepts `--root <dir>` (default: the current directory).
359
+
269
360
  ## Libraries
270
361
 
271
362
  A library is a folder of modules laid out as the shelf is: `modules/<Name>/` (or `<Name>/` at the top
@@ -290,7 +381,10 @@ their component files written by copperflow. A library module reads NOT verified
290
381
 
291
382
  - **0.2** (done) Visual editor in the browser: drag, rotate, lock, delete and reconnect wires, marks.
292
383
  - **0.3** (done) Parts library (one folder per part) and datasheet-to-part import; BOM and datasheet package.
293
- - **0.4** Project hierarchy for large boards: a project map, blocks with interfaces, generated summaries, project rules.
384
+ - **0.4** (done) Placement, routing, pours and the fabrication export; sheets, modules and libraries; part
385
+ verification on screen, the change view, the order report, pin maps, STEP and the 3D view, fast-line rules,
386
+ DC simulation, KiCad board import and the board drawn as made.
387
+ - **Next** Routing pairs together and tuning lengths, time and frequency in the simulator, real part models in 3D.
294
388
 
295
389
  ## Contributing
296
390
 
@@ -1,5 +1,10 @@
1
1
  copperflow studio bundles the following packages. Their licences follow.
2
2
 
3
+ ========================================================================
4
+ clipper-lib@6.4.2 BSL
5
+ ========================================================================
6
+ (no licence file in the package)
7
+
3
8
  ========================================================================
4
9
  react-dom@19.1.0 MIT
5
10
  ========================================================================