Skip to content

MakerRepo CLI – Artifacts

The artifacts subcommands let you manage, view, and interact with artifacts in the local repository. Artifacts are discovered by scanning the current directory for Python packages and modules that define @artifact-decorated functions. You can refer to artifacts by name or by module/name when there are multiple artifacts with the same name.

For the concept of artifacts and the @artifact decorator, see Artifacts.

All examples below assume you run commands from the repository root.

List artifacts

List artifacts discovered from the current repository. Prints a table of Module, Name, and Sample for each artifact.

mr artifacts list

View artifacts

Run the OCP viewer locally and send the built artifact(s) to it. If you omit artifact names, an interactive prompt lets you select which artifact(s) to view.

mr artifacts view [ARTIFACTS...] [OPTIONS]
Option Description
-p, --port Port for the OCP Viewer to receive model data (default: 3939).
--colormap Colormap for coloring parts (e.g. tab10, none). Default: none.

Export artifacts

Export artifact(s) to file(s). Supported formats: STEP, STL, BREP, glTF, 3MF, SVG, DXF. Format is inferred from the output path extension if not specified.

mr artifacts export [ARTIFACTS...] [OPTIONS]
Option Description
-o, --output Output file or directory (default: current directory).
-f, --format Export format (default: step, or inferred from -o extension).

If you pass a single artifact and a path with a file extension (e.g. -o part.step), that file is written. If you pass a directory or multiple artifacts, one file per artifact is written (e.g. module_artifact.step).

Snapshot

Capture a screenshot of the artifact(s) and save it as an image file. Uses a headless CAD viewer to render and capture the image.

mr artifacts snapshot [ARTIFACTS...] [OPTIONS]
Option Description
-o, --output Output image file path (default: snapshot.png).
--colormap Colormap for coloring parts (default: none).