part-grimoire
part-grimoire turns a part, written as a config file and Python CAD code, into a folder with everything to make it. It operates in the terminal, on your own computer, one stage after the other.
You write a chapter: a rubric (rubric.toml) and an incantation (a badcad Python file). Then you cast it. The cast writes a page for each aspect (variant) of the part. It seals each page into a spell (a zip file). A page has:
- an STL and a STEP file for each talisman (printed piece)
- a glyph (a DXF outline) of each talisman
- the bound form (the assembled part) as STL, 3MF, and STEP, with one named, coloured solid for each item
- the sigil (thumbnail) and an illumination (picture) of each talisman
- an exploded view of each rite (assembly step), and the unveiling (an exploded view of all the rites)
- the manifestation: a Bambu Studio print project and a sliced plate, with the print time and the filament weight
- the reagents (the bill of materials) as CSV, JSON, and Markdown
- the page text (a README) and the colophon (the build record)
The glossary gives the plain meaning of each term. part-grimoire is a terminal version of the model build pipeline of ExoWorks.
Install
With pip
pip install part-grimoire
pip installs part-grimoire and its Python packages. It does not install the system libraries or the familiar (Bambu Studio). Without the familiar, use cast --no-manifest. part-grimoire augur shows what is missing.
With the installer
The installer installs everything, the familiar included:
git clone https://github.com/Spikeon-Studio/part-grimoire.git
cd part-grimoire && ./install.sh
The installer installs:
- The system packages: Python, git, the OpenGL and EGL libraries, Xvfb, and the cairo headers. It uses
apt,dnf,pacman, orzypper, andsudoprompts you for your password. - A Python environment in
~/.local/share/part-grimoire/venvwith badcad, build123d, manifold3d, OCP, numpy, scipy, shapely, Pillow, moderngl, matplotlib, ezdxf, and pycairo. - The
part-grimoirecommand in~/.local/bin. - The familiar (Bambu Studio): the Docker image
ghcr.io/spikeon/bambu-studio-mcp:latestif Docker is on the computer, elsecom.bambulab.BambuStudiofrom Flathub.
Then it starts part-grimoire augur, which checks each dependency.
| Installer option | Effect |
|---|---|
--familiar docker |
Use the Docker image of Bambu Studio. Install Docker if it is missing. |
--familiar flatpak |
Use Bambu Studio from Flathub. Install Flatpak if it is missing. |
--familiar skip |
Do not install Bambu Studio. The casts make no manifestation. |
--no-system |
Do not install system packages. |
--dev |
Make an editable install with the test tools. |
--uninstall |
Remove the environment, the command link, and the settings. |
Quick start
part-grimoire inscribe my-box
part-grimoire cast my-box
The page is in my-box/pages/my-box/, and the spell is my-box/pages/my-box.spell.zip. To find and store a good camera for each picture:
part-grimoire divine my-box
Commands
| Command | Effect |
|---|---|
part-grimoire cast [chapter] |
Cast the spell: make the page and the spell of each aspect. |
part-grimoire divine [chapter] |
Find the cameras of the views and store them in visions.toml. --jev lets Jev find. |
part-grimoire scry [chapter] |
Read the chapter. Show the talismans, the rites, and the reagent cost. Write nothing. |
part-grimoire inscribe <folder> |
Make a chapter with an example part. |
part-grimoire augur |
Check that the computer has all the dependencies. |
part-grimoire lore <machine|process|filament> |
List the Bambu Studio profiles. |
The command reference gives all the options.
A chapter
rubric.toml:
[chapter]
name = "cable-clip"
title = "Cable Clip"
version = "2.1"
incantation = "clip.py"
[aspects]
cable = [4, 6, 8]
[tinctures]
latch = "#d2691e"
[reagents."M3x12 screw"]
kind = "screw"
d = 3
length = 12
price = 7.49
pack = 100
[rites.latch]
title = "Attach the latch"
text = "Put the latch on the base. Install the screw."
camera = [-35, 15]
[manifestation]
printer = "Bambu Lab P1S 0.4 nozzle"
clip.py:
from partgrimoire import Ritual
def talismans(cable):
return {"base": base(), "latch": latch(cable)}
def ritual(talismans, cable):
r = Ritual()
r.rite("latch")
r.talisman("base", talismans["base"])
r.talisman("latch", talismans["latch"], rite="latch", explode=0.8)
r.reagent("M3x12 screw", at=(-9, 0, 6 + cable + 4.8), axis=(0, 0, 1), rite="latch", explode=2.0)
return r
The full example is in examples/cable-clip.
Cameras
Each picture can store its own camera (camera, zoom, center) in the rubric. part-grimoire divine finds cameras that show the items best, and stores them in visions.toml. With --jev, the Jev decision model finds from the best cameras. Jev is optional, and a stored camera always wins. See Scrying and cameras.
Documentation
| Page | Contents |
|---|---|
| Get started | Install, inscribe, scry, cast, and divine |
| The incantation | talismans(), ritual(), and the Ritual methods |
| Scrying and cameras | The pictures, the stored cameras, divine, and Jev |
| Reagents | Hardware items, prices, and the reagent list |
| The familiar | Bambu Studio: backends, profiles, and print settings |
| The page | The outputs, the glyphs, the colophon, and the seal |
| Rubric reference | Each table and key, with its type and default |
| Command reference | All commands and options |
| Glossary | The grimoire terms |
| Troubleshooting | Errors and their causes |
Tests
./install.sh --dev
~/.local/share/part-grimoire/venv/bin/python -m pytest
The tests use only the fixture chapter in tests/fixtures. They do not start the familiar or Jev. GitHub Actions does the tests on Python 3.12 and 3.14 for each push to main and each pull request.
Metadata
Release files for part-grimoire 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| part_grimoire-0.3.1.tar.gz | 47.5 kB | With provenance | Details for part_grimoire-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| part_grimoire-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for part_grimoire-0.3.1-py3-none-any.whl |
Total release size: 90.5 kB
Release files / part_grimoire-0.3.1.tar.gz
| Download URL | part_grimoire-0.3.1.tar.gz |
|---|---|
| Size | 47.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6e0f557e0b77fd56582610faf70d416f631f4a266efe79148e51360768d886a
|
|
BLAKE2b-256 checksum How to use checksums |
97dbd16ba4d108127243a8a23c18f097b902734214382645b5f7a683ff176a7c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logRelease files / part_grimoire-0.3.1-py3-none-any.whl
| Download URL | part_grimoire-0.3.1-py3-none-any.whl |
|---|---|
| Size | 43.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8d1d2180f9a4f28467a927865ee91974eda55c9cbc5c404aeef4987f4b0cb5f
|
|
BLAKE2b-256 checksum How to use checksums |
e6946072e1ccce803e8ce7c8438c216468c9faaaba4b4d6049979e819197f4f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logSecurity for part-grimoire 0.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for part_grimoire-0.3.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.