Roadmap 0.13, Python scripting
PY.5 Python package for outside programs, offered as an add-on
a Discord member Suggested. Owner 2026-12-03: "provide the add-on option". The same cadcraft module for a Python program outside the app (batch jobs, a server, another pipeline), talking to CadCraft Studio; people add it from the Library like any add-on and get the package from their add-on list. Waits for headless Studio (FX.768).
2026-12-03 (python-13, PY.5), partly built. lib/python/cadcraft.py (standard library only, one file) is the same `cadcraft` module for a Python program outside the app: it starts CadCraft's own cadcraft-mcp program (npx or an installed one; Node 20.19 or newer) and speaks MCP over standard input and output. `connect_studio()` runs `cadcraft-mcp connect`, which finds the open Studio by the file Studio writes for its own user (no token in the code); `connect(root=, allow=)` runs the headless server on folders. Function and argument names are the in-app rule (import_ for import, continue_ for continue), arguments are checked before they are sent, a failing tool raises cadcraft.ToolError with the tool's own message, a program that stops or does not answer raises cadcraft.ConnectionError. Offered as an add-on: the Python add-on carries the file (package/cadcraft.py.txt, a package takes no .py file) and its panel has Download cadcraft.py and Copy the first lines; help section 'From a Python program outside the app'. Tests: tools/python-test/scripts.mjs 43/0, offline.mjs 22/0 (real CPython), test_package.py 42/0, lab browser run tools/python-test/browser-py-13.mjs 94/0 (CadCraft, PartCraft, BimCraft, ModelCraft, MarkupCraft, TakeoffCraft, CivilCraft, DetailCraft). Log docs/0.13-sessions/python-13.md. test_package.py runs against CadCraft's real headless server (a drawing made, drawn on, saved inside the folder and read back; a path outside the folder refused; read only by default) and against the reference Studio server with a stand-in window (the connect file, the bridge, tool calls, Studio closed). NOT done: a run against a real CadCraft Studio (FX.768's real run waits for the next Studio build); publishing the package to a package index (the owner's: name, account, version rule); `cadcraft-mcp` itself comes from the npm publish of @getcadcraft/mcp (the owner's, GH.13), until then `command=` or CADCRAFT_MCP points at the tools/mcp folder.
closing 2026-12-05: Partly built -> Built. cadcraft.py built, test_package.py 42/0 against the real headless server (python-13.md); left: a real Studio run and the owner's publish (rule 76).
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.