Skip to content

Getting Started

Adopting Manufacturing as Code is easier than ever with MakerRepo. This guide walks you through creating a repository on MakerRepo.com, adding your code, and pushing it to the platform. First, create a repository on MakerRepo.com and push your code just like you would with any other Git host (e.g. GitHub or GitLab). We recommend creating an access token instead of using your password as the credentials so that you can easily revoke access if needed.

Install the MakerRepo library

Next, install the MakerRepo Python library. The MakerRepo Python library (the mr package) brings Manufacturing as Code into the Build123D ecosystem. It is designed to have as little impact on your existing Build123D project as possible. Adding decorators to your functions does not change how they work — they are annotations so that tools like MakerRepo CLI or MakerRepo.com can find those functions and do something with them (e.g. run them in CI or build from the command line). You don't have to choose between the MakerRepo way and your own: the library only adds value by opening up that extra features for your existing code. You mark which functions produce CAD artifacts; when you push your repo to MakerRepo.com, the platform runs CI, builds those artifacts, and hosts them so you can view and share them in the web UI (including the embedded OCP viewer).

Install with pip (or uv):

pip install makerrepo

Or with uv:

uv add makerrepo

Exposing Build123D artifacts to MakerRepo.com

You keep writing Build123D code like you normally would. To have MakerRepo.com collect and display your artifacts, you add the @artifact decorator to the function that builds your model.

Minimal example

from build123d import *
from mr import artifact

@artifact
def box():
    with Build() as build:
        Box(10, 10, 10)
    return build

The function should return the Build123D Build (or equivalent) result that represents your model. When CI runs on MakerRepo.com, it will execute this function, export the resulting geometry, and attach it to the build so you can view it in the artifact viewer.

Workflow

  1. Create a repository on MakerRepo.com and add your code (e.g. push from a local Git clone).
  2. Use @artifact on every function that should produce a published artifact.
  3. Push commits — the platform runs CI, builds the model, and collects artifacts.
  4. View your repo on MakerRepo.com — use the web UI to see the latest artifacts and the embedded OCP viewer.

You can have multiple @artifact-decorated functions in one repo; each will be built and its outputs will be available as artifacts.

For artifact options and advanced usage, see Artifacts.

Exposing Build123D generator to MakerRepo.com

To let visitors customize a model (e.g. change dimensions) and request a new build, use a generator with the @customizable decorator and a Pydantic parameter model:

from build123d import *
from mr import customizable
from pydantic import BaseModel
from pydantic import Field


class Parameters(BaseModel):
    size: float = Field(default=10, gt=0)


@customizable(sample_parameters=Parameters())
def main(parameters: Parameters):
    return Box(parameters.size, parameters.size, parameters.size)

Push this to your repo; MakerRepo.com will show a sample build and let users tweak size and request new builds. For more options, see Generators.